Submission #117174

#TimeUsernameProblemLanguageResultExecution timeMemory
117174onjo0127단층 (JOI16_ho_t5)C++11
18 / 100
29 ms8312 KiB
#include <bits/stdc++.h> using namespace std; const int O = 500; int A[1009][1009]; int main() { int N, Q; scanf("%d%d",&N,&Q); for(int i=0; i<=1000; i++) { for(int j=0; j<=1000; j++) { A[i][j] = i; } } while(Q--) { int X, D, L; scanf("%d%d%d",&X,&D,&L); X += O; if(D == 1) { for(int i=0; i<=1000; i++) { for(int j=X-i; j>=1; j--) { A[i][j] = A[i+1][j-1]; } } } if(D == 2) { for(int i=0; i<=1000; i++) { for(int j=X+i+1; j<=1000; j++) { A[i][j] = A[i+1][j+1]; } } } } for(int i=O+1; i<=O+N; i++) printf("%d\n", A[0][i]); return 0; }

Compilation message (stderr)

2016_ho_t5.cpp: In function 'int main()':
2016_ho_t5.cpp:8:20: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     int N, Q; scanf("%d%d",&N,&Q);
               ~~~~~^~~~~~~~~~~~~~
2016_ho_t5.cpp:15:27: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         int X, D, L; scanf("%d%d%d",&X,&D,&L); X += O;
                      ~~~~~^~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...