Submission #240178

# Submission time Handle Problem Language Result Execution time Memory
240178 2020-06-18T12:43:15 Z MvC Bubble Sort 2 (JOI18_bubblesort2) C++11
0 / 100
9000 ms 640 KB
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#include "bubblesort2.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
#define all(x) x.begin(),x.end()
#define lun(x) (int)x.size()
typedef long long ll;
typedef long double ld;
const ll INF=0x3f3f3f3f3f3f3f3f;
const ll llinf=(1LL<<60);
const int inf=(1<<30);
const int nmax=1e5+50;
const ll mod=1e9+7;
using namespace std;
int i,j,t,nr,mx;
vector<int>rs;
vector<int> countScans(vector<int>a,vector<int>x,vector<int>v)
{
	for(i=0;i<lun(x);i++)
	{
		a[x[i]]=v[i];
		mx=0;
		for(j=1;j<lun(a);j++)
		{
			nr=0;
			for(t=0;t<j;t++)if(a[t]>a[j])nr++;
			mx=max(mx,nr);
		}
		rs.pb(mx);
	}
	return rs;
}
/*int main()
{
	//freopen("sol.in","r",stdin);
	//freopen("sol.out","w",stdout);
	//mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
	ios_base::sync_with_stdio(false);cin.tie(0);cerr.tie(0);cout.tie(0);
	
	return 0;
}*/
# Verdict Execution time Memory Grader output
1 Correct 198 ms 392 KB Output is correct
2 Correct 719 ms 504 KB Output is correct
3 Execution timed out 9028 ms 632 KB Time limit exceeded
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 198 ms 392 KB Output is correct
2 Correct 719 ms 504 KB Output is correct
3 Execution timed out 9028 ms 632 KB Time limit exceeded
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 9032 ms 640 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 198 ms 392 KB Output is correct
2 Correct 719 ms 504 KB Output is correct
3 Execution timed out 9028 ms 632 KB Time limit exceeded
4 Halted 0 ms 0 KB -