QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#536935 | #3721. Simple Algebra | sudoku | AC ✓ | 305ms | 3680kb | C++17 | 631b | 2024-08-29 18:09:50 | 2024-08-29 18:09:50 |
Judging History
answer
#include <iostream>
#include <vector>
#include <string>
#include <string.h>
#include <queue>
#include <bitset>
#include<numeric>
#include <unordered_map>
#include <iomanip>
#include <map>
#include <stack>
#include <set>
#include <algorithm>
#include <math.h>
using namespace std;
int main()
{
int a,b,c;
while(~scanf("%d%d%d",&a,&b,&c))
{
int ans = 1000000000;
for(int x=-100;x<=100;x++)
for(int y=-100;y<=100;y++)
ans = min(ans, a*x*x+b*x*y+c*y*y);
if(ans<0) puts("No");
else puts("Yes");
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 305ms
memory: 3680kb
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