Submission #5093773
Source Code Expand
#include <bits/stdc++.h> using namespace std; int main(){ int N,Y,a,b; cin>>N>>Y; bool f=false; for(a=0;a<N;a++){ for(b=0;b<N;b++){ if((a*10000+b*5000+(N-a-b)*1000)==Y){ f=true; break; } } } if(f){ cout<<a<<' '<<b<<' '<<N-a-b<<endl; } else<<"-1 -1 -1"<<endl; }
Submission Info
Submission Time | |
---|---|
Task | C - Otoshidama |
User | auaua |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 334 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:18:7: error: expected primary-expression before ‘<<’ token else<<"-1 -1 -1"<<endl; ^