# |
제출 시각 |
아이디 |
문제 |
언어 |
결과 |
실행 시간 |
메모리 |
2275 |
2013-07-21T00:58:01 Z |
aakseen |
개미 (GA4_ant) |
C++ |
|
0 ms |
1368 KB |
#include <fstream>
using namespace std;
struct squ
{
int a, b, c, len;
};
void change(int &a, int &b)
{
int k;
if(a > b)
{
k = a;
a = b;
b = k;
}
}
int main()
{
int num, i, j;
ifstream fin("input.txt");
fin >> num;
squ *x = new squ[num];
for (i = 0; i < num; i++)
{
fin >> x[i].a >> x[i].b >> x[i].c;
change(x[i].a, x[i].b);
change(x[i].a, x[i].c);
change(x[i].b, x[i].c);
x[i].len = ((x[i].a) + (x[i].b)) * ((x[i].a) + (x[i].b)) + ((x[i].c) * (x[i].c));
}
fin.close();
ofstream fout("output.txt");
for (i = 0; i < num; i++)
fout << x[i].len << endl;
fout.close();
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
0 ms |
1368 KB |
close (syscall #3) was called by the program (disallowed syscall) |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
0 ms |
1368 KB |
close (syscall #3) was called by the program (disallowed syscall) |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
0 ms |
1368 KB |
close (syscall #3) was called by the program (disallowed syscall) |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
0 ms |
1368 KB |
close (syscall #3) was called by the program (disallowed syscall) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
0 ms |
1368 KB |
close (syscall #3) was called by the program (disallowed syscall) |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
0 ms |
1368 KB |
close (syscall #3) was called by the program (disallowed syscall) |
2 |
Halted |
0 ms |
0 KB |
- |