Submission #1366641

#TimeUsernameProblemLanguageResultExecution timeMemory
1366641muhammad-mutahirRotating Lines (APIO25_rotate)C++20
Compilation error
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);
    }
}

Compilation message (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);
      |                          ^