結果
| 問題 | No.547 未知の言語 |
| コンテスト | |
| ユーザー |
0x19f
|
| 提出日時 | 2017-07-28 22:23:34 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 467 bytes |
| 記録 | |
| コンパイル時間 | 486 ms |
| コンパイル使用メモリ | 79,404 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2026-03-12 14:44:01 |
| 合計ジャッジ時間 | 1,616 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 33 |
コンパイルメッセージ
In file included from /home/linuxbrew/.linuxbrew/Cellar/gcc/15.2.0_1/include/c++/15/ostream:42,
from /home/linuxbrew/.linuxbrew/Cellar/gcc/15.2.0_1/include/c++/15/iostream:43,
from main.cpp:1:
In member function 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>]',
inlined from 'int main()' at main.cpp:19:11:
/home/linuxbrew/.linuxbrew/Cellar/gcc/15.2.0_1/include/c++/15/bits/ostream.h:212:25: warning: 'ans' may be used uninitialized [-Wmaybe-uninitialized]
212 | { return _M_insert(__n); }
| ~~~~~~~~~^~~~~
main.cpp: In function 'int main()':
main.cpp:17:6: note: 'ans' was declared here
17 | ll ans;
| ^~~
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#define REP(i, a, n) for(ll i = ((ll) a); i < ((ll) n); i++)
#define INF 1000000000LL
#define MOD 1000000007LL
using namespace std;
typedef long long ll;
ll N;
string S[10], T[10];
int main(void) {
cin >> N;
REP(i, 0, N) cin >> S[i];
REP(i, 0, N) cin >> T[i];
ll ans;
REP(i, 0, N) if(S[i] != T[i]) ans = i + 1;
cout << ans << endl;
cout << S[ans - 1] << endl;
cout << T[ans - 1] << endl;
}
0x19f