結果
| 問題 | No.693 square1001 and Permutation 2 |
| コンテスト | |
| ユーザー |
m1025o1184t
|
| 提出日時 | 2019-12-09 04:19:26 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
CE
(最新)
WA
(最初)
|
| 実行時間 | - |
| コード長 | 373 bytes |
| 記録 | |
| コンパイル時間 | 262 ms |
| コンパイル使用メモリ | 7,972 KB |
| 最終ジャッジ日時 | 2026-03-04 19:46:34 |
| 合計ジャッジ時間 | 772 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
g++-15: fatal error: cannot execute '/home/linuxbrew/.linuxbrew/Cellar/gcc/15.2.0_1/bin/../libexec/gcc/x86_64-pc-linux-gnu/15/cc1plus': posix_spawn: Resource temporarily unavailable compilation terminated.
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);++i)
#define all(a) (a).begin(),(a).end()
using namespace std;
typedef long long ll;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
vector<int> A(n);
int res = 0;
rep(i, n) {
cin >> A[i];
res += A[i];
}
int ans = abs(res - n * (1 + n) / 2);
cout << ans << endl;
return 0;
}
m1025o1184t