QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#422380 | #8724. September | Physics212303 | Compile Error | / | / | C++17 | 672b | 2024-05-27 13:28:12 | 2024-05-27 13:28:12 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int solve(int n,int m,vector<int> f,vector<vector<int> > s){
int c=0;
vector g(m,vector<set<int> >(n));
for(int i=0;i<m;i++)
vector<set<int> > v(m);
for(int j=1;j<n;j++)
g[i][f[j]].emplace(j),v[i].emplace(f[j]);
vector<double> a(m);
for(int i=0;i<n-1;i++){
bool b=true;
for(int j=0;j<m;j++){
a[j]+=sin(s[j][i]);
g[j][f[s[j][i]]].erase(s[j][i]);
if(g[j][f[s[j][i]]].empty())
v[j].erase(f[s[j][i]]);
if(!g[j][s[j][i]].empty())b=false;
b&=v[j].empty();
}
for(int j=1;j<m&&b;j++)
b&=a[j]==a[j-1];
c+=b;
}
return c;
}
詳細信息
answer.code: In function ‘int solve(int, int, std::vector<int>, std::vector<std::vector<int> >)’: answer.code:9:9: error: ‘i’ was not declared in this scope 9 | g[i][f[j]].emplace(j),v[i].emplace(f[j]); | ^ answer.code:9:29: error: ‘v’ was not declared in this scope 9 | g[i][f[j]].emplace(j),v[i].emplace(f[j]); | ^ answer.code:17:9: error: ‘v’ was not declared in this scope 17 | v[j].erase(f[s[j][i]]); | ^ answer.code:19:10: error: ‘v’ was not declared in this scope 19 | b&=v[j].empty(); | ^