結果

問題 No.547 未知の言語
ユーザー miskatonic17
提出日時 2017-08-18 18:23:45
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 467 bytes
コンパイル時間 731 ms
コンパイル使用メモリ 71,856 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-26 02:38:24
合計ジャッジ時間 1,746 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main() {
	int n;
	cin >> n;

	vector<string> v1;
	vector<string> v2;
	string tmp;

	for (auto i = 0; i < n; i++) {
		cin >> tmp;
		v1.push_back(tmp);
	}
	for (auto i = 0; i < n; i++) {
		cin >> tmp;
		v2.push_back(tmp);
	}

	int i;
	for (i = 0; i < n; i++) {
		if (v1.at(i) != v2.at(i)) {
			break;
		}
	}
	cout << i + 1 << endl;
	cout << v1.at(i) << endl;
	cout << v2.at(i) << endl;
}
0