제출 #601716

#제출 시각아이디문제언어결과실행 시간메모리
601716enerelt14모임들 (IOI18_meetings)C++14
컴파일 에러
0 ms0 KiB
#include "meetings.h" #include<bits/stdc++.h> #define int long long using namespace std; int cost[5005][5005]; vector<long long> minimum_costs(vector<int> H, vector<int> L, vector<int> R){ for (int i=0;i<H.size();i++){ cost[i][i]=H[i]; for(int j=i+1;j<H.size();j++){ cost[i][j]=max(cost[i][j-1], H[j]); } } for (int i=0;i<H.size();i++){ for (int j=0;j<i;j++){ cost[i][j]=cost[j][i]; } } for (int i=0;i<H.size();i++){ for (int j=0;j<H.size();j++){ cost[i][j]+=cost[i][j-1]; } } vector<long long>res; for (int i=0;i<L.size();i++){ long long ans=1lle15; for (int j=L[i];j<=R[i];j++){ if (L[i]!=0)ans=min(ans, cost[j][R[i]]-cost[j][L[i]-1]); else ans=min(ans, cost[j][R[i]]); } res.pb(ans); } return res; }

컴파일 시 표준 에러 (stderr) 메시지

meetings.cpp: In function 'std::vector<long long int> minimum_costs(std::vector<long long int>, std::vector<long long int>, std::vector<long long int>)':
meetings.cpp:7:17: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    7 |   for (int i=0;i<H.size();i++){
      |                ~^~~~~~~~~
meetings.cpp:9:20: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    9 |     for(int j=i+1;j<H.size();j++){
      |                   ~^~~~~~~~~
meetings.cpp:13:17: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   13 |   for (int i=0;i<H.size();i++){
      |                ~^~~~~~~~~
meetings.cpp:18:17: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   18 |   for (int i=0;i<H.size();i++){
      |                ~^~~~~~~~~
meetings.cpp:19:19: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   19 |     for (int j=0;j<H.size();j++){
      |                  ~^~~~~~~~~
meetings.cpp:24:17: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   24 |   for (int i=0;i<L.size();i++){
      |                ~^~~~~~~~~
meetings.cpp:25:19: error: unable to find numeric literal operator 'operator""lle15'
   25 |     long long ans=1lle15;
      |                   ^~~~~~
meetings.cpp:25:19: note: use '-fext-numeric-literals' to enable more built-in suffixes
meetings.cpp:30:9: error: 'class std::vector<long long int>' has no member named 'pb'
   30 |     res.pb(ans);
      |         ^~