답안 #148925

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
148925 2019-09-01T05:24:00 Z Greedy left the chat.(#3618, miguel, claudy, MvC) King of Chairs (FXCUP4_chairs) C++17
100 / 100
158 ms 10444 KB
#include "king.h"
#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
#include<bits/stdc++.h>
//#include "boxes.h"
#define rc(x) return cout<<x<<endl,0
#define pb push_back
#define mkp make_pair
#define in insert
#define er erase
#define fd find
#define fr first
#define sc second
typedef long long ll;
typedef long double ld;
const ll INF=0x3f3f3f3f3f3f3f3f;
const ll llinf=(1LL<<61);
const int inf=(1<<30);
const int nmax=1e5+50;
const int mod=1e9+7;
using namespace std;
ll SendInfo(vector<int>w,vector<int>c) 
{
	//n=w.size();
	return 0;
}
#include "vassal.h"
#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
#include<bits/stdc++.h>
//#include "boxes.h"
#define rc(x) return cout<<x<<endl,0
#define pb push_back
#define mkp make_pair
#define in insert
#define er erase
#define fd find
#define fr first
#define sc second
typedef long long ll;
typedef long double ld;
const ll INF=0x3f3f3f3f3f3f3f3f;
const ll llinf=(1LL<<61);
const int inf=(1<<30);
const int nmax=1e5+50;
const int mod=1e9+7;
using namespace std;
int n,i;
set<pair<int,int> >st;
pair<int,int>x;
set<pair<int,int> >::iterator it;
void Init(ll bb,vector<int>c)
{
	n=c.size();
	for(i=0;i<c.size();i++)st.in(mkp(c[i],i));
}
int Maid(int w)
{
	it=st.lower_bound(mkp(w,0));
	if(it==st.end())return -1;
	x=(*it);
	st.er(it);
	return x.sc;
}

Compilation message

king.cpp:3:0: warning: ignoring #pragma GCC optimization [-Wunknown-pragmas]
 #pragma GCC optimization("O3")
 
king.cpp:4:0: warning: ignoring #pragma GCC optimization [-Wunknown-pragmas]
 #pragma GCC optimization("unroll-loops")
 

vassal.cpp:3:0: warning: ignoring #pragma GCC optimization [-Wunknown-pragmas]
 #pragma GCC optimization("O3")
 
vassal.cpp:4:0: warning: ignoring #pragma GCC optimization [-Wunknown-pragmas]
 #pragma GCC optimization("unroll-loops")
 
vassal.cpp: In function 'void Init(ll, std::vector<int>)':
vassal.cpp:30:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(i=0;i<c.size();i++)st.in(mkp(c[i],i));
          ~^~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 1048 KB Correct
2 Correct 10 ms 1052 KB Correct
3 Correct 10 ms 1048 KB Correct
4 Correct 10 ms 1044 KB Correct
5 Correct 11 ms 1044 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 69 ms 5956 KB Correct
2 Correct 109 ms 9632 KB Correct
3 Correct 117 ms 10440 KB Correct
4 Correct 123 ms 10444 KB Correct
5 Correct 118 ms 10432 KB Correct
6 Correct 111 ms 10436 KB Correct
7 Correct 117 ms 10432 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 78 ms 5932 KB Correct
2 Correct 142 ms 9376 KB Correct
3 Correct 134 ms 10436 KB Correct
4 Correct 149 ms 10436 KB Correct
5 Correct 156 ms 10436 KB Correct
6 Correct 158 ms 10060 KB Correct
7 Correct 130 ms 10440 KB Correct
8 Correct 127 ms 10432 KB Correct