QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#669486 | #7062. Prince and Princess | sw7777 | WA | 0ms | 3720kb | C++20 | 1.3kb | 2024-10-23 18:45:43 | 2024-10-23 18:45:44 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define int long long
#define double long double
double eps = 1e-8;
class Point
{
public:
double x,y;
Point(double x=0,double y=0):x(x),y(y){}
double operator ^(const Point &b)const{
return x*b.y - b.x*y;
}
double operator *(const Point &b)const{
return x*b.x+y*b.y;
}
Point operator - (Point p){
return Point(x - p.x , y - p.y);
}
bool operator == (const Point &p) const{
return fabs(x - p.x)<1e-10&&fabs(y-p.y)<1e-10;
}
}p[3];
typedef Point Vector;
double cross(Vector a,Vector b){
return fabs(a.x*b.y - a.y*b.x);
}
int dcmp(double x){
if(fabs(x)<eps) return 0;
else return x<0?-1:1;
}
bool onseg(Point p1,Point p2,Point q){
return dcmp((p1 - q) ^ (p2 - q)) == 0&&dcmp((p1 - q)*(p2 - q)) <= 0;
}
double area(Point p0,Point p1,Point p2){
double k = p0.x*p1.y + p1.x*p2.y + p2.x*p0.y - p1.x*p0.y - p2.x*p1.y - p0.x*p2.y;
return fabs(k/2);
}
void solve(){
int a,b,c;
cin>>a>>b>>c;
if(a>(b+c)){
cout<<"YES"<<endl;
cout<<2*(b+c)+1<<endl;
}else{
cout<<"NO"<<endl;
}
}
signed main(){
ios::sync_with_stdio(0);
cin.tie(0);cout.tie(0);
int t=1;
// cin>>t;
while(t -- ){
solve();
}
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3664kb
input:
2 0 0
output:
YES 1
result:
ok 2 lines
Test #2:
score: 0
Accepted
time: 0ms
memory: 3588kb
input:
1 1 0
output:
NO
result:
ok single line: 'NO'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3592kb
input:
89586 69086 24655
output:
NO
result:
ok single line: 'NO'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
158180 57864 93937
output:
YES 303603
result:
ok 2 lines
Test #5:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
51497 19791 57294
output:
NO
result:
ok single line: 'NO'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
37924 72502 88364
output:
NO
result:
ok single line: 'NO'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
38506 50719 9243
output:
NO
result:
ok single line: 'NO'
Test #8:
score: 0
Accepted
time: 0ms
memory: 3592kb
input:
44623 66300 29302
output:
NO
result:
ok single line: 'NO'
Test #9:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
164851 97868 94938
output:
NO
result:
ok single line: 'NO'
Test #10:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
163100 62397 99567
output:
YES 323929
result:
ok 2 lines
Test #11:
score: 0
Accepted
time: 0ms
memory: 3664kb
input:
180210 69137 35332
output:
YES 208939
result:
ok 2 lines
Test #12:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
108374 4656 91320
output:
YES 191953
result:
ok 2 lines
Test #13:
score: -100
Wrong Answer
time: 0ms
memory: 3720kb
input:
1 0 0
output:
YES 1
result:
wrong answer 2nd lines differ - expected: '0', found: '1'