結果
問題 |
No.547 未知の言語
|
ユーザー |
![]() |
提出日時 | 2017-08-26 15:45:31 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 699 bytes |
コンパイル時間 | 742 ms |
コンパイル使用メモリ | 64,764 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-26 02:39:43 |
合計ジャッジ時間 | 2,133 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 33 |
ソースコード
#include <iostream> #include <vector> #include <string> #include <sstream> std::string readline() { std::string str; getline(std::cin, str); return str; } std::vector<std::string> split(const std::string &str, char sep) { std::vector<std::string> v; std::stringstream ss(str); std::string buffer; while (std::getline(ss, buffer, sep)) { v.push_back(buffer); } return v; } int main() { int N; std::cin >> N; std::cin.ignore(); auto S = split(readline(), ' '); auto T = split(readline(), ' '); for (int i = 0; i < N; i++) { if (S[i] != T[i]) { std::cout << i+1 << std::endl; std::cout << S[i] << std::endl; std::cout << T[i] << std::endl; break; } } return 0; }