QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#139599 | #2051. Count The Ones | As3b_team_f_masr# | AC ✓ | 1ms | 3616kb | C++14 | 1.0kb | 2023-08-14 01:02:17 | 2023-08-14 01:02:18 |
Judging History
answer
#include <bits/stdc++.h>
#define F first
#define S second
#define ld long double
#define EPS 1e-9
using namespace std;
typedef long long ll;
const int N = 10000;
int a[N];
int main ()
{
//ios::sync_with_stdio(false);
//cin.tie(0);
//cout.tie(0);
//freopen("wigz.in","r",stdin);
/*int n;
cin >> n;
for(int i = 1; i <= n ;++i) a[i] = i;
do{
int ok = 1;
for(int i = 2; i <= n ;++i){
int mn = min(a[i],a[i-1]);
int mx = max(a[i],a[i-1]);
ok &= (mx%mn == 0);
}
if(ok)
{
for(int i = 1; i <= n ;++i) cout << a[i] << ' ';
cout << "\ntmm";
return 0;
}
}while(next_permutation(a+1,a+n+1));
if(n == 1) cout << 1 ;
else if(n == 2) cout << "1 2";
else if(n == 3) cout << "3 1 2";
else if(n == 4) cout << "3 1 2 4";
else if(n == 6) cout << "5 1 4 2 6 3";
else cout << -1;
*/
int a,b,c;
cin >> a >> b >> c;
cout << b - c + 1;
return(0);
}
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 3444kb
input:
3 2 1
output:
2
result:
ok answer is '2'
Test #2:
score: 0
Accepted
time: 1ms
memory: 3512kb
input:
10 9 1
output:
9
result:
ok answer is '9'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
1000000000 999999999 1
output:
999999999
result:
ok answer is '999999999'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3396kb
input:
6 3 2
output:
2
result:
ok answer is '2'
Test #5:
score: 0
Accepted
time: 1ms
memory: 3608kb
input:
100 10 5
output:
6
result:
ok answer is '6'
Test #6:
score: 0
Accepted
time: 1ms
memory: 3424kb
input:
100 99 98
output:
2
result:
ok answer is '2'
Test #7:
score: 0
Accepted
time: 1ms
memory: 3612kb
input:
1000000000 999999999 999999998
output:
2
result:
ok answer is '2'
Test #8:
score: 0
Accepted
time: 1ms
memory: 3392kb
input:
15 10 5
output:
6
result:
ok answer is '6'
Test #9:
score: 0
Accepted
time: 1ms
memory: 3404kb
input:
1000 500 100
output:
401
result:
ok answer is '401'
Test #10:
score: 0
Accepted
time: 1ms
memory: 3396kb
input:
1000000000 999999999 100
output:
999999900
result:
ok answer is '999999900'