답안 #286851

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
286851 2020-08-31T05:28:01 Z dvdg6566 Red-blue table (IZhO19_stones) C++14
0 / 100
32 ms 1404 KB
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pi;
typedef vector<ll> vi;
typedef vector<pi> vpi;
#define pb emplace_back
#define mp make_pair
#define f first
#define s second
#define SZ(x) (int)x.size()
#define ALL(x) x.begin(),x.end()
#define lb lower_bound
const int MAXN=1001;
const ll MOD=998244353;

ll A[MAXN][MAXN];
ll R,C,T;

int main(){
	ios_base::sync_with_stdio(0);cin.tie(0);
	cin>>T;
	while(T--){
		cin>>R>>C;
		assert(R%2==1&&C%2==1);

		cout<<R+C-2<<'\n';
		for(int i=0;i<C;++i)cout<<'-';cout<<'\n';
		int h=C/2;
		for(int i=1;i<R;++i){
			if(i%2==1){
				for(int k=0;k<h;++k)cout<<'+';
				cout<<'+';
				for(int k=0;k<h;++k)cout<<'-';
			}else{
				for(int k=0;k<h;++k)cout<<'-';
				cout<<'+';
				for(int k=0;k<h;++k)cout<<'+';
			}
			cout<<'\n';
		}
		// return 0;
	}	
}

Compilation message

stones.cpp: In function 'int main()':
stones.cpp:28:3: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   28 |   for(int i=0;i<C;++i)cout<<'-';cout<<'\n';
      |   ^~~
stones.cpp:28:33: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   28 |   for(int i=0;i<C;++i)cout<<'-';cout<<'\n';
      |                                 ^~~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 384 KB in the table A+B is not equal to 2
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 2 ms 512 KB Execution killed with signal 11
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 384 KB in the table A+B is not equal to 2
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 32 ms 1404 KB in the table A+B is not equal to 76
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 2 ms 512 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 384 KB in the table A+B is not equal to 2
2 Halted 0 ms 0 KB -