QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#374397 | #3721. Simple Algebra | 秦始皇派蒙恬还原神舟十二 (Jiancong Wen, Chu Jin, Zekai Zhang) | AC ✓ | 3ms | 3568kb | C++17 | 525b | 2024-04-02 14:01:16 | 2024-04-02 14:01:17 |
Judging History
answer
#include<iostream>
#include<string.h>
#include<stdio.h>
#include<map>
#include<vector>
#include<queue>
#include<stack>
#include<unordered_map>
#include<algorithm>
#define int long long
using namespace std;
signed main(){
ios::sync_with_stdio(false);
cin.tie();
cout.tie();
int a,b,c;
while(cin>>a){
cin>>b>>c;
if(a==0){
if(b==0 && c>=0) cout<<"Yes\n";
else cout<<"No\n";
}
else if(a<0) cout<<"No\n";
else{
int oo=(b*b-4*a*c);
if(oo<=0) cout<<"Yes\n";
else cout<<"No\n";
}
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 3ms
memory: 3568kb
input:
-10 -10 -10 -10 -10 -9 -10 -10 -8 -10 -10 -7 -10 -10 -6 -10 -10 -5 -10 -10 -4 -10 -10 -3 -10 -10 -2 -10 -10 -1 -10 -10 0 -10 -10 1 -10 -10 2 -10 -10 3 -10 -10 4 -10 -10 5 -10 -10 6 -10 -10 7 -10 -10 8 -10 -10 9 -10 -10 10 -10 -9 -10 -10 -9 -9 -10 -9 -8 -10 -9 -7 -10 -9 -6 -10 -9 -5 -10 -9 -4 -10 -9 ...
output:
No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No ...
result:
ok