Submission #3783739
Source Code Expand
#include<bits/stdc++.h>
using namespace std;
#define rip(a,b) for(int a=0;a<=b;++a)
int n,y,k10,k5,k1;
int main(){
scanf("%d %d",&n,&y);
rip(k10,n){
rip(k5,n){
k1 = (y-(10000*k10)-(5000*k5))/1000;
if(n==(k10+k5+k1) && k1>=0){
printf("%d %d %d\n",k10,k5,k1 );
return 0;
}
}
}
printf("%d %d %d\n",-1,-1,-1 );
}
Submission Info
Submission Time
2018-12-13 20:51:13+0900
Task
C - Otoshidama
User
samon
Language
C++14 (GCC 5.4.1)
Score
300
Code Size
374 Byte
Status
AC
Exec Time
9 ms
Memory
256 KB
Compile Error
./Main.cpp: In function ‘int main()’:
./Main.cpp:6:23: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d",&n,&y);
^
Judge Result
Set Name
Sample
All
Score / Max Score
0 / 0
300 / 300
Status
Set Name
Test Cases
Sample
a01, a02, a03, a04
All
a01, a02, a03, a04, b05, b06, b07, b08, b09, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24
Case Name
Status
Exec Time
Memory
a01
AC
1 ms
256 KB
a02
AC
1 ms
256 KB
a03
AC
1 ms
256 KB
a04
AC
9 ms
256 KB
b05
AC
1 ms
256 KB
b06
AC
1 ms
256 KB
b07
AC
1 ms
256 KB
b08
AC
1 ms
256 KB
b09
AC
9 ms
256 KB
b10
AC
9 ms
256 KB
b11
AC
9 ms
256 KB
b12
AC
1 ms
256 KB
b13
AC
1 ms
256 KB
b14
AC
1 ms
256 KB
b15
AC
9 ms
256 KB
b16
AC
8 ms
256 KB
b17
AC
9 ms
256 KB
b18
AC
1 ms
256 KB
b19
AC
1 ms
256 KB
b20
AC
1 ms
256 KB
b21
AC
9 ms
256 KB
b22
AC
9 ms
256 KB
b23
AC
9 ms
256 KB
b24
AC
8 ms
256 KB