Submission #1023473

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10234732024-07-14 19:56:55NintsiChkhaidzeBubble Sort 2 (JOI18_bubblesort2)C++17
0 / 100
6 ms4808 KiB
#include <bits/stdc++.h>
#include "bubblesort2.h"
#define left h*2,l,(l + r)/2
#define right h*2+1,(l + r)/2 + 1,r
#define pii pair <int,int>
#define s second
#define f first
#define pb push_back
using namespace std;
const int N = 1e6 + 5;
int l1[N],lz[4*N],AA[N],VV[N];
pii t[4*N];
map <int,int> mp;
void build(int h,int l,int r){
if (l == r){
t[h] = {0,l};
return;
}
build(left);
build(right);
t[h] = max(t[h*2],t[h*2 + 1]);
}
void push(int h){
if (lz[h]==0) return ;
lz[h*2] += lz[h];
lz[h*2 + 1] += lz[h];
t[h*2].f += lz[h];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

bubblesort2.cpp: In function 'std::vector<int> countScans(std::vector<int>, std::vector<int>, std::vector<int>)':
bubblesort2.cpp:50:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   50 |  for (int i=0;i<A.size();i++){
      |               ~^~~~~~~~~
bubblesort2.cpp:53:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   53 |  for (int i=0;i<V.size();i++){
      |               ~^~~~~~~~~
bubblesort2.cpp:59:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<std::pair<int, int>, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   59 |  for (int i = 0; i < vec.size(); i++){
      |                  ~~^~~~~~~~~~~~
bubblesort2.cpp:68:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   68 |  for (int i = 0; i < A.size(); i++){
      |                  ~~^~~~~~~~~~
bubblesort2.cpp:77:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   77 |  for (int j = 0; j < X.size(); j++){
      |                  ~~^~~~~~~~~~
bubblesort2.cpp:58:6: warning: unused variable 'm' [-Wunused-variable]
   58 |  int m = vec.size();
      |      ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...