Submission #1099878

#TimeUsernameProblemLanguageResultExecution timeMemory
1099878model_codeMosaic (IOI24_mosaic)C++17
7 / 100
90 ms16764 KiB
// incorrect/subtask3.cpp #include "mosaic.h" #include "bits/stdc++.h" using namespace std; vector<long long> mosaic(vector<int> X, vector<int> Y, vector<int> T, vector<int> B, vector<int> L, vector<int> R) { int n = X.size(); vector<long long> ans; vector<int> sum(n); partial_sum(X.begin(), X.end(), sum.begin()); for(int i = 0; i < T.size(); i++) { int rx = T[i], ry = B[i]; int cx = L[i], cy = R[i]; int tot = sum[cy]-(cx==0?0:sum[cx - 1]); ans.push_back(tot); } return ans; }

Compilation message (stderr)

mosaic.cpp: In function 'std::vector<long long int> mosaic(std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)':
mosaic.cpp:13:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   13 |     for(int i = 0; i < T.size(); i++) {
      |                    ~~^~~~~~~~~~
mosaic.cpp:14:13: warning: unused variable 'rx' [-Wunused-variable]
   14 |         int rx = T[i], ry = B[i];
      |             ^~
mosaic.cpp:14:24: warning: unused variable 'ry' [-Wunused-variable]
   14 |         int rx = T[i], ry = B[i];
      |                        ^~
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...