Submission #83373

#TimeUsernameProblemLanguageResultExecution timeMemory
83373tjdgus4384방 배정하기 (KOI17_room)C++14
100 / 100
3 ms820 KiB
#include<cstdio> int d[401]; int main() { int n, a, b, c; scanf("%d %d %d %d", &a, &b, &c, &n); d[0] = 1; for(int i = 0;i <= n;i++) { if(d[i] == 1) { d[i + a] = 1; d[i + b] = 1; d[i + c] = 1; } } printf("%d", d[n]); return 0; }

Compilation message (stderr)

room.cpp: In function 'int main()':
room.cpp:7:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d %d %d %d", &a, &b, &c, &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...