제출 #619687

#제출 시각아이디문제언어결과실행 시간메모리
619687Icebear16Memory (IOI10_memory)C++14
0 / 100
1 ms304 KiB
#include "grader.h" #include "memory.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; #define INF 1e18//change to const int INF=1e18 if causing problem const ll MOD=998244353; const ll alt=1e10; const ll inf=1e9+7;//Precalc is not a bad idea //#define int ll #define pb push_back #define pf push_front #define mp make_pair #define fi first #define se second #define mod(a) (a+inf)%inf #define all(a) a.begin(),a.end() #define rall(a) a.rbegin(),a.rend() #define sz(a) a.size() void play() { int i; vector<int> v; map<char,int> m; map<char,int> mm; v.clear(),m.clear(),mm.clear(); for(int i=1;i<=50;i++){ v.pb(i); } for(int i=1;i<sz(v);i+=2){ char a=faceup(v[i-1]); char b=faceup(v[i]); if(a==b){ m[a]=i; mm[b]=i+1; }else{ if(m[a]==0) m[a]=i; else mm[a]=i; if(m[b]==0) m[b]=i+1; else mm[b]=i+1; } } vector<int> a,b; a.clear(),b.clear(); for(auto u : m) a.pb(u.se); for(auto u : mm) b.pb(u.se); for(int i=0;i<sz(a);i++){ int x=a[i]-1; int y=b[i]-1; faceup(x); faceup(y); } } //Icebear16

컴파일 시 표준 에러 (stderr) 메시지

memory.cpp: In function 'void play()':
memory.cpp:30:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   30 |  for(int i=1;i<sz(v);i+=2){
      |               ^
memory.cpp:47:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   47 |    for(int i=0;i<sz(a);i++){
      |                 ^
memory.cpp:22:8: warning: unused variable 'i' [-Wunused-variable]
   22 |    int i;
      |        ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...