# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|
2272 | | ldj5098 | 개미 (GA4_ant) | C++98 | | 167 ms | 5280 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<iostream>
#include<stdio.h>
int d[1000001];
using namespace std;
int main()
{
int i, j, a, b, c, t, f;
long long n;
cin >> n;
for(i=1;i<=n;i++){
cin >> a >> b >> c;
d[1]=a*a;
d[2]=b*b;
d[3]=c*c;
t=d[1]+d[2]+d[3];
for(j=1;j<=3;j++){
if(d[j]>d[j+1])d[j+1]=d[j];
}
f=d[3];
for(j=2;j>=1;j--){
f=f-d[j];
}
}
cout << f+t << endl;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |