Submission #3721249


Source Code Expand

#include "bits/stdc++.h"
using namespace std;
using namespace std::chrono;
using ll = long long;
using ull = unsigned long long;
#define _overload4(_1,_2,_3,_4,name,...) name
#define _overload3(_1,_2,_3,name,...) name
#define _overload2(_1,_2,name,...) name
#define _re(n) _rep(i,n)
#define _rep(i,n) _repi(i,0,n)
#define _repi(i,a,b) for(ll i=a;i<b;++i)
#define _repc(i,a,b,c) for(ll i=a;i<b;i+=c)
#define rep(...) _overload4(__VA_ARGS__,_repc,_repi,_rep,_re)(__VA_ARGS__)
#define _rre(n) _rrep(i,n)
#define _rrep(i,n) _rrepi(i,0,n)
#define _rrepi(i,a,b) for(ll i=b-1;i>=a;i--)
#define _rrepc(i,a,b,c) for(ll i=a+(b-a-1)/c*c;i>=a;i-=c)
#define rrep(...) _overload4(__VA_ARGS__,_rrepc,_rrepi,_rrep,_rre)(__VA_ARGS__)
#define rbr(i,a) for(auto&& i:a)
#define sum(...) accumulate(range(__VA_ARGS__),0)
#define _range(i) (i).begin(),(i).end()
#define _rangek(i,k) (i).begin(),(i).begin()+k
#define range(...) _overload2(__VA_ARGS__,_rangek,_range)(__VA_ARGS__)
#define LINF 0x3999999999999999LL
#define MOD ll(1000000007)
#define MODD ll(998244353)
#define INF 0x39999999
#define Yes(i) out(i?"Yes":"No")
#define YES(i) out(i?"YES":"NO")
#define elif else if
//#define START auto start=system_clock::now()
//#define END auto end=system_clock::now();cerr<<duration_cast<milliseconds>(end-start).count()<<" ms\n"
#define INT(...) int __VA_ARGS__;in(__VA_ARGS__)
#define LL(...) ll __VA_ARGS__;in(__VA_ARGS__)
#define ULL(...) ull __VA_ARGS__;in(__VA_ARGS__)
#define STR(...) string __VA_ARGS__;in(__VA_ARGS__)
#define CHR(...) char __VA_ARGS__;in(__VA_ARGS__)
#define DBL(...) double __VA_ARGS__;in(__VA_ARGS__)
#define vec(type,name,size) vector<type> name(size);
#define VEC(type,name,size) vector<type> name(size);in(name)
#define v(name,size,value) vector<ll>name(size,value)
#define vv(type,name,h,w,value) vector<vector<type>>name(h,vector<type>(w,value))
struct aaa{aaa(){cin.tie(0); cout.tie(0); ios::sync_with_stdio(0); cout<<fixed<<setprecision(15);};}aaaaaaa;
template<typename T>
inline constexpr T gcd (T a,T b) {if(a==b)return a;else return gcd(b,(a-1)%b+1);}
inline void in() {}
template<typename T>
istream& operator >> (istream& is, vector<T>& vec);
template<typename T,size_t size>
istream& operator >> (istream& is, array<T,size>& vec);
template<typename T,typename L>
istream& operator >> (istream& is, pair<T,L>& p);
template<typename T>
ostream& operator << (ostream& os, vector<T>& vec);
template<typename T,typename L>
ostream& operator << (ostream& os, pair<T,L>& p);
template<typename T>
istream& operator >> (istream& is, vector<T>& vec){for(T& x: vec) is >> x;return is;}
template<typename T,typename L>
istream& operator >> (istream& is, pair<T,L>& p){is >> p.first;is >> p.second;return is;}
template<typename T>
ostream& operator << (ostream& os, vector<T>& vec){os << vec[0];rep(i,1,vec.size()){os << ' ' << vec[i];}return os;}
template<typename T,typename L>
ostream& operator << (ostream& os, pair<T,L>& p){os << p.first << " " << p.second;return os;}
template <class Head, class... Tail>
inline void in(Head&& head,Tail&&... tail){cin>>head;in(move(tail)...);}
template <typename T>
inline void out(T t){cout<<t<<'\n';}
inline void out(){cout<<'\n';}
template <class Head, class... Tail>
inline void out(Head head,Tail... tail){cout<<head<<' ';out(move(tail)...);}

ll orange,vol,cst,cost,dp[11000][110]={-1};
ll p[2000000];
ll box;
ll DP(int j){
    cout<<j<<endl;
    ll check=(1<<orange-1);
    ll now_cost=0;
    ll maxi=0,mini=INF;
    ll now_box=0;
    rep(x,orange){
        cout<<x<<" ";
        if(!check&j){
            now_box++;
            if(now_box>vol)return INF;
            maxi=max(maxi,p[x]);cout<<maxi<<" ";
            mini=min(mini,p[x]);cout<<mini<<" ";
        }else{
            now_cost+=now_box*(maxi-mini)+cst;
            maxi=0,mini=INF;
            now_box=0;
        }
        check=(1<<x+1);cout<<check<<endl;
    }
    cout<<now_cost<<endl;
    return now_cost;
}

int main(){
  int h,w;
  in(h);
  in(w);
  string s[h][w];
  rep(h)rep(w)in(s[h][w]);
  rep(h){
    rep(j,w){
      if(s[i][j]=="snuke"){
        string alpha;
        if(j==0)alpha='A';
        if(j==1)alpha='B';
        if(j==2)alpha='C';
        if(j==3)alpha='D';
        if(j==4)alpha='E';
        if(j==5)alpha='F';
        if(j==6)alpha='G';
        if(j==7)alpha='H';
        if(j==8)alpha='I';
        if(j==9)alpha='J';
        if(j==10)alpha='K';
        if(j==11)alpha='L';
        if(j==12)alpha='M';
        if(j==13)alpha='N';
        if(j==14)alpha='O';
        if(j==15)alpha='P';
        if(j==16)alpha='Q';
        if(j==17)alpha='R';
        if(j==18)alpha='S';
        if(j==19)alpha='T';
        if(j==20)alpha='U';
        if(j==21)alpha='V';
        if(j==22)alpha='W';
        if(j==23)alpha='X';
        if(j==24)alpha='Y';
        if(j==25)alpha='Z';
        cout<<i<<alpha[1]<<endl;
      }
    }
  }
}

Submission Info

Submission Time
Task A - Where's Snuke?
User J190190MG
Language C++14 (GCC 5.4.1)
Score 0
Code Size 4999 Byte
Status RE
Exec Time 102 ms
Memory 256 KB

Judge Result

Set Name sample all
Score / Max Score 0 / 0 0 / 100
Status
RE × 2
RE × 11
Set Name Test Cases
sample sample-01.txt, sample-02.txt
all sample-01.txt, sample-02.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, sample-01.txt, sample-02.txt
Case Name Status Exec Time Memory
01-01.txt RE 98 ms 256 KB
01-02.txt RE 98 ms 256 KB
01-03.txt RE 99 ms 256 KB
01-04.txt RE 100 ms 256 KB
01-05.txt RE 99 ms 256 KB
01-06.txt RE 99 ms 256 KB
01-07.txt RE 102 ms 256 KB
sample-01.txt RE 99 ms 256 KB
sample-02.txt RE 100 ms 256 KB