結果

問題 No.547 未知の言語
ユーザー Ronlynes
提出日時 2017-07-28 22:26:28
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 687 bytes
コンパイル時間 595 ms
コンパイル使用メモリ 68,452 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-26 02:11:41
合計ジャッジ時間 1,421 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <string>
#include <queue>
#include <vector>
#include <map>
#include <set>
using namespace std;

int main(void){
    int n;
    int ans;
    string s1[20], s2[20];
    cin >> n;
    for(int i=0;i<n;i++){
        cin >> s1[i];
    }
    for(int i=0;i<n;i++){
        cin >> s2[i];
    }
    
    for(int i=0;i<n;i++){
        if(s1[i].length() != s2[i].length()){
            ans = i;
        }else{
            for(int j=0;j<s1[i].length();j++){
                if(s1[i][j] != s2[i][j]){
                    ans = i;
                }
            }
        }
    }
    cout << s1[ans] << endl;
    cout << s2[ans] << endl;
    return 0;
}
0