結果
問題 |
No.547 未知の言語
|
ユーザー |
![]() |
提出日時 | 2019-09-05 21:19:56 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 311 bytes |
コンパイル時間 | 2,097 ms |
コンパイル使用メモリ | 168,476 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-13 02:41:58 |
合計ジャッジ時間 | 2,665 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 33 |
コンパイルメッセージ
main.cpp: In function 'int main()': main.cpp:12:13: warning: 'd' may be used uninitialized [-Wmaybe-uninitialized] 12 | cout<<d+1<<endl; | ^ main.cpp:5:15: note: 'd' was declared here 5 | int n,c=0,d; | ^
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int n,c=0,d; cin>>n; string s[n]; string t[n]; for(int i=0;i<n;i++)cin>>s[i]; for(int i=0;i<n;i++)cin>>t[i]; for(int i=0;i<n;i++)if(s[i]!=t[i])d=i; cout<<d+1<<endl; cout<<s[d]<<" "<<endl; cout<<t[d]<<" "<<endl; }