AtCoder Grand Contest 003

Submission #1365397

Source codeソースコード

#include <cstdio>

#define fin stdin
#define fout stdout

int main(){
    char ch = fgetc(fin);
    int n = 0, s = 0, e = 0, w = 0;
    while(ch != '\n'){
        if(ch == 'N') n = 1;
        else if(ch == 'S') s = 1;
        else if(ch == 'E') e = 1;
        else w = 1;
        ch = fgetc(fin);
    }

    if((n + s) % 2 == 0 && (e + w) % 2 == 0)
        fprintf(fout, "Yes\n");
    else fprintf(fout, "No\n");

    return 0;
}

Submission

Task問題 A - Wanna go back home
User nameユーザ名 Alexandru Petrescu
Created time投稿日時
Language言語 C++14 (GCC 5.4.1)
Status状態 AC
Score得点 200
Source lengthソースコード長 452 Byte
File nameファイル名
Exec time実行時間 1 ms
Memory usageメモリ使用量 128 KB

Test case

Set

Set name Score得点 / Max score Cases
Sample - s1.txt,s2.txt,s3.txt,s4.txt
All 200 / 200 01.txt,04.txt,05.txt,06.txt,07.txt,08.txt,09.txt,10.txt,11.txt,13.txt,15.txt,s1.txt,s2.txt,s3.txt,s4.txt

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
01.txt AC
04.txt AC 1 ms 128 KB
05.txt AC 1 ms 128 KB
06.txt AC 1 ms 128 KB
07.txt AC 1 ms 128 KB
08.txt AC
09.txt AC
10.txt AC
11.txt AC
13.txt AC
15.txt AC 1 ms 128 KB
s1.txt AC 1 ms 128 KB
s2.txt AC
s3.txt AC 1 ms 128 KB
s4.txt AC