Submission #238088

# Submission time Handle Problem Language Result Execution time Memory
238088 2020-06-09T22:09:39 Z m3r8 Flood (IOI07_flood) C++14
0 / 100
5 ms 256 KB
#include <stdio.h>

int buf[400000];

int main(int argc, char ** argv){
  if(argc > 2){
    freopen(argv[1],"r",stdin);
    int n;
    scanf("%d",&n);
    int a;
    for(int i = 0;i<n;i++){
      scanf("%d",&a);  
      buf[a] = 1;
    };
    freopen(argv[2],"r",stdin);
    scanf("%d",&n);
    for(int i = 0;i<n;i++){
      scanf("%d",&a);  
      if(!buf[a]){
        printf("fehler bei %d\n",a);  
      };
    };
  };
  return 0;
};

Compilation message

flood.cpp: In function 'int main(int, char**)':
flood.cpp:7:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
     freopen(argv[1],"r",stdin);
     ~~~~~~~^~~~~~~~~~~~~~~~~~~
flood.cpp:9:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&n);
     ~~~~~^~~~~~~~~
flood.cpp:12:12: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
       scanf("%d",&a);  
       ~~~~~^~~~~~~~~
flood.cpp:15:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
     freopen(argv[2],"r",stdin);
     ~~~~~~~^~~~~~~~~~~~~~~~~~~
flood.cpp:16:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&n);
     ~~~~~^~~~~~~~~
flood.cpp:18:12: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
       scanf("%d",&a);  
       ~~~~~^~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 256 KB Unexpected end of file - int32 expected
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 256 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 256 KB Unexpected end of file - int32 expected
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 256 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 256 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 256 KB Unexpected end of file - int32 expected
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 256 KB Unexpected end of file - int32 expected
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 256 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 256 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 256 KB Unexpected end of file - int32 expected
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 256 KB Unexpected end of file - int32 expected
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 256 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 256 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 256 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -