Submission #1060098

#TimeUsernameProblemLanguageResultExecution timeMemory
1060098anangoMarathon Race 2 (JOI24_ho_t3)C++17
0 / 100
416 ms689240 KiB
#include <bits/stdc++.h> using namespace std; int INF = 1LL<<30; int maxbloat = 1008; signed main() { int local = 0; if (local) { // for getting input from input.txt freopen("input.txt", "r", stdin); // for writing output to output.txt freopen("output.txt", "w", stdout); } /*#ifdef ONLINE_JUDGE ios_base::sync_with_stdio(false); cin.tie(NULL); #endif*/ //fast IO int n,l; cin >> n >> l; vector<int> balls; for (int i=0; i<n; i++) { int x; cin >> x; balls.push_back(x); } vector<int> coords; for (int i=0; i<n; i++) { coords.push_back(balls[i]); } coords.erase(unique(coords.begin(), coords.end()), coords.end()); int q; cin >> q; if (coords.size()>maxbloat) { while (q--) { int s,g,t; cin >> s >> g >> t; cout << "No" << endl; } return 0; } //dp[l][r-l][x-l] = min cost of picking up balls l through r, if we start at pos of ball x (l<=x<=r) n = coords.size(); n=maxbloat; vector<vector<vector<int>>> dp(n); for (int l=0; l<n; l++) { dp[l].resize(n-l); for (int r=l; r<n; r++) { dp[l][r-l]=vector<int>(r-l+1,INF); } } }

Compilation message (stderr)

Main.cpp: In function 'int main()':
Main.cpp:31:22: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   31 |     if (coords.size()>maxbloat) {
      |         ~~~~~~~~~~~~~^~~~~~~~~
Main.cpp:12:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   12 |         freopen("input.txt", "r", stdin);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
Main.cpp:14:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   14 |         freopen("output.txt", "w", stdout);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
#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...