結果

問題 No.547 未知の言語
ユーザー Toshihiko Yanase
提出日時 2018-05-01 14:28:29
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 506 bytes
コンパイル時間 552 ms
コンパイル使用メモリ 62,756 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-28 00:09:29
合計ジャッジ時間 1,482 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;


int main() {
  std::cin.tie(0);
  std::ios::sync_with_stdio(false);

  int N;
  cin >> N;
  vector<string> S(N);
  vector<string> T(N);
  for(int i=0;i<N;i++){
    cin >> S.at(i);
  }
  for(int i=0;i<N;i++){
    cin >> T.at(i);
  }
  int ans = 0;
  for(int i=0;i<N;i++){
    if(S.at(i) != T.at(i)){
      ans=i;
    }
  }

  cout << ans + 1 << endl;
  cout << S.at(ans) << endl;
  cout << T.at(ans) << endl;

  return 0;
}
0