Submission #3410006


Source Code Expand

#include<stdio.h>
int main()
{
    long A,B,C,D,area1,area2;
    scanf("%ld%ld%ld%ld",A,B,C,D);
    area1 = A*B;
    area2 = C*D;
    if (area1 == area2)
	{
		printf("%ld\n",area1);
		}
    else if (area1>area2)
	{
		printf("%ld\n",area1);
		}
    else if (area1<area2) 
        {
        printf("%ld\n",area2);
        }
	return 0;
}

Submission Info

Submission Time
Task A - Two Rectangles
User vjudge3
Language C++14 (GCC 5.4.1)
Score 0
Code Size 334 Byte
Status RE
Exec Time 100 ms
Memory 128 KB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:5:33: warning: format ‘%ld’ expects argument of type ‘long int*’, but argument 2 has type ‘long int’ [-Wformat=]
     scanf("%ld%ld%ld%ld",A,B,C,D);
                                 ^
./Main.cpp:5:33: warning: format ‘%ld’ expects argument of type ‘long int*’, but argument 3 has type ‘long int’ [-Wformat=]
./Main.cpp:5:33: warning: format ‘%ld’ expects argument of type ‘long int*’, but argument 4 has type ‘long int’ [-Wformat=]
./Main.cpp:5:33: warning: format ‘%ld’ expects argument of type ‘long int*’, but argument 5 has type ‘long int’ [-Wformat=]
./Main.cpp:5:34: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%ld%ld%ld%ld",A,B,C,D);
                                  ^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 100
Status
RE × 2
RE × 10
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All sample_01.txt, sample_02.txt, subtask_1_abmax_01.txt, subtask_1_allmax_01.txt, subtask_1_cdmax_01.txt, subtask_1_rand_01.txt, subtask_1_rand_02.txt, subtask_1_rand_03.txt, subtask_1_same_01.txt, subtask_1_same_02.txt
Case Name Status Exec Time Memory
sample_01.txt RE 100 ms 128 KB
sample_02.txt RE 97 ms 128 KB
subtask_1_abmax_01.txt RE 98 ms 128 KB
subtask_1_allmax_01.txt RE 99 ms 128 KB
subtask_1_cdmax_01.txt RE 100 ms 128 KB
subtask_1_rand_01.txt RE 98 ms 128 KB
subtask_1_rand_02.txt RE 99 ms 128 KB
subtask_1_rand_03.txt RE 98 ms 128 KB
subtask_1_same_01.txt RE 100 ms 128 KB
subtask_1_same_02.txt RE 97 ms 128 KB