akhauriyash/Code-Regression huggingface dataset:
#include<iostream>
#include<iomanip>
#include<cmath>
#include<string>
#include<cstring>
#include<vector>
#include<list>
#include<algorithm>
#include<map>
#include<set>
#include<queue>
#include<stack>
using namespace std;
typedef long long ll;
#define fi first
#define se second
#define mp make_pair
#define rep(i, n) for(int i=0;i<n;++i)
#define rrep(i, n) for(int i=n;i>=0;--i)
const int inf=1e9+7;
const ll mod=1e9+7;
const ll big=1e18;
const double PI=2*asin(1);

int main() {
  ll N, M;
  cin>>N>>M;
  vector<tuple<ll, ll, ll> > arr(M);
  ll L, R;
  ll C;
  for(ll i=0;i<M;++i) {
    cin>>L>>R>>C;
    L--;
    R--;
    arr[i] = make_tuple(L, C, R);
  }
  sort(arr.begin(), arr.end());
  vector<ll> ans(N);
  for(ll i=0;i<N;++i) ans[i] = big;
  ans[0] = 0;
  ll index;
  for(ll i=0;i<M;++i) {
    L = get<0>(arr[i]);
    C = get<1>(arr[i]);
    R = get<2>(arr[i]);
    index = lower_bound(ans.begin()+L, ans.begin()+R, ans[L]+C) - ans.begin();
    for(ll j=index;j<=R;++j) {
      ans[j] = min(ans[j], ans[L]+C);
    }
  }
  if(ans[N-1]<big) cout<<ans[N-1]<<endl;
  else cout<<-1<<endl;
}



Measured memory_bytes: 6232
#pragma GCC optimize(2)
#include <bits/stdc++.h>
#define MIN -10000000
#define MAX 10000000
#define debug printf("%d",__LINE__)
using namespace std;
int main()
{
	int n;
	cin >> n;
	int a, b;
	cin >> a >> b;
	for(int i=1; ; i++)
	{
		if(i * n >= a && i * n <= b) cout << "OK " << endl, exit(0);
		if(i * n > b)cout << "NG \n", exit(0);
	}
	return 0;
}


Measured memory_bytes: 3636
#include<stdio.h>
int main(void){
	int n=0,i;
    char s[4];
    scanf("%s",s);
    for(i=0;i<4;i++){
        if(s[i]=='+')
            n++;
        else
            n--;
    }
    printf("%d\n",n);
	return 0;
}

Measured memory_bytes: 128
#include <bits/stdc++.h>

using namespace std;


int main(){
  int n,m;
  cin >> n >> m;
  vector<pair<int,int>> p(m);
  for(int i=0;i<m;i++){
    cin >> p[i].second >> p[i].first; //firstは後ろの島の番号
  }
  sort(p.begin(),p.end());
  int t=0;
  int ans=0;
  for(int i=0;i<m;i++){
    if(t<=p[i].second){
      ans++;
      t=p[i].first;
    }
  }
  cout << ans << endl;
}

Measured memory_bytes: 1024