Submission #526500

#TimeUsernameProblemLanguageResultExecution timeMemory
526500BilegtRed-blue table (IZhO19_stones)C++14
27 / 100
76 ms1220 KiB
#include<bits/stdc++.h> using namespace std; #define ll long long #define pb push_back const int MOD = 1e9 + 7; const int INF = 1e9 + 1000; void nemeh(int a, int b){ int x, y, q, w, e; cout << a + (b - (b / 2 +1))<<endl; for(q = 1;q <= a; q++){ for( w = 1; w <= b / 2 +1;w++){ cout << '+'; } for( w = b/ 2+2; w <= b; w++){ cout << '-'; } cout << endl; } } void hasah(int a, int b){ int x, y, q, w, e; cout << b + (a - (a / 2 +1))<<endl; for(q = 1;q <= a/2+1; q++){ for( w = 1; w <= b;w++){ cout << '-'; } cout << endl; } for(q = a/2+2;q <= a; q++){ for( w = 1; w <= b;w++){ cout << '+'; } cout << endl; } } void tentsuu(int a, int b){ int x, y, q, w, e; cout << a + (a-(a / 2 +1))<<endl; for(q = 1;q <= a; q++){ for( w = 1; w <= a / 2 +1;w++){ cout << '+'; } for( w = a/ 2+2; w <= a; w++){ cout << '-'; } cout << endl; } } int main(){ int t; cin >> t; while(t--){ int a, b, c, d, e, f; cin >> a >> b; if(a == b){ tentsuu(a, b); } if(a > b){ nemeh(a, b); } if(a < b){ hasah(a, b); } } return 0; }

Compilation message (stderr)

stones.cpp: In function 'void nemeh(int, int)':
stones.cpp:9:10: warning: unused variable 'x' [-Wunused-variable]
    9 |      int x, y, q, w, e;
      |          ^
stones.cpp:9:13: warning: unused variable 'y' [-Wunused-variable]
    9 |      int x, y, q, w, e;
      |             ^
stones.cpp:9:22: warning: unused variable 'e' [-Wunused-variable]
    9 |      int x, y, q, w, e;
      |                      ^
stones.cpp: In function 'void hasah(int, int)':
stones.cpp:22:10: warning: unused variable 'x' [-Wunused-variable]
   22 |      int x, y, q, w, e;
      |          ^
stones.cpp:22:13: warning: unused variable 'y' [-Wunused-variable]
   22 |      int x, y, q, w, e;
      |             ^
stones.cpp:22:22: warning: unused variable 'e' [-Wunused-variable]
   22 |      int x, y, q, w, e;
      |                      ^
stones.cpp: In function 'void tentsuu(int, int)':
stones.cpp:38:10: warning: unused variable 'x' [-Wunused-variable]
   38 |      int x, y, q, w, e;
      |          ^
stones.cpp:38:13: warning: unused variable 'y' [-Wunused-variable]
   38 |      int x, y, q, w, e;
      |             ^
stones.cpp:38:22: warning: unused variable 'e' [-Wunused-variable]
   38 |      int x, y, q, w, e;
      |                      ^
stones.cpp: In function 'int main()':
stones.cpp:54:17: warning: unused variable 'c' [-Wunused-variable]
   54 |       int a, b, c, d, e, f;
      |                 ^
stones.cpp:54:20: warning: unused variable 'd' [-Wunused-variable]
   54 |       int a, b, c, d, e, f;
      |                    ^
stones.cpp:54:23: warning: unused variable 'e' [-Wunused-variable]
   54 |       int a, b, c, d, e, f;
      |                       ^
stones.cpp:54:26: warning: unused variable 'f' [-Wunused-variable]
   54 |       int a, b, c, d, e, f;
      |                          ^
#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...