Submission #1173207
Source Code Expand
#include<bits/stdc++.h> using namespace std; typedef long long LL; #define DEBUG if(0) #define CIN_ONLY if(1) //乱数のパラメータ yyは初期seedでMASKは2^n-1 [0,MASK]の値をrandIntで取得できる unsigned yy=1145141919^810893^114514; #define MASK 65535 inline unsigned xorshift(){yy=yy^(yy<<13);yy=yy^(yy>>17);return yy=yy^(yy<<5);}inline int randInt(){return (int) (xorshift()&MASK);}std::chrono::high_resolution_clock::time_point now_time;inline void timer_set() {using namespace std::chrono;now_time = high_resolution_clock::now();}inline bool time_check(int lim) {using namespace std::chrono;auto ed = high_resolution_clock::now();auto t = ed - now_time;return(duration_cast<milliseconds>(t).count() < lim);}template <typename T>inline void chmin(T &l,T r){l=min(l,r);}template <typename T>inline void chmax(T &l,T r){l=max(l,r);}template <typename T>istream& operator>>(istream &is,vector<T> &v){for(auto &it:v)is>>it;return is;}struct cww{cww(){CIN_ONLY{ios::sync_with_stdio(false);cin.tie(0);}}}star; #define fin "\n" #define FOR(i,bg,ed) for(int i=(bg);i<(ed);i++) #define REP(i,n) FOR(i,0,n) #define ALL(v) (v).begin(),(v).end() #define fi first #define se second #define pb push_back #define REC(ret, ...) std::function<ret (__VA_ARGS__)> int N=8; int D,T; int C[8]; int A[8]; inline void input(){ cin>>D>>T; REP(i,8)cin>>C[i]; REP(i,8)cin>>A[i]; } int getid(){ int res=511; REP(i,256){ int sum=0; REP(j,8)if((i>>j)&1)sum+=A[j]; if(sum==D)return i; } REP(i,8)if(C[i]<A[i])return -i-1; return 0; } int main(){ REP(cwwwwww,5){ input(); if(D<7){ cout<<"pass"<<endl; } int id=getid(); if(id==0)cout<<"pass"<<endl; if(id<0)cout<<"fill "<<-id<<endl; if(id>0){ cout<<"sell"; REP(i,8)if((id>i)&1)cout<<" "<<i; cout<<endl; } } return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - 石油王Xの憂鬱 |
User | btk15049 |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 2010 Byte |
Status | WA |
Exec Time | 3 ms |
Memory | 724 KB |
Judge Result
Set Name | test_01 | test_02 | test_03 | test_04 | test_05 | test_06 | test_07 | test_08 | test_09 | test_10 | test_11 | test_12 | test_13 | test_14 | test_15 | test_16 | test_17 | test_18 | test_19 | test_20 | test_21 | test_22 | test_23 | test_24 | test_25 | test_26 | test_27 | test_28 | test_29 | test_30 | test_31 | test_32 | test_33 | test_34 | test_35 | test_36 | test_37 | test_38 | test_39 | test_40 | test_41 | test_42 | test_43 | test_44 | test_45 | test_46 | test_47 | test_48 | test_49 | test_50 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | 0 / 417500 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Status |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Set Name | Test Cases |
---|---|
test_01 | subtask_01_01.txt |
test_02 | subtask_01_02.txt |
test_03 | subtask_01_03.txt |
test_04 | subtask_01_04.txt |
test_05 | subtask_01_05.txt |
test_06 | subtask_01_06.txt |
test_07 | subtask_01_07.txt |
test_08 | subtask_01_08.txt |
test_09 | subtask_01_09.txt |
test_10 | subtask_01_10.txt |
test_11 | subtask_01_11.txt |
test_12 | subtask_01_12.txt |
test_13 | subtask_01_13.txt |
test_14 | subtask_01_14.txt |
test_15 | subtask_01_15.txt |
test_16 | subtask_01_16.txt |
test_17 | subtask_01_17.txt |
test_18 | subtask_01_18.txt |
test_19 | subtask_01_19.txt |
test_20 | subtask_01_20.txt |
test_21 | subtask_01_21.txt |
test_22 | subtask_01_22.txt |
test_23 | subtask_01_23.txt |
test_24 | subtask_01_24.txt |
test_25 | subtask_01_25.txt |
test_26 | subtask_01_26.txt |
test_27 | subtask_01_27.txt |
test_28 | subtask_01_28.txt |
test_29 | subtask_01_29.txt |
test_30 | subtask_01_30.txt |
test_31 | subtask_01_31.txt |
test_32 | subtask_01_32.txt |
test_33 | subtask_01_33.txt |
test_34 | subtask_01_34.txt |
test_35 | subtask_01_35.txt |
test_36 | subtask_01_36.txt |
test_37 | subtask_01_37.txt |
test_38 | subtask_01_38.txt |
test_39 | subtask_01_39.txt |
test_40 | subtask_01_40.txt |
test_41 | subtask_01_41.txt |
test_42 | subtask_01_42.txt |
test_43 | subtask_01_43.txt |
test_44 | subtask_01_44.txt |
test_45 | subtask_01_45.txt |
test_46 | subtask_01_46.txt |
test_47 | subtask_01_47.txt |
test_48 | subtask_01_48.txt |
test_49 | subtask_01_49.txt |
test_50 | subtask_01_50.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
subtask_01_01.txt | WA | 3 ms | 724 KB |
subtask_01_02.txt | WA | 3 ms | 720 KB |
subtask_01_03.txt | WA | 3 ms | 720 KB |
subtask_01_04.txt | WA | 3 ms | 724 KB |
subtask_01_05.txt | WA | 3 ms | 716 KB |
subtask_01_06.txt | WA | 3 ms | 592 KB |
subtask_01_07.txt | WA | 3 ms | 716 KB |
subtask_01_08.txt | WA | 3 ms | 592 KB |
subtask_01_09.txt | WA | 3 ms | 596 KB |
subtask_01_10.txt | WA | 3 ms | 592 KB |
subtask_01_11.txt | WA | 3 ms | 716 KB |
subtask_01_12.txt | WA | 3 ms | 720 KB |
subtask_01_13.txt | WA | 3 ms | 592 KB |
subtask_01_14.txt | WA | 3 ms | 596 KB |
subtask_01_15.txt | WA | 3 ms | 720 KB |
subtask_01_16.txt | WA | 3 ms | 716 KB |
subtask_01_17.txt | WA | 3 ms | 720 KB |
subtask_01_18.txt | WA | 3 ms | 720 KB |
subtask_01_19.txt | WA | 3 ms | 720 KB |
subtask_01_20.txt | WA | 3 ms | 720 KB |
subtask_01_21.txt | WA | 3 ms | 592 KB |
subtask_01_22.txt | WA | 3 ms | 592 KB |
subtask_01_23.txt | WA | 3 ms | 720 KB |
subtask_01_24.txt | WA | 3 ms | 596 KB |
subtask_01_25.txt | WA | 3 ms | 720 KB |
subtask_01_26.txt | WA | 3 ms | 720 KB |
subtask_01_27.txt | WA | 3 ms | 720 KB |
subtask_01_28.txt | WA | 3 ms | 720 KB |
subtask_01_29.txt | WA | 3 ms | 720 KB |
subtask_01_30.txt | WA | 3 ms | 720 KB |
subtask_01_31.txt | WA | 3 ms | 720 KB |
subtask_01_32.txt | WA | 3 ms | 716 KB |
subtask_01_33.txt | WA | 3 ms | 596 KB |
subtask_01_34.txt | WA | 3 ms | 716 KB |
subtask_01_35.txt | WA | 3 ms | 724 KB |
subtask_01_36.txt | WA | 3 ms | 716 KB |
subtask_01_37.txt | WA | 3 ms | 720 KB |
subtask_01_38.txt | WA | 3 ms | 720 KB |
subtask_01_39.txt | WA | 3 ms | 720 KB |
subtask_01_40.txt | WA | 3 ms | 724 KB |
subtask_01_41.txt | WA | 3 ms | 720 KB |
subtask_01_42.txt | WA | 3 ms | 720 KB |
subtask_01_43.txt | WA | 3 ms | 716 KB |
subtask_01_44.txt | WA | 3 ms | 724 KB |
subtask_01_45.txt | WA | 3 ms | 720 KB |
subtask_01_46.txt | WA | 3 ms | 720 KB |
subtask_01_47.txt | WA | 3 ms | 720 KB |
subtask_01_48.txt | WA | 3 ms | 720 KB |
subtask_01_49.txt | WA | 3 ms | 716 KB |
subtask_01_50.txt | WA | 3 ms | 592 KB |