Submission #479936

#TimeUsernameProblemLanguageResultExecution timeMemory
479936robellMemory (IOI10_memory)C++17
0 / 100
1 ms328 KiB
#pragma GCC optimize("O2") #include <bits/stdc++.h> #include "grader.h" #include "memory.h" #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; typedef tree<int,null_type,less<int>,rb_tree_tag, tree_order_statistics_node_update> indexed_set; typedef long long ll; #define pb push_back #define eb emplace_back #define countbits __builtin_popcount #define beg0 __builtin_clz #define terminal0 __builtin_ctz int mod=1e9+7; void setIO(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); } void setIO(string f){ freopen((f+".in").c_str(),"r",stdin); freopen((f+".out").c_str(),"w",stdout); setIO(); } void play(){ int pos[51];memset(pos,-1,sizeof(pos)); vector<int> val[25]; for (int i=1;i<=50;i+=2){ int v1 = faceup(i); int v2 = faceup(i+1); val[--v1].pb(i); val[--v2].pb(i+1); } for (int i=0;i<25;i++) for (int j=0;j<2;j++){faceup(val[i][j]);} }

Compilation message (stderr)

memory.cpp: In function 'void setIO(std::string)':
memory.cpp:21:9: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   21 |  freopen((f+".in").c_str(),"r",stdin);
      |  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
memory.cpp:22:9: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   22 |  freopen((f+".out").c_str(),"w",stdout);
      |  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...