結果

問題 No.547 未知の言語
ユーザー dgd1724
提出日時 2017-08-03 06:46:53
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 476 bytes
コンパイル時間 733 ms
コンパイル使用メモリ 62,624 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-26 02:26:36
合計ジャッジ時間 1,444 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:2:19: warning: extra tokens at end of #include directive
    2 | #include <fstream>>
      |                   ^

ソースコード

diff #

#include <iostream>
#include <fstream>>
#include <vector>
#include <string>

int main(void) {

	//std::ifstream inf("Text.txt");	std::cin.rdbuf(inf.rdbuf());

	int N = 0;
	std::cin >> N;
	
	std::vector<std::string> S(N), T(N);
	for (int i = 0; i < N; i++) {
		std::cin >> S[i];
	}
	for (int i = 0; i < N; i++) {
		std::cin >> T[i];
	}

	int ans = 0;
	while (S[ans] == T[ans]) {
		ans++;
	}

	std::cout << ans + 1 << "\n" << S[ans] << "\n" << T[ans] << std::endl;

	return 0;
}
0