Submission #1060097

#TimeUsernameProblemLanguageResultExecution timeMemory
1060097anangoMarathon Race 2 (JOI24_ho_t3)C++17
0 / 100
373 ms1048576 KiB
#include <bits/stdc++.h> #define int long long 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:32:22: warning: comparison of integer expressions of different signedness: 'std::vector<long long int>::size_type' {aka 'long unsigned int'} and 'long long int' [-Wsign-compare]
   32 |     if (coords.size()>maxbloat) {
      |         ~~~~~~~~~~~~~^~~~~~~~~
Main.cpp:13:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   13 |         freopen("input.txt", "r", stdin);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
Main.cpp:15:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   15 |         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...