結果
問題 |
No.1225 I hate I hate Matrix Construction
|
ユーザー |
|
提出日時 | 2020-09-11 21:35:21 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 782 bytes |
コンパイル時間 | 2,659 ms |
コンパイル使用メモリ | 193,300 KB |
最終ジャッジ日時 | 2025-01-14 10:09:58 |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 WA * 12 |
ソースコード
#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++; } else if(s[i]==0||t[j]==0){ continue; } else{ if(0){} else{ res++; s[i]=0; t[j]=0; } } } } cout << res << endl; }