p00f / cphelper.nvim

Neovim helper for competitive programming. Use https://sr.ht/~p00f/cphelper.nvim instead
MIT License
133 stars 9 forks source link

Get the link of the problem and write to the solution.cpp #18

Closed anurag3301 closed 2 years ago

anurag3301 commented 2 years ago

Hey Is there a way to get the link of the problem and write that link in the solution.cpp created by the plugin like you can see at the first line of the following code.

// https://codeforces.com/problemset/problem/139/A
#include<bits/stdc++.h>
using namespace std;

int main(){
  int n, x; cin >> n;
  vector<int> week;

  for(int i=0; i<7; i++){
    cin >> x;
    week.push_back(x);
  }
  while(1){
    x = 1;
    for(int i:week){
      n-=i;
      if(n<=0){
        cout << x << endl;
        return 0;
      }
      x++;
    }
  }
}

Does the Competitive Companion Extension also provide the problem link which can be written using this cphelper. If it is possible how can I achieve this, possibly in my fork.

p00f commented 2 years ago

Added g:cph_url_register,

piush-terminalwitchcraft commented 1 year ago

and timestamp? when the problem is created?

p00f commented 1 year ago

Use some snippet tool to add the current time