結果
| 問題 |
No.100 直列あみだくじ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-06-18 14:11:21 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 351 bytes |
| コンパイル時間 | 585 ms |
| コンパイル使用メモリ | 55,248 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-07 03:38:12 |
| 合計ジャッジ時間 | 1,632 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 41 WA * 4 |
ソースコード
#include <iostream>
#define REP(i,s,n) for(int i=(int)(s);i<(int)(n);i++)
using namespace std;
typedef long long int ll;
int a[101];
int main(void){
int n;
cin >> n;
int c = 0;
REP(i, 0, n) {
cin >> a[i];
}
REP(i, 0, n) {
REP(j, i + 1, n) {
c += a[i] > a[j] ? 1 : 0;
}
}
cout << (c % 2 ? "No" : "Yes") << endl;
}