Submission #1110278

#TimeUsernameProblemLanguageResultExecution timeMemory
1110278vjudge1Table Tennis (JOI24_tabletennis)C++17
0 / 100
1 ms336 KiB
#include<bits/stdc++.h> using namespace std; int n,m; void sol(){ cin >>n>>m; cout <<"YES"<<'\n'; m++; for(int i=2;i<=n;i++){ if(m){ for(int j=1;j<i-1;j++){ cout <<1; } cout <<0; cout <<'\n'; m--; } else{ for(int j=1;j<i;j++){ cout <<1; } cout <<'\n'; } } } int main(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); if(fopen("c.INP","r")){ freopen("c.INP","r",stdin); freopen("c.OUT","w",stdout); } int q; cin >>q; while(q--){ sol(); } }

Compilation message (stderr)

Main.cpp: In function 'int main()':
Main.cpp:30:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   30 |         freopen("c.INP","r",stdin);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~
Main.cpp:31:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   31 |         freopen("c.OUT","w",stdout);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...