Submission #243993

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
2439932020-07-02 12:37:27ctziapoRobots (IOI13_robots)C++14
39 / 100
3081 ms65540 KiB
#include <stdio.h>
#include <stdlib.h>
#include "robots.h"
#include<algorithm>
#include<iostream>
#include<vector>
struct diplo{
int x;
int y;
int i;
};
bool ff(diplo x,diplo y){
return x.y>y.y || x.y==y.y && x.x>y.x;
}
bool ff2(diplo x,diplo y){
return x.x>y.x || x.x==y.x && x.y>y.y;
}
using namespace std;
int putaway(int a, int b, int n, int x[], int y[], int w[], int s[]) {
int f[n]={};
sort(x,x+a);
sort(y,y+b);
for(int i=0;i<n;i++){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

robots.cpp: In function 'bool ff(diplo, diplo)':
robots.cpp:15:32: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
     return x.y>y.y || x.y==y.y && x.x>y.x;
                       ~~~~~~~~~^~~~~~~~~~
robots.cpp: In function 'bool ff2(diplo, diplo)':
robots.cpp:19:32: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
     return x.x>y.x || x.x==y.x && x.y>y.y;
                       ~~~~~~~~~^~~~~~~~~~
robots.cpp: In function 'int putaway(int, int, int, int*, int*, int*, int*)':
robots.cpp:115:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int j=0;j<vx[i].size();j++){
                     ~^~~~~~~~~~~~~
robots.cpp:134:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int j=0;j<vy[i].size();j++){
                     ~^~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...