QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#318179 | #3558. Constellation 3 | toj | Compile Error | / | / | C++17 | 844b | 2024-01-30 17:45:23 | 2024-01-30 17:45:24 |
Judging History
This is the latest submission verdict.
- [2024-01-30 17:45:24]
- Judged
- Verdict: Compile Error
- Time: 0ms
- Memory: 0kb
- [2024-01-30 17:45:23]
- Submitted
answer
// S2OJ Submission #1190 @ 1706607922946
#include <bits/stdc++.h>
#define int long long
using namespace std;
const int N = 2e5 + 1;
int n, m;
vector<int> z[N];
vector<pair<int, int>> st[N];
struct Bcj {
int fa[N];
for (int i = 1; i <= n; ++i) fa[i] = i;
int find(int x) {return x == fa[x] ? x : find(fa[x]);}
};
struct Szsz {
#define lowbit(i) i & -i
int t[N];
int sum(int i) {
int ans = 0;
for (; i; i -= lowbit(i)) ans += t[i];
return ans;
}
void add(int i, int x) {
for (; i <= n; i += lowbit(i)) t[i] += x;
}
};
signed main() {
cin >> n;
for (int i = 1; i <= n; ++i) {
int a; cin >> a;
z[a].push_back(i);
}
cin >> m;
for (int i = 1; i <= m; ++i) {
int x, y, c; cin >> x >> y >> c;
st[y].push_back(make_pair(x, c));
}
Szsz cost;
Bcj L, R;
return 0;
}
Details
answer.code:13:10: error: expected unqualified-id before ‘for’ 13 | for (int i = 1; i <= n; ++i) fa[i] = i; | ^~~ answer.code:13:26: error: ‘i’ does not name a type 13 | for (int i = 1; i <= n; ++i) fa[i] = i; | ^ answer.code:13:34: error: expected unqualified-id before ‘++’ token 13 | for (int i = 1; i <= n; ++i) fa[i] = i; | ^~