Submission #868140

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
8681402023-10-30 13:30:21heeheeheehaawRed-blue table (IZhO19_stones)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
int a[1005][1005];
int b[1005][1005];
int ra, rb;
int main()
{
int t, n, m;
cin>>t;
while(t--)
{
cin>>n>>m;
ra = 0, rb = 0;
for(int i = 1; i <= n; i++)
for(int j = 1; j <= m; j++)
a[i][j] = 0, b[i][j] = 1;
int ln = m / 2;
if(m % 2 == 0) ln--;
int lm = n / 2;
if(n % 2 == 0) lm--;
queue<pair<int, int>> q;
for(int i = 1; i <= n; i++)
if(ln > 0)
q.push({ln, i});
for(int j = 1; j <= m; j++)
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

stones.cpp: In function 'int main()':
stones.cpp:102:34: error: expected ';' before 'for'
  102 |         cout<<max(ra, rb)<<'\n';a
      |                                  ^
      |                                  ;
  103 |         for(int i = 1; i <= n; i++)
      |         ~~~                       
stones.cpp:102:33: warning: statement has no effect [-Wunused-value]
  102 |         cout<<max(ra, rb)<<'\n';a
      |                                 ^
stones.cpp:103:24: error: 'i' was not declared in this scope
  103 |         for(int i = 1; i <= n; i++)
      |                        ^