Submission #57737660


Source Code Expand

Copy
#include<bits/stdc++.h>
using namespace std;
int s[3];
char t1[10],t2[10],t3[10];
int main() {
scanf("%s%s%s",t1,t2,t3);
if(t1[0]=='>') ++s[0]; else ++s[1];
if(t2[0]=='>') ++s[0]; else ++s[2];
if(t3[0]=='>') ++s[1]; else ++s[2];
if(s[0]==1) puts("A");
else if(s[1]==1) puts("B");
else puts("C");
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#include<bits/stdc++.h>
using namespace std;
int s[3];
char t1[10],t2[10],t3[10];
int main() {
	scanf("%s%s%s",t1,t2,t3);
	if(t1[0]=='>') ++s[0]; else ++s[1];
	if(t2[0]=='>') ++s[0]; else ++s[2];
	if(t3[0]=='>') ++s[1]; else ++s[2];
	if(s[0]==1) puts("A");
	else if(s[1]==1) puts("B");
	else puts("C");
} 

Submission Info

Submission Time
Task A - Jiro
User zhangtj
Language C++ 20 (gcc 12.2)
Score 150
Code Size 317 Byte
Status AC
Exec Time 1 ms
Memory 3800 KB

Compile Error

Main.cpp: In function ‘int main()’:
Main.cpp:6:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |         scanf("%s%s%s",t1,t2,t3);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 150 / 150
Status
AC × 2
AC × 6
Set Name Test Cases
Sample 00_sample_01.txt, 00_sample_02.txt
All 00_sample_01.txt, 00_sample_02.txt, 01_test_01.txt, 01_test_02.txt, 01_test_03.txt, 01_test_04.txt
Case Name Status Exec Time Memory
00_sample_01.txt AC 1 ms 3800 KB
00_sample_02.txt AC 1 ms 3696 KB
01_test_01.txt AC 1 ms 3588 KB
01_test_02.txt AC 1 ms 3620 KB
01_test_03.txt AC 1 ms 3712 KB
01_test_04.txt AC 1 ms 3632 KB


2025-03-05 (Wed)
20:46:25 +00:00