Submission #1060985

#TimeUsernameProblemLanguageResultExecution timeMemory
1060985Sir_Ahmed_ImranWiring (IOI17_wiring)C++17
0 / 100
1 ms604 KiB
///~~~LOTA~~~/// #include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define append push_back #define add insert #define nl '\n' #define ff first #define ss second #define pii pair<int,int> #define pll pair<ll,ll> #define all(x) (x).begin(),(x).end() #define L0TA ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define terminator main #define MAXN 201 ll dp[MAXN][MAXN]; ll min_total_length(vector<int> r,vector<int> b){ int n=r.size(); int m=b.size(); for(int i=1;i<MAXN;i++) dp[i][0]=dp[0][i]=1e18; for(int i=1;i<=r.size();i++) for(int j=1;j<=b.size();j++) dp[i][j]=min(dp[i][j-1],dp[i-1][j-1])+abs(r[i-1]-b[j-1]); return dp[n][m]; }

Compilation message (stderr)

wiring.cpp: In function 'long long int min_total_length(std::vector<int>, std::vector<int>)':
wiring.cpp:23:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   23 |     for(int i=1;i<=r.size();i++)
      |                 ~^~~~~~~~~~
wiring.cpp:24:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   24 |         for(int j=1;j<=b.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...