結果

問題 No.547 未知の言語
ユーザー 259_Momone
提出日時 2017-07-28 22:30:08
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 435 bytes
コンパイル時間 1,776 ms
コンパイル使用メモリ 162,148 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-26 02:14:38
合計ジャッジ時間 2,544 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:9:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    9 |     scanf("%lld", &N);
      |     ~~~~~^~~~~~~~~~~~

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

long long int N, i;
string s;
vector<string> S, T;

int main(){
    scanf("%lld", &N);
    for(int i = 0; i < N; ++i){
        cin >> s;
        S.push_back(s);
    }
    for(int i = 0; i < N; ++i){
        cin >> s;
        T.push_back(s);
    }
    for(int i = 0; i < N; ++i){
        if(S[i] != T[i]){cout << i + 1 << endl << S[i] << endl << T[i] << endl;break;}
    }
    return 0;
}
0