답안 #858090

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
858090 2023-10-07T11:56:47 Z edogawa_something Bubble Sort 2 (JOI18_bubblesort2) C++17
0 / 100
70 ms 772 KB
#include "bubblesort2.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vii;
typedef pair<ll,ll> pii;
#define F first
#define S second 
#define all(v) v.begin(),v.end()
#define pb push_back
const ll M=5e5+10;
const ll inf=2e18;
vector<int>countScans(vector<int> a,vector<int> x,vector<int> v){
	vector<int> ans;
	for(int i=0;i<x.size();i++){
		a[x[i]]=v[i];
		ll m=inf;
		ll res=0;
		for(int j=a.size()-1;j>=0;j--){
			if(a[i]>m)
			res++;
			m=min(m,ll(a[j]));
		}
		ans.pb(res);
	}
	return ans;
}

Compilation message

bubblesort2.cpp: In function 'std::vector<int> countScans(std::vector<int>, std::vector<int>, std::vector<int>)':
bubblesort2.cpp:15:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   15 |  for(int i=0;i<x.size();i++){
      |              ~^~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 70 ms 772 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -