제출 #1110271

#제출 시각아이디문제언어결과실행 시간메모리
1110271vjudge1Table 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; int p=n-m-1; cout <<"YES"<<'\n'; for(int i=2;i<=n;i++){ for(int j=1;j<i-1;j++){ cout <<1; } cout <<0; 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(); cout <<'\n'; } }

컴파일 시 표준 에러 (stderr) 메시지

Main.cpp: In function 'void sol()':
Main.cpp:6:9: warning: unused variable 'p' [-Wunused-variable]
    6 |     int p=n-m-1;
      |         ^
Main.cpp: In function 'int main()':
Main.cpp:21:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   21 |         freopen("c.INP","r",stdin);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~
Main.cpp:22:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   22 |         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...