結果
| 問題 |
No.1468 Colourful Pastel
|
| ユーザー |
|
| 提出日時 | 2025-02-02 14:11:12 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 569 bytes |
| コンパイル時間 | 2,209 ms |
| コンパイル使用メモリ | 162,120 KB |
| 実行使用メモリ | 7,280 KB |
| 最終ジャッジ日時 | 2025-02-02 14:11:17 |
| 合計ジャッジ時間 | 4,306 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 25 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:31:12: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
31 | freopen("homa.inp", "r", stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:32:12: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
32 | freopen("homa.out", "w", stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define pub push_back
#define el '\n'
const int mxn = 1e5+5;
int n;
string a[mxn];
void solve() {
cin >> n;
for(int i = 1; i <= n; i++) cin >> a[i];
string tmp;
for(int i = 1; i <= n; i++) {
cin >> tmp;
if (tmp == a[i]) continue;
cout << a[i];
break;
}
}
signed main() {
cin.tie(0) -> sync_with_stdio(0);
freopen("homa.inp", "r", stdin);
freopen("homa.out", "w", stdout);
int t = 1;
// cin >> t;
for (int i = 1; i <= t; i++) solve();
}