結果

問題 No.547 未知の言語
ユーザー かにかに
提出日時 2017-12-17 00:35:40
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 654 bytes
コンパイル時間 2,047 ms
コンパイル使用メモリ 204,008 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-08 09:51:48
合計ジャッジ時間 3,333 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: 関数 ‘int main()’ 内:
main.cpp:22:12: 警告: ‘n’ is used uninitialized [-Wuninitialized]
   22 |     rep(i,2*n){
      |            ^
main.cpp:20:9: 備考: ‘n’ はここで定義されています
   20 |     int n;
      |         ^

ソースコード

diff #

#include "bits/stdc++.h"

#define rep(a,b) for(int a = 0;a < b;a++)
#define REP(i, x, n) for(int i = x; i < n; i++)
#define P(a) cout << a << endl
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
int dx[] = { 1, -1 , 0 , 0 };
int dy[] = { 0,  0,  1, -1 };
ll MOD = 1000000007;
unsigned long long str_to_int(std::string str) {
  unsigned long long ret;
  std::stringstream ss; ss << str;
  ss >> ret;
  return ret;
}

int main() {
    int n;
    vector<string> v;
    rep(i,2*n){
    	string tmp;
	cin >> tmp;
	v.push_back(tmp);
    }
    rep(i,n){
    	if(v[i] != v[i+n]){
	    printf("%d\n%s\n%s\n",i+1,v[i],v[i+n]);
	}
    }
}
0