Show all threads Hide all threads Show all messages Hide all messages |
Page 2 |
WA 3 | Sperow | 1545. Hieroglyphs | 7 Dec 2020 15:51 | 1 |
WA 3 Sperow 7 Dec 2020 15:51 What's the WA 3?? and send me please some tests if u have) |
I got accepted but can you tell me what did they mean by arbitery sequence.... Was it to mislead us?? | Suparna | 1545. Hieroglyphs | 23 Jan 2019 20:39 | 1 |
I didn't do anything for 'arbitary' sequence. But my solution got accepted.Can anybody help me clear this doubt? |
No subject | Suparna | 1545. Hieroglyphs | 23 Jan 2019 20:36 | 1 |
|
C++ 11 STL AC | coldwind | 1545. Hieroglyphs | 8 Aug 2018 14:28 | 1 |
#include<iostream> #include<string> #include<map> #include<set> using namespace std; int main(){ map<char,set<string>> dic; string w; int n; cin>>n; while(--n>=0){ cin>>w; dic[w[0]].insert(w); } char c; cin>>c; for(auto s:dic[c]) cout<<s<<endl; } |
DELETE SOLUTION | mNT | 1545. Hieroglyphs | 28 Jul 2018 15:42 | 1 |
Edited by author 28.07.2018 15:42 |
Page 1 |
My solution in Python 3 took 0.062s and 220 KB. Can it be faster? | Dhruv Somani | 1545. Hieroglyphs | 19 Apr 2021 15:39 | 3 |
My solution in Python 3 took 0.062s and 220 KB. Can it be faster? Of course it can! my solution took away just 0.001 sec and 172 kB(in C) Python takes more time than lower level languages and thats why it's not the best idea to use it in a speed based setting |
why I have runtime eror on test 1? | nick nikuradze | 1545. Hieroglyphs | 23 Apr 2016 22:50 | 5 |
This is my code!!! #include <iostream> #include <vector> #include <algorithm> using namespace std; vector <string> str; vector <string> str1; int main() { char k; string s; vector <string> str; vector <string> str1; int n; cin>>n; for(int i=0; i<n; i++) { cin>>s; str.push_back(s); } cin>>k;
for(int i=0; i<n; i++) { if(str[i][0]==k) str1.push_back(str[i]); }
sort(str1.begin(),str1.end()); for(int i=0; i<str.size(); i++) { cout<<str1[i]<<endl; } return 0; } Do you check your code locally, using some C++ IDE or compiler? Why no? You MUST try. You can, using VS or QTCreator: - run task sample using debugger; - catch "vector index out of range" exception/failure; - fix it. Edited by author 23.04.2016 20:06 I check it on c++ compiler and it do right You definitely didn't check. Your code contains mistakes. Your code must fail with some "vector index out of range" error when you run it locally in debug mode. Probably you use "checked" in meaning "compiled without errors". It is wrong meaning. I check it on c++ compiler and it do right |
solution and explanation | Davit Safrastyan [RAU] | 1545. Hieroglyphs | 9 Oct 2014 18:09 | 1 |
Find the solution and explanation of this task in manyprogrammingtutorials.blogspot.com |
Idea[Solution][Java] | Evgeniy[VVV] | 1545. Hieroglyphs | 29 Aug 2014 13:31 | 1 |
So,it's easy problem. just use array and charAt(0); |
use the map | aybek | 1545. Hieroglyphs | 17 Oct 2013 16:08 | 1 |
I think that code is easy to understand. If you got WA, try it. #include <iostream> #include <map> using namespace std; int main() { map<char, string> m; int n; cin >> n; while (n--) { char c1, c2; cin >> c1 >> c2; m[c1].push_back(c2); } char c; cin >> c; for (int i = 0; i < m[c].size(); ++i) cout << c << m[c][i] << endl; return 0; } |
Runtime error | Unfeeling | 1545. Hieroglyphs | 12 Jan 2018 02:44 | 2 |
using System; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { int n = Convert.ToInt32(Console.ReadLine()); string [] ch= new string [100]; string c; for (int i=0;i<n;i++) ch[i]=Console.ReadLine(); c=Console.ReadLine(); for (int i=0;i<n;i++) { if (c==ch[i].Substring(0,1)) Console.WriteLine(ch[i]); } Console.ReadKey(); } } } what's the problem??? help me please Use comment for this line (or delete this line) //Console.ReadKey(); |
AC using C# | JAMSHID AKHMEDOV | 1545. Hieroglyphs | 31 Jan 2013 21:41 | 1 |
using System;namespace jama{class Program{static void Main(string[] args){ushort n = ushort.Parse(Console .ReadLine());string[] a = new string[n];for (ushort i = 0; i <= n - 1; i++){a[i] = Console.ReadLine();}string b = Console.ReadLine();foreach (string d in a){if (d.Substring(1,1) == b)Console.WriteLine(d);}Console.ReadLine();}}} |
whats wrong and whats test 10 | garra | 1545. Hieroglyphs | 31 May 2012 21:47 | 3 |
#include<stdio.h> #include<stdlib.h> #include<string.h> int main() { int n,i,j=0; char a[100][4]; char b; scanf("%d",&n); for(i=0;i<=n;i++) { gets(a[i]); } scanf("%c",&b); for(i=0;i<=n;i++) { if(a[i][j]==b) { puts(a[i]); } } return 0; } there can be more than 100 hieroglyphs |
why test 10? | Pop Ioachim | 1545. Hieroglyphs | 12 Dec 2011 14:51 | 1 |
|
Why wrong? | Saimon | 1545. Hieroglyphs | 23 Dec 2011 13:12 | 2 |
This is my code var n,i:integer; baza:array[1..1000]of string[2]; tmp,bukva:string[2]; begin read(n); i:=0; repeat i:=i+1; readln(baza[i]); until i=n; read(bukva); for i:=1 to n do begin tmp:=baza[i]; if bukva=tmp[1] then writeln(tmp); end; end. Where mystake? I think to this code is right, but i have WA in test1. Help please tmp:=baza[i]; if bukva=tmp[1] then writeln(tmp); mistake there. Edited by author 23.12.2011 13:14 |
WHY WA 9? Everything is right, even for Z symbol; What is TEST 9? Thx | orcchg | 1545. Hieroglyphs | 23 Aug 2011 02:25 | 1 |
np, i have proceed :D Edited by author 23.08.2011 02:26 |
WA 11 | hatred | 1545. Hieroglyphs | 18 Jul 2011 20:43 | 1 |
WA 11 hatred 18 Jul 2011 20:43 I create alphabetic-sorted binary tree and find strings in it. I got WA 11, why? |
Why 13 test "CRASH" ?? | =NeRRouZ= | 1545. Hieroglyphs | 24 Apr 2011 15:20 | 3 |
#include <iostream> using namespace std; int main() { int n; int i; char s; char a[1001]; cin>>n;
for (i = 0; i<n*2; i++) cin>>a[i]; cin>>s; for (i=0; i<n*2; i++) {
if (s == a[i] && i % 2 == 0) cout<<a[i]<<a[i+1]<<endl; }
system("pause"); return 0; } a[1001] should be a[2000] at least; |
What is "Crash (access violation)"? | Nęmø..! | 1545. Hieroglyphs | 28 Jan 2011 00:30 | 1 |
I've just understood!! 1<=n<=1000 not n<=100 =))! Edited by author 28.01.2011 00:34 |
What's wrong??? | Rudnev Vladimir | 1545. Hieroglyphs | 22 Feb 2010 23:29 | 3 |
Why I got crash on 10 test???? var a:array[1..100]of string; n,i:integer; c:string; begin read(n); for i:=1 to n+1 do readln(a[i]); readln(c); for i:=1 to n+1 do if pos(c,a[i])=1 then writeln(a[i]); end. Because 1<=N<=1000 (not 1<=N<=100). |