結果
| 問題 |
No.547 未知の言語
|
| コンテスト | |
| ユーザー |
Microbe
|
| 提出日時 | 2017-08-07 16:28:47 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 779 bytes |
| コンパイル時間 | 1,506 ms |
| コンパイル使用メモリ | 167,848 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-26 02:29:49 |
| 合計ジャッジ時間 | 2,487 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 33 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:5:39: warning: 'n' is used uninitialized [-Wuninitialized]
5 | #define FOR(i, j, k) for(int i = j; i < k; ++i)
| ^
main.cpp:24:13: note: 'n' was declared here
24 | int n;
| ^
ソースコード
#include "bits/stdc++.h"
using namespace std;
#define FOR(i, j, k) for(int i = j; i < k; ++i)
#define rep(i, j) FOR(i, 0, j)
#define FORr(i, j, k) for(int i = j; i >= k; --i)
#define repr(i, j) FOR(i, j, 0)
#define INF INT_MAX
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
typedef pair<P, int> Pi;
const int MOD = 1000000007;
const int dy[] = { 0, 0, 1, -1 };
const int dx[] = { 1, -1, 0, 0 };
template <class T> void chmin(T& a, const T& b) { a = min(a, b); }
template <class T> void chmax(T& a, const T& b) { a = max(a, b); }
int main() {
int n;
string s[10], t[10];
rep(i, n) cin >> s[i];
rep(i, n) cin >> t[i];
rep(i, n) {
if (s[i] != t[i]) {
cout << i + 1 << endl << s[i] << endl << t[i] << endl;
break;
}
}
return 0;
}
Microbe