結果
| 問題 | No.693 square1001 and Permutation 2 |
| コンテスト | |
| ユーザー |
Imperi_Night
|
| 提出日時 | 2018-08-14 02:12:29 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 287 bytes |
| 記録 | |
| コンパイル時間 | 245 ms |
| コンパイル使用メモリ | 67,704 KB |
| 実行使用メモリ | 7,976 KB |
| 最終ジャッジ日時 | 2026-04-11 14:56:56 |
| 合計ジャッジ時間 | 967 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 9 |
ソースコード
#include <cstdio>
#include <vector>
#include <cmath>
using namespace std;
int main() {
int N;
int sum = 0;
scanf("%d", &N);
vector <int> a(N);
for (int i = 0; i<N; i++) {
scanf("%d", &a[i]);
sum += a[i];
}
sum = abs(sum - (N*(N + 1) / 2));
printf("%d/n", sum);
return 0;
}
Imperi_Night