Submission #204463

#TimeUsernameProblemLanguageResultExecution timeMemory
20446314kg방 배정하기 (KOI17_room)C++11
100 / 100
5 ms376 KiB
#include <stdio.h> int n, in[4]; bool d[301]; int main() { for(int i=1; i<=3; i++) scanf("%d",&in[i]); scanf("%d",&n); d[0]=true; for(int i=1; i<=3; i++) for(int j=in[i]; j<=n; j++) if(d[j-in[i]]) d[j]=true; printf("%d",d[n]); }

Compilation message (stderr)

room.cpp: In function 'int main()':
room.cpp:7:34: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     for(int i=1; i<=3; i++) scanf("%d",&in[i]);
                             ~~~~~^~~~~~~~~~~~~
room.cpp:8:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&n);
     ~~~~~^~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...