結果
| 問題 |
No.1468 Colourful Pastel
|
| ユーザー |
|
| 提出日時 | 2021-04-12 18:09:24 |
| 言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 44 ms / 1,000 ms |
| コード長 | 401 bytes |
| コンパイル時間 | 964 ms |
| コンパイル使用メモリ | 124,288 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2024-06-28 15:00:24 |
| 合計ジャッジ時間 | 2,392 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 |
ソースコード
#include <stdio.h>
#include <iostream>
#include <queue>
#include <string>
using namespace std;
int main() {
int N; cin >> N;
queue<string> Q;
for (int i = 0; i < N; i++) {
string S; cin >> S;
Q.push(S);
}
for (int i = 0; i < N - 1; i++) {
string S; cin >> S;
if (Q.front() != S) {
break;
}
Q.pop();
}
cout << Q.front() << endl;
return 0;
}