Submission #36414620


Source Code Expand

#include<stdio.h>
int main(){
  int n,h=1,i,j,u[550]={};
  char s[]={"HDCS"},t[]={"A23456789TJQK"};
  scanf("%d",&n);
  while(n--){
    scanf(" %c%c",&s[4],&t[13]);
    for(i=0;s[i]!=s[4 ];i++);
    for(j=0;t[j]!=t[13];j++);
    if(i==4||j==13)h=0;
    if(u[i*100+j])h=0;
    u[i*100+j]=1;
    //printf("%d\n",h);
  }
  printf("%s\n",h?"Yes":"No");
  return 0;
}

Submission Info

Submission Time
Task B - Playing Cards Validation
User yuiop
Language C (GCC 9.2.1)
Score 200
Code Size 380 Byte
Status AC
Exec Time 6 ms
Memory 1660 KiB

Compile Error

./Main.c: In function ‘main’:
./Main.c:5:3: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
    5 |   scanf("%d",&n);
      |   ^~~~~~~~~~~~~~
./Main.c:7:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
    7 |     scanf(" %c%c",&s[4],&t[13]);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 4
AC × 19
Set Name Test Cases
Sample example0.txt, example1.txt, example2.txt, example3.txt
All example0.txt, example1.txt, example2.txt, example3.txt, max0.txt, random0.txt, random1.txt, random10.txt, random11.txt, random12.txt, random13.txt, random2.txt, random3.txt, random4.txt, random5.txt, random6.txt, random7.txt, random8.txt, random9.txt
Case Name Status Exec Time Memory
example0.txt AC 6 ms 1616 KiB
example1.txt AC 1 ms 1604 KiB
example2.txt AC 1 ms 1488 KiB
example3.txt AC 2 ms 1584 KiB
max0.txt AC 1 ms 1656 KiB
random0.txt AC 1 ms 1492 KiB
random1.txt AC 1 ms 1656 KiB
random10.txt AC 3 ms 1660 KiB
random11.txt AC 1 ms 1604 KiB
random12.txt AC 1 ms 1492 KiB
random13.txt AC 1 ms 1592 KiB
random2.txt AC 1 ms 1560 KiB
random3.txt AC 1 ms 1592 KiB
random4.txt AC 1 ms 1616 KiB
random5.txt AC 1 ms 1552 KiB
random6.txt AC 1 ms 1596 KiB
random7.txt AC 1 ms 1600 KiB
random8.txt AC 1 ms 1596 KiB
random9.txt AC 1 ms 1488 KiB