結果
| 問題 | 
                            No.1225 I hate I hate Matrix Construction
                             | 
                    
| コンテスト | |
| ユーザー | 
                            👑  | 
                    
| 提出日時 | 2023-06-27 21:43:07 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 343 bytes | 
| コンパイル時間 | 538 ms | 
| コンパイル使用メモリ | 67,036 KB | 
| 最終ジャッジ日時 | 2025-02-15 02:46:35 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 32 WA * 3 | 
ソースコード
#include <iostream>
using namespace std;
int main(){
  int n;cin>>n;
  int ans = 0;
  for(int i = 0; n > i; i++){
    int x;cin>>x;
    if(x == 2)ans += n;
    else if(x == 1)ans++;
  }
  int ans2 = 0;
  for(int i = 0; n > i; i++){
    int x;cin>>x;
    if(x == 2)ans2 += n;
    else if(x == 1)ans2++;
  }
  cout << max(ans, ans2) << endl;
}