結果
| 問題 |
No.547 未知の言語
|
| コンテスト | |
| ユーザー |
ats5515
|
| 提出日時 | 2017-07-28 22:25:55 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 489 bytes |
| コンパイル時間 | 530 ms |
| コンパイル使用メモリ | 66,272 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-26 02:11:04 |
| 合計ジャッジ時間 | 1,427 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 33 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:26:25: warning: ‘res’ may be used uninitialized in this function [-Wmaybe-uninitialized]
26 | cout << (res + 1) << endl;
| ^
ソースコード
#include <algorithm>
#include <cstdlib>
#include <iostream>
#include <vector>
#include <math.h>
using namespace std;
#define int long long
signed main() {
int N;
cin >> N;
vector<string> s(N);
vector<string> t(N);
for (int i = 0; i < N; i++) {
cin >> s[i];
}
for (int i = 0; i < N; i++) {
cin >> t[i];
}
int res;
for (int i = 0; i < N; i++) {
if (s[i] != t[i]) {
res = i;
}
}
cout << (res + 1) << endl;
cout << s[res] << endl;
cout << t[res] << endl;
return 0;
}
ats5515