QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#422394 | #8724. September | Physics212303 | 0 | 1ms | 4252kb | C++17 | 653b | 2024-05-27 13:39:51 | 2024-05-27 13:39:51 |
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));
vector v(m,vector<bool>(n));
for(int i=0;i<m;i++)
for(int j=1;j<n;j++)
g[i][f[j]].emplace(j);
vector<double> a(m);
for(int i=0;i<n-1;i++){
bool b=true;
for(int j=0;j<m;j++){
int x=s[j][i];
v[j][x]=true,a[j]+=sin(x);
if(g[j][x].empty()){
while(x&&v[j][x]&&g[j][x].empty())
g[j][f[x]].erase(x),x=f[x];
}
else b=false;
}
for(int j=1;j<m&&b;j++)
b&=a[j]==a[j-1];
c+=b;
}
return c;
}
详细
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 11
Accepted
time: 0ms
memory: 4212kb
input:
txy4h26c1rm1uv8tr3eonahd67u8h56x 4 7 1 0 0 2 3 3 5 1 6 4 3 5 2 10 1 0 1 2 0 3 0 5 4 8 9 7 6 8 4 5 3 2 1 7 1 0 0 0 1 3 0 2 4 1 6 5 3 6 1 0 0 1 1 3 4 5 2 3 1
output:
7ckgnn4wyi495puj3ibqf81dqvapyv6b 5 9 6 5
result:
ok 5 lines
Test #2:
score: 0
Accepted
time: 0ms
memory: 4208kb
input:
txy4h26c1rm1uv8tr3eonahd67u8h56x 4 7 1 0 1 0 2 4 0 3 6 5 2 4 1 10 1 0 0 0 0 2 1 3 3 6 5 9 6 4 7 2 3 8 1 7 1 0 0 2 0 2 2 3 5 6 2 1 4 6 1 0 0 1 2 0 3 4 2 1 5
output:
7ckgnn4wyi495puj3ibqf81dqvapyv6b 5 8 6 5
result:
ok 5 lines
Test #3:
score: 0
Accepted
time: 0ms
memory: 3932kb
input:
txy4h26c1rm1uv8tr3eonahd67u8h56x 4 7 1 0 0 1 3 4 5 6 2 5 4 3 1 10 1 0 0 2 3 4 4 6 7 8 5 9 1 8 7 6 3 4 2 7 1 0 1 1 3 4 4 2 6 5 4 3 1 6 1 0 1 2 2 3 3 5 4 1 2
output:
7ckgnn4wyi495puj3ibqf81dqvapyv6b 6 8 6 3
result:
ok 5 lines
Test #4:
score: -11
Wrong Answer
time: 0ms
memory: 4156kb
input:
txy4h26c1rm1uv8tr3eonahd67u8h56x 4 7 1 0 0 1 2 4 4 6 5 4 1 3 2 10 1 0 1 2 3 4 5 6 7 7 8 9 7 5 6 2 4 3 1 7 1 0 1 2 2 4 5 3 6 4 5 1 2 6 1 0 0 1 2 4 5 4 2 3 1
output:
7ckgnn4wyi495puj3ibqf81dqvapyv6b 5 7 4 5
result:
wrong answer 3rd lines differ - expected: '6', found: '7'
Subtask #2:
score: 0
Skipped
Dependency #1:
0%
Subtask #3:
score: 0
Wrong Answer
Test #17:
score: 5
Accepted
time: 1ms
memory: 4124kb
input:
txy4h26c1rm1uv8tr3eonahd67u8h56x 53 10 1 0 1 2 3 4 5 6 7 8 9 8 7 6 5 4 3 2 1 10 1 0 1 2 3 4 5 6 7 8 9 7 8 5 6 4 3 2 1 10 1 0 1 2 3 4 5 6 7 8 8 9 7 5 6 3 2 4 1 10 1 0 1 2 3 4 5 6 7 8 8 9 6 7 5 4 3 2 1 10 1 0 1 2 3 4 5 6 7 8 8 9 7 5 6 3 4 2 1 10 1 0 1 2 3 4 5 6 7 8 9 8 7 6 5 4 2 3 1 10 1 0 1 2 3 4 5 6...
output:
7ckgnn4wyi495puj3ibqf81dqvapyv6b 9 7 5 7 6 8 6 8 7 6 4 5 8 6 9 7 7 6 8 7 30 29 24 20 22 59 567 58 33 25 30 37 34 7 3 8 4 8 7 6 4 5 7 6 6 8 4 6 5 7 6 9 6
result:
ok 54 lines
Test #18:
score: -5
Wrong Answer
time: 1ms
memory: 4252kb
input:
txy4h26c1rm1uv8tr3eonahd67u8h56x 53 10 1 0 1 2 3 4 5 6 7 8 9 8 7 6 5 4 2 3 1 10 1 0 1 2 3 4 5 6 7 8 8 9 7 6 5 4 3 2 1 10 1 0 1 2 3 4 5 6 7 8 8 9 5 7 6 3 1 2 4 10 1 0 1 2 3 4 5 6 7 8 9 7 8 6 5 4 3 1 2 10 1 0 1 2 3 4 5 6 7 8 8 9 7 6 5 4 3 2 1 10 1 0 1 2 3 4 5 6 7 8 9 8 6 7 3 4 5 1 2 10 1 0 1 2 3 4 5 6...
output:
7ckgnn4wyi495puj3ibqf81dqvapyv6b 8 8 4 7 8 5 6 3 7 7 8 6 9 6 5 8 7 3 6 5 35 34 25 11 31 9 444 67 15 28 32 13 31 5 7 8 8 8 7 7 8 8 4 7 7 6 4 7 7 4 6 5 8
result:
wrong answer 4th lines differ - expected: '3', found: '4'
Subtask #4:
score: 0
Skipped
Dependency #1:
0%
Subtask #5:
score: 0
Skipped
Dependency #3:
0%
Subtask #6:
score: 0
Skipped
Dependency #1:
0%
Subtask #7:
score: 0
Skipped
Dependency #3:
0%
Subtask #8:
score: 0
Skipped
Dependency #1:
0%
Subtask #9:
score: 0
Skipped
Dependency #3:
0%
Subtask #10:
score: 0
Skipped
Dependency #1:
0%