結果
| 問題 | No.1225 I hate I hate Matrix Construction |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-09-11 21:35:00 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 880 bytes |
| 記録 | |
| コンパイル時間 | 1,966 ms |
| コンパイル使用メモリ | 195,812 KB |
| 最終ジャッジ日時 | 2025-01-14 10:09:30 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | AC * 1 WA * 34 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
int n; cin >> n;
vector<int> s(n),t(n);
bool ss=0,tt=0;
for(int i=0;i<n;i++){
cin >> s[i];
if(s[i]==2)ss=1;
}
for(int i=0;i<n;i++){
cin >> t[i];
if(t[i]==2)tt=1;
}
int res=0;
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
if(s[i]==2||t[j]==2){
res++;
cout << i << " " << j << endl;
}
else if(s[i]==0||t[j]==0){
continue;
}
else{
if(0){}
else{
res++;
cout << i << " " << j << endl;
s[i]=0; t[j]=0;
}
}
}
}
cout << res << endl;
}