제출 #1366641

#제출 시각아이디문제언어결과실행 시간메모리
1366641muhammad-mutahirRotating Lines (APIO25_rotate)C++20
컴파일 에러
0 ms0 KiB
#include "rotate.h"
#include <bits/stdc++.h>

void energy(int n, vector<int> v){
    // rotate({0, 1}, 1500);
    // rotate({1}, 25);
    for(int i = 0;i<n/2;i++){
    	rotate({i},50000-v[i]);
    }
    for(int i =n/2;i<n;i++){
    	rotate({i},50000-v[i]+2500);
    }
}

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

rotate.cpp:4:20: error: 'vector' has not been declared
    4 | void energy(int n, vector<int> v){
      |                    ^~~~~~
rotate.cpp:4:26: error: expected ',' or '...' before '<' token
    4 | void energy(int n, vector<int> v){
      |                          ^
rotate.cpp: In function 'void energy(int, int)':
rotate.cpp:8:26: error: 'v' was not declared in this scope
    8 |         rotate({i},50000-v[i]);
      |                          ^
rotate.cpp:11:26: error: 'v' was not declared in this scope
   11 |         rotate({i},50000-v[i]+2500);
      |                          ^