ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1545. Hieroglyphs

=NeRRouZ= Why 13 test "CRASH" ?? [2] // Problem 1545. Hieroglyphs 22 Apr 2011 00:17
#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;
}
AterLux Re: Why 13 test "CRASH" ?? [1] // Problem 1545. Hieroglyphs 23 Apr 2011 02:56
a[1001] should be a[2000] at least;
=NeRRouZ= Re: Why 13 test "CRASH" ?? // Problem 1545. Hieroglyphs 24 Apr 2011 15:20
Thanks )))