답안 #938513

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
938513 2024-03-05T08:34:57 Z Wansur 전선 연결 (IOI17_wiring) C++14
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
//#include "slow.h"
#define f first
#define s second
#define ent '\n'

#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("Ofast,unroll-loops,fast-math,O3")

typedef long long ll;
using namespace std;
struct seg{
    int m1,m2,sum,cnt;
};

const string out[2]={"NO\n","YES\n"};

const ll dx[]={0,1,0,-1,-1,1,1,-1};
const ll dy[]={1,0,-1,0,-1,1,-1,1};
const int mod=998244353;
const int md=1e9+7;
const int mx=2e5+12;
const bool T=0;

ll dp[mx][280];
ll c[501];
int n,m;

long long min_total_length(vector<int> a, vector<int> b){
    n=a.size(), m=b.size();
    vector<pair<int,int>> v;
    for(int x:a){
        v.push_bacK({x, 0});
    }
    for(int x:v){
        v.push_back({x,1});
    }
    int N=n+m;
    for(int i=0;i<=N;i++){
        for(int m=0;m<=(1<<7);m++){
            dp[i][m]=1e18;
        }
    }
    dp[0][0]=0;
    for(int i=1;i<=N;i++){
        auto [x, tp]=v[i-1];
        for(int m=0;m<(1<<7);m++){
            for(int j=0;j<7;j++){
                int pos=i-j-2;
                if(pos<0)continue;
                
            }
        }
    }
    return dp[N][0];
}

/*
 */

Compilation message

wiring.cpp: In function 'long long int min_total_length(std::vector<int>, std::vector<int>)':
wiring.cpp:33:11: error: 'class std::vector<std::pair<int, int> >' has no member named 'push_bacK'; did you mean 'push_back'?
   33 |         v.push_bacK({x, 0});
      |           ^~~~~~~~~
      |           push_back
wiring.cpp:35:15: error: cannot convert 'std::pair<int, int>' to 'int' in initialization
   35 |     for(int x:v){
      |               ^
wiring.cpp:46:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   46 |         auto [x, tp]=v[i-1];
      |              ^