Submission #897938

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
8979382024-01-04 05:13:19Faisal_SaqibRobots (IOI13_robots)C++17
39 / 100
3088 ms26312 KiB
#include "robots.h"
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
const int N=3e6+100;
int deg[N];
int in_deg[N];
bool compaa(int a,int b)
{
return (in_deg[a]<=in_deg[b]);
}
int putaway(int a, int b, int t, int x[], int y[], int w[], int s[])
{
// We take a
std::vector<pair<int,int>> heavy_logic;
for(int i=0;i<a;i++)
heavy_logic.push_back({x[i],0});
for(int i=0;i<b;i++)
heavy_logic.push_back({0,y[i]});
for(int i=0;i<t;i++)
heavy_logic.push_back({w[i],s[i]});
// for A vertex 0,1,..,a-1
// For B vertex a,a+1,..,a+b-1
// For t vertex a+b,a+b+1,..,a+b+t-1
// cout<<"as\n";
// for(auto [q,p]:heavy_logic)
// {
// cout<<q<<' '<<p<<endl;
// }
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

robots.cpp: In function 'int putaway(int, int, int, int*, int*, int*, int*)':
robots.cpp:33:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   33 |  for(int j=(a+b);j<heavy_logic.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...