Submission #101505

# Submission time Handle Problem Language Result Execution time Memory
101505 2019-03-19T03:24:43 Z ShaneOng Tracks in the Snow (BOI13_tracks) C++14
2.1875 / 100
101 ms 16120 KB
#include<bits/stdc++.h>
using namespace std;
int h,w;
char arr[4009][4009];
bool flag1,flag2;
int main(){
    scanf("%d%d",&h,&w);
    for(int x=0;x<h;x++)
        scanf("%s",&arr[x]);
    for(int x=0;x<h;x++){
        for(int y=0;y<w;y++){
            flag1=flag1||(arr[x][y]=='F');
            flag2=flag2||(arr[x][y]=='R');
        }
    }
    printf("%d\n",(flag1&&flag2)?2:1);
}

Compilation message

tracks.cpp: In function 'int main()':
tracks.cpp:9:27: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'char (*)[4009]' [-Wformat=]
         scanf("%s",&arr[x]);
                    ~~~~~~~^
tracks.cpp:7:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d%d",&h,&w);
     ~~~~~^~~~~~~~~~~~~~
tracks.cpp:9:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%s",&arr[x]);
         ~~~~~^~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 6 ms 2304 KB Output isn't correct
2 Incorrect 2 ms 384 KB Output isn't correct
3 Incorrect 2 ms 512 KB Output isn't correct
4 Incorrect 4 ms 2176 KB Output isn't correct
5 Incorrect 3 ms 1408 KB Output isn't correct
6 Incorrect 2 ms 384 KB Output isn't correct
7 Incorrect 2 ms 512 KB Output isn't correct
8 Incorrect 2 ms 512 KB Output isn't correct
9 Incorrect 2 ms 640 KB Output isn't correct
10 Incorrect 3 ms 1280 KB Output isn't correct
11 Incorrect 4 ms 1152 KB Output isn't correct
12 Incorrect 4 ms 1536 KB Output isn't correct
13 Incorrect 4 ms 1408 KB Output isn't correct
14 Incorrect 5 ms 1408 KB Output isn't correct
15 Incorrect 4 ms 2304 KB Output isn't correct
16 Incorrect 2 ms 2176 KB Output isn't correct
17 Incorrect 5 ms 2048 KB Output isn't correct
18 Incorrect 4 ms 2176 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 16 ms 15232 KB Output isn't correct
2 Incorrect 14 ms 5248 KB Output isn't correct
3 Incorrect 84 ms 16072 KB Output isn't correct
4 Incorrect 30 ms 7672 KB Output isn't correct
5 Incorrect 48 ms 12032 KB Output isn't correct
6 Incorrect 84 ms 15964 KB Output isn't correct
7 Incorrect 15 ms 15972 KB Output isn't correct
8 Incorrect 16 ms 15292 KB Output isn't correct
9 Incorrect 3 ms 384 KB Output isn't correct
10 Incorrect 3 ms 384 KB Output isn't correct
11 Incorrect 15 ms 15744 KB Output isn't correct
12 Incorrect 3 ms 896 KB Output isn't correct
13 Incorrect 12 ms 5248 KB Output isn't correct
14 Incorrect 9 ms 3840 KB Output isn't correct
15 Incorrect 12 ms 4224 KB Output isn't correct
16 Incorrect 6 ms 1920 KB Output isn't correct
17 Incorrect 27 ms 8184 KB Output isn't correct
18 Incorrect 26 ms 8192 KB Output isn't correct
19 Incorrect 25 ms 7672 KB Output isn't correct
20 Incorrect 30 ms 7288 KB Output isn't correct
21 Incorrect 58 ms 12536 KB Output isn't correct
22 Incorrect 51 ms 12152 KB Output isn't correct
23 Incorrect 47 ms 10104 KB Output isn't correct
24 Incorrect 53 ms 12536 KB Output isn't correct
25 Incorrect 74 ms 15992 KB Output isn't correct
26 Correct 68 ms 14072 KB Output is correct
27 Incorrect 86 ms 15992 KB Output isn't correct
28 Incorrect 82 ms 15964 KB Output isn't correct
29 Incorrect 81 ms 15996 KB Output isn't correct
30 Incorrect 101 ms 15736 KB Output isn't correct
31 Incorrect 52 ms 12920 KB Output isn't correct
32 Incorrect 80 ms 16120 KB Output isn't correct