QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#405222 | #6748. Spin the Wheel | qzuser | Compile Error | / | / | C++17 | 459b | 2024-05-05 14:09:26 | 2024-05-05 14:09:28 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define int long long
const int N = 1e5 + 10;
int a[N];
signed main()
{
int n;
cin >> n;
for (int i = 1; i <= n; i ++) cin >> a[i];
int p = ((a[2] + n - a[1]) % n) % n;
for (int i = 2; i < n; i ++)
{
if ((a[i] + p) % mod != a[i + 1])
{
cout << "-1\n";
return;
}
}
cout << d + (a[1] != 0) << endl;
return 0;
}
詳細信息
answer.code: In function ‘int main()’: answer.code:14:26: error: ‘mod’ was not declared in this scope; did you mean ‘modf’? 14 | if ((a[i] + p) % mod != a[i + 1]) | ^~~ | modf answer.code:17:13: error: return-statement with no value, in function returning ‘int’ [-fpermissive] 17 | return; | ^~~~~~ answer.code:20:13: error: ‘d’ was not declared in this scope 20 | cout << d + (a[1] != 0) << endl; | ^