Datasets:
uuid stringlengths 36 36 | repo_name stringlengths 5 133 | relative_path stringlengths 3 3.76k | content stringlengths 282 4.03M | category stringclasses 6
values | algo_rel_score float32 0.9 1 | quality_score float32 3 8.13 | source_meta dict |
|---|---|---|---|---|---|---|---|
1feaa85e-6908-4793-a0bf-b07fbce92796 | ljy0221/Algorithm_Study | C++17/백준/Gold/2098. 외판원 순회/외판원 순회.cc | #include <iostream>
#include <vector>
#include <algorithm>
#include <climits>
#include <cstring>
using namespace std;
int N; // 도시의 수
int W[16][16]; // 비용 행렬
int dp[16][1 << 16]; // DP 테이블: dp[current][bitmask]
// current: 현재 도시, visited: 방문한 도시들(비트마스크)
int tsp(int current, int visited) {
/... | ALGO | 0.999976 | 5.224062 | {
"github_metadata": {
"branch": "main",
"commit_count": 116,
"repo_created_at": "2025-05-07T01:10:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cc3bc4d3f0... |
c812c54d-ba59-4949-bc42-742e52b6632e | eric15342335/comp2113 | Module5/meanSD.cpp | #include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
double mean_5(double a, double b, double c, double d, double e){
return (a+b+c+d+e)/5;
}
double sd_5(double mean, double a, double b, double c, double d, double e){
return sqrt((pow(a-mean, 2)+pow(b-mean, 2)+pow(c-mean, 2)+pow(d-mean... | ALGO | 0.993953 | 4.075362 | {
"github_metadata": {
"branch": "main",
"commit_count": 43,
"repo_created_at": "2024-02-02T15:20:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4ec153e1f84... |
e1f229d3-8ed3-4e2d-8543-1a3d0714c3e9 | MazenAli/LAWA | lawa/constructions/realline/multi/refinementbspline.tcc | #ifndef LAWA_CONSTRUCTIONS_REALLINE_MULTI_REFINEMENTBSPLINE_TCC
#define LAWA_CONSTRUCTIONS_REALLINE_MULTI_REFINEMENTBSPLINE_TCC 1
#include <cassert>
#include <iostream>
#include <lawa/math/lawa_math.h>
#include <lawa/constructions/interval/multi/_linear_evaluator.h>
#include <lawa/constructions/interval/multi/_quadra... | ALGO | 0.937413 | 5.947334 | {
"github_metadata": {
"branch": "master",
"commit_count": 52,
"repo_created_at": "2015-08-06T13:24:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f43220d25... |
82a7125f-e84b-4398-9536-d23d71191d65 | lampralexandros/Work4_-Parallel-and-distributed-systems- | stable_versions/bpnet.cpp | /**********************************************************************************************************
C++ Source FILE: Backpropagation Neural Network Implementation
File: bpnet.cpp
Version: 0.1
Copyright(C) NeuroAI (http://www.learnartificialneuralnetworks.com)
Documentation:http://www.learnartificialne... | ALGO | 0.989603 | 4.411294 | {
"github_metadata": {
"branch": "master",
"commit_count": 44,
"repo_created_at": "2017-08-24T14:52:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1d5205e68... |
ebc42aa1-766a-437e-9ea2-bc4a4dd3f1fe | raincross7/code-similarity | codes/train_code/problem438/problem438_160.cpp | /*
* atcoder/abc108_2nd/c.cpp
*/
// C++ 14
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstring> // memset
#include <cassert>
using namespace std;
#define ll long long
#define loop(__x, __start, __end) for(int __x = __start; __x < __end; __x++)
template <class T> bool chmin(T... | ALGO | 0.999939 | 3.992143 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-03-06T05:07:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "437d07aed1fb... |
589fee36-cb1c-426e-9be3-05d5255d1940 | nimacgit/CPP | class-olympiad/1394/judge/prime.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <set>
using namespace std;
const int maxn = 150 * 1000 + 100;
vector <int> list[maxn];
int w[maxn];
vector <int> edge[2];
const int inf = 1000;
int d[maxn], n, m;
set < pair <int, int> > myset;
int parent[maxn];
long long sum = 0;
bool mark[maxn];
in... | ALGO | 0.999997 | 3.896474 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-11-23T15:25:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d3f2092f66... |
4a5f0681-8208-4416-acec-8a1a599d65ee | chenghu17/Algorithm | Leetcode/c_914_X_of_a_Kind_in_a_Deck_of_Cards.cpp | //
// Created by Mr.Hu on 2019/1/6.
//
// leetcode 914 X of a kind in a deck of cards
//
// 题目给定一些卡片,要求选择一个数字X,可以将卡片分成多组,每组卡片的个数为X,且每组卡片上的数字都相同。
//
// 首先,我们需要统计每种数组的卡片有多少个。所以这里使用map<int,int>来保存;
// 得到每个卡片的个数之后,便设计到划分的问题了。刚开始对题目没有理解透,以为只有每种卡片的个数相等才满足条件。
// 一顿操作之后,提示[1,1,2,2,2,2]也可以...然后发现如果某一种卡片的个数能被其他卡片个数都整除,也是可以的...
/... | ALGO | 0.990122 | 5.160444 | {
"github_metadata": {
"branch": "master",
"commit_count": 501,
"repo_created_at": "2018-01-25T08:00:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "55d694fd... |
ce6a6ae1-2bc8-4fcf-85fa-88e33a5d10f9 | KrisjanisP/cp-algorithms | src/string-trie.hpp | #include <bits/stdc++.h>
#define ALPHA_START 'A'
#define ALPHA_SIZE 26
using namespace std;
struct Vertex
{
char alphabet;
bool exist;
vector<Vertex *> child;
Vertex(char a) : alphabet(a), exist(false)
{
child.assign(ALPHA_SIZE, NULL);
}
};
class Trie
{
private:
Vertex *root;
publ... | ALGO | 0.997562 | 3.814694 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2023-03-20T11:26:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "97e3f70935bf... |
408205da-361a-42e6-a990-8996e9c7ba53 | DungNguyenManh/Homework | Main/Lap 9/Nâng cao/Bai10.cpp | #include <stdio.h>
#include <time.h>
#include <stdlib.h>
#define Max 100
#define Min -100
int Nhap_Kich_Thuoc_Mang();
void Nhap_X(int &x);
void Nhap_Mang(int a[], int n);
void Xuat_Mang(int a[], int n, int x);
int main()
{
int a[Max], n = Nhap_Kich_Thuoc_Mang(), x;
srand((int)time(NULL));
Nhap_X(x);
... | ALGO | 0.998465 | 3.045615 | {
"github_metadata": {
"branch": "main",
"commit_count": 217,
"repo_created_at": "2021-12-05T05:02:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "28399a4845... |
79030d7d-d982-46d7-950e-c5834ded5643 | jp9573/LeetCode-Solutions | cpp/887. Super Egg Drop.cpp | class Solution {
public:
int dp[101][10001];
int solve(int e, int f)
{
if (f == 0 || f == 1 || e == 1)
return f;
if (dp[e][f] != -1)
return dp[e][f];
int ans = INT_MAX, temp, l = 1, h = f;
while (l <= h)
{
int mid = (l + h) / 2;
int left = solve(e - 1, mid - 1);
int right = solve(e, f - mid) ;
... | ALGO | 0.999983 | 4.848002 | {
"github_metadata": {
"branch": "main",
"commit_count": 531,
"repo_created_at": "2021-07-15T03:07:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 36,
"forks": 124,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bd248fd... |
6d203e87-dd9f-4478-bec3-8d9b573f73dd | Modnars/Tsinsen | cpp/A1021/main.cpp | // Source : http://www.tsinsen.com/A1021
// Author : Modnar
// Date : 2019-01-20
#include <iostream>
void swap(int &a, int &b) {
int temp = a;
a = b;
b = temp;
}
int min(int a, int b) {
if (a < b)
return a;
return b;
}
void quicksort(int list[], int m, int n) {
if (m < n) {
... | ALGO | 0.999998 | 3.672269 | {
"github_metadata": {
"branch": "master",
"commit_count": 45,
"repo_created_at": "2019-03-11T16:08:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "695c5b36b... |
9d4a19a6-088f-432d-8bfe-7c3046b1b5ad | karygauss03/Leetcode-Solutions | 1797-design-authentication-manager/1797-design-authentication-manager.cpp | class AuthenticationManager {
private:
int timeToLive;
unordered_map<string, int> tokenWithExpirationTime;
public:
AuthenticationManager(int timeToLive) {
this->timeToLive = timeToLive;
}
void generate(string tokenId, int currentTime) {
tokenWithExpirationTime[tokenId] = current... | ALGO | 0.94834 | 5.808798 | {
"github_metadata": {
"branch": "main",
"commit_count": 3023,
"repo_created_at": "2022-05-07T10:16:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 16,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "804726d2... |
3db5023d-08f5-4e23-9de9-4da6045d74c1 | purnamrita/LC | Cheapest Flights Within K Stops - GFG/cheapest-flights-within-k-stops.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
int CheapestFLight(int n, vector<vector<int>>& flights, int src, int dst, int K) {
vector<vector<int>> adj[n];
for(int i = 0; i < flights.size(); i++){
int u ... | ALGO | 0.999856 | 5.415044 | {
"github_metadata": {
"branch": "master",
"commit_count": 1002,
"repo_created_at": "2023-07-03T03:31:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fa46be5... |
cf7bf218-4d4c-421a-a203-5ced63a8e570 | sonumahajan/All_Program_helper | C++/MexOfSubarrayFinder.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
//#define int long long
using vi = vector<int>;
#define pb push_back
#define all(x) begin(x), end(x)
#define rsz resize
#define FOR(i,a,b) for(int i=(a); i<=(b); i++)
#define trav(a,x) for (auto& a: x)
#define MOD 1000000007
#define INF 1e16
void sta... | ALGO | 0.999958 | 4.926424 | {
"github_metadata": {
"branch": "main",
"commit_count": 1698,
"repo_created_at": "2021-10-01T14:26:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 64,
"forks": 331,
"issues": 1,
"pull_requests": 1
},
"file_meta": {
"content_id": "edba8b... |
3103a3d9-9806-4107-bfae-0a0a2abc6ba7 | GaussGreen/old-code | arm/dev/ARMGenPricer/GP_Infra/gpinfra/pricingfunctionir.h | /*!
*
* Copyright (c) CDC IXIS CM July 2003 Paris
*
* \file pricingfunctionlir.h
*
* \brief
* \author <NAME>
* \version 1.0
* \date July 2004
*/
#ifndef _INGPINFRA_PRICINGFUNCTIONIR_H
#define _INGPINFRA_PRICINGFUNCTIONIR_H
#include "gpbase/env.h"
#include "typedef.h"
CC_BEGIN_NAMESPACE( ARM ) /// macro ... | TOOL | 0.955527 | 4.529838 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2022-02-17T09:58:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "61a0d9fb4510... |
be764f48-e3f7-4947-946f-87e40830c853 | razibdeb/Programming | Leetcode/Algorithm/28. Find the Index of the First Occurrence in a String KMP Medium.cpp | /*
28. Find the Index of the First Occurrence in a String Medium
Given two strings needle and haystack, return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.
Example 1:
Input: haystack = "sadbutsad", needle = "sad"
Output: 0
Explanation: "sad" occurs at index 0 ... | ALGO | 0.999829 | 5.551943 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2022-02-01T09:20:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d82ccdc103f... |
31c53494-e050-4f4b-b067-6dd241985164 | takaxyz/atcoder | Typical90/012.cpp | #include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define PRINT(a) cout << (a) << endl
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define ... | ALGO | 0.999843 | 4.355413 | {
"github_metadata": {
"branch": "master",
"commit_count": 80,
"repo_created_at": "2018-10-28T03:22:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6c08560d8... |
ee182b50-c9c4-4746-9021-ad136dfe22e6 | Kawser-nerd/CLCDSA | Source Codes/CodeJamData/12/13/18.cpp | #include <algorithm>
#include <iostream>
#include <iomanip>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <string>
#include <vector>
#include <cmath>
#include <ctime>
using namespace std;
int n;
char side[51];
double vel[51], pos[51];
double INF = 1e100;
double eps = 1e-6;
bool linked[51][51];
bool ... | ALGO | 0.999555 | 4.276825 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2019-09-30T05:38:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 22,
"forks": 8,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "a639d481... |
8110044d-ca58-455f-a0df-9d9d00e66762 | Worldswayfarer/RayTracer | closest_intersection.cpp | #include "closest_intersection.h"
#include "global_values.h"
#include "BVH/BoundingVolumeTree.h"
#include <iostream>
Intersection* get_closest_intersection(size_t triangles_size, std::vector<triangle3>* triangles, ray& raymond)
{
Intersection* closest_intersection = nullptr;
for (int n = 0; n < triangles_... | ALGO | 0.999866 | 4.545789 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2024-05-07T16:01:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "344fda3ba13... |
c28a336f-8172-4ca5-bd25-274a3d7d4797 | NikitaTimoshin/1KursProgramms | 2sem/Fion/multigmp/DH.cpp | #include <gmp.h>
#include <rdtsc.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
FILE *fp;
int main() {
gmp_randstate_t state;
gmp_randinit_mt(state);
gmp_randseed_ui(state, time(0));
mpz_t q, p, g, x, y, X, Y, xx, yy;
mpz_inits(q, p, g, x, y, X, Y, xx, yy... | ALGO | 0.998701 | 3.380102 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2018-03-11T13:03:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "600f21f959... |
b37ddf61-05ac-4404-af31-f5e96137742b | ImperishableMe/codeforces-practice | cf-round-595/B.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main(){
ios::sync_with_stdio(0); cin.tie(0);
int t;
cin >> t;
while(t--){
int n;
cin >> n;
vector<int>p(n+1);
for(int i = 1 ; i <= n; i++) cin >> p[i] ;
vector<int>mark(n+1,0);
vec... | ALGO | 0.999952 | 3.594643 | {
"github_metadata": {
"branch": "master",
"commit_count": 57,
"repo_created_at": "2020-03-16T15:56:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "41bda3745... |
6b0af858-9d5f-4ce4-a0a3-46638ac80941 | KuangjuX-Archived/SimpleSqlParser | src/dfa.cpp | #include "dfa.hpp"
void NFAToDFA::print_vec(std::vector<int> vec) {
std::cout << "{";
for(std::vector<int>::const_iterator i = vec.begin(); i != vec.end(); i++) {
if(i != vec.end() - 1){
std::cout<< *i <<",";
}else {
std::cout<< *i;
}
}
std::cout<< "}";
... | ALGO | 0.998177 | 4.079462 | {
"github_metadata": {
"branch": "main",
"commit_count": 42,
"repo_created_at": "2022-03-29T12:20:18.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "aac7689168b9... |
89697f7c-cb9c-416b-8396-9b85c6fa99f5 | 5hawon/Competitive_Programming | C_Mr_Perfectly_Fine.cpp | #include <bits/stdc++.h>
using namespace std;
// defines...
#define ll long long
#define tata return;
#define pb push_back
#define mp make_pair
#define in insert
#define run \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#define YES cout << "YES" << endl;
#define NO cout << "NO"... | ALGO | 0.999751 | 4.237361 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-05-29T15:00:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f300a6307794... |
f8ee6c9f-f47a-4550-bb6f-d49bf7929a30 | mahadinaeem00/Problem-solve | BEECROWD/another 1047.cpp | #include <iostream>
using namespace std;
int main() {
int start_h, start_m, end_h, end_m;
cin >> start_h >> start_m >> end_h >> end_m;
int total_minutes = 0;
if (end_h > start_h || (end_h == start_h && end_m >= start_m)) {
// Same day
total_minutes = (end_h - start_h) * 60 + (end_m - ... | ALGO | 0.999676 | 4.726568 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2023-04-04T16:02:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fc6eb9bf459... |
b19d6833-499e-4316-b85e-a2afce6dd0b0 | Vaibhav14072004/DSA-Problems | 2891-maximum-beauty-of-an-array-after-applying-operation/maximum-beauty-of-an-array-after-applying-operation.cpp | // To become {x, y} overlapping
// x+k >= y-k ->>>> (y <= x + 2*k)
// Approach 3 -> Sorting + BinarySearch
// TC= O(N log N)
class Solution {
public:
int binarySearch(int y,vector<int> &nums)
{
int start= 0;
int end= nums.size()-1;
int idx;
while(start <= end)
{... | ALGO | 0.999862 | 6.041977 | {
"github_metadata": {
"branch": "main",
"commit_count": 1590,
"repo_created_at": "2023-08-17T14:37:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b23892aa3... |
18ff08a2-cbdc-43b4-8a0b-ed47a825a1ad | qRe0/algorithms_and_data_structures_bsu | Dynamic Programming/0_6_palindrome/main.cpp | #include <iostream>
#include <vector>
#include <fstream>
using namespace std;
int main() {
ifstream input("input.txt");
ofstream output("output.txt");
string s;
input >> s;
int n = s.length();
vector<vector<int>> dp(n, vector<int>(n, 0));
for (int i = 0; i < n; i++) {
dp[i][i] =... | ALGO | 0.999999 | 5.52338 | {
"github_metadata": {
"branch": "master",
"commit_count": 64,
"repo_created_at": "2024-01-08T16:07:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e3d08bec7... |
be0ef947-6856-4cfc-91ab-ff789da42710 | MrM21632/WinUtils | sort.cpp | /*
* sort.cpp: Sorting Utility. Given a list of numbers (via a file), sort them in
* ascending order with a considerably fast sorting algorithm. For purposes of
* speed, we will be using Quicksort.
*
* Version: 1.0.0
* License: MIT License (see LICENSE.txt for more details)
* Author: <NAME> (MrM2163... | ALGO | 0.999658 | 6.179683 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2017-11-12T18:11:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "314b90a2d... |
26b9ca9b-9314-4595-9e5b-8045093399ee | Valiev2002/LR5-2 | main.cpp | #include <iostream>
#include <algorithm>
#include <iterator>
#include "QueueList.h"
int main() {
QueueList lab;
std::cout << "Push back:" << " ";
lab.push_back(2);
std::cout << lab << std::endl;
lab.push_back(3);
std::cout << lab << std::endl;
lab.push_back(4);
std::cout << lab << ... | TOOL | 0.933494 | 4.127981 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2021-08-21T19:43:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "f3f5f085877b... |
b9a99ea3-f581-47d9-88cc-105195ded9b6 | Aravind-Suresh/OIC | C++ code/oic0.cpp | #include<opencv2/opencv.hpp>
#include<iostream>
#include<string.h>
#include<stdlib.h>
using namespace cv;
using namespace std;
void CannyThreshold(Mat src_gray, Mat& edge_gray, int lowThreshold, int highThreshold, int kernel_size)
{
//blur( src_gray, edge_gray, Size(3,3) );
GaussianBlur( src_gray, edge_gray, Size(5... | TOOL | 0.945981 | 4.254651 | {
"github_metadata": {
"branch": "master",
"commit_count": 129,
"repo_created_at": "2015-05-31T18:53:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a66f100f... |
fa6a7e37-b223-4c2a-bea1-b7bce883eb39 | Pkataki/Problem_Solving | uva/12532.cpp | #include<bits/stdc++.h>
using namespace std;
struct no
{
int pos,zero,neg;
no(){}
no(int pos, int zero, int neg) : pos(pos) , zero(zero), neg(neg) {}
};
no tree[400005];
int v[100000];
no combine(no a, no b)
{
no aux;
aux.pos = a.pos + b.pos;
aux.neg = a.neg + b.neg;
aux.zero = a.zero + b.zero;
return aux;
}
vo... | ALGO | 0.999927 | 4.096077 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2017-11-27T18:35:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b0f46af5ca... |
5c90c31b-dd29-4f4e-ae8c-d3f8db062ebd | wushiye/DataStructure | DataStructure/BinaryHeap/BinaryHeap1/BinaryHeap/main.cpp | //
// main.cpp
// BinaryHeap
//
// Created by admin on 2021/12/11.
//
#include "BinTHeap.hpp"
#include <iostream>
void generate_heap() {
BinTHeap<int> *heap = new BinTHeap<int>(); // (cnt, false)
std::cout << "is empty = " << (heap->isEmpty() ? "YES" : "NO") << "\n";
heap->push(5);
... | ALGO | 0.992809 | 4.00166 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2021-12-23T23:50:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "da92e8b76211... |
db5fa27d-9829-4960-a007-53735abcfc68 | kaantemel/Word-Graph | main.cpp | //
// main.cpp
// wordgraph
//
// Created by <NAME> on 12/25/21.
//
#include <iostream>
#include <unordered_map>
#include <fstream>
#include <iomanip>
#include <vector>
#include <stack>
using namespace std;
struct myStruct{
string word; // Stores the actual word
bool known; // Tracks whether the word ha... | ALGO | 0.999732 | 5.116808 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2022-07-02T00:12:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6c85679c91ca... |
e7871cf0-136e-49b8-9641-3993838db784 | pengsun/AOSOLogitBoost | src/AOSOLogitBoost.cpp | #include "AOSOLogitBoost.hpp"
using namespace std;
using namespace cv;
#define DBG
#ifdef DBG
#include <fstream>
std::ofstream ofs("output.txt");
#endif
// Implementation of AOSOSplitgain
AOSOSplitgain::AOSOSplitgain()
{
reset();
}
void AOSOSplitgain::reset()
{
var_idx_ = -1;
threshold_ = FLT_MAX;
subset_.r... | ALGO | 0.999583 | 5.096678 | {
"github_metadata": {
"branch": "master",
"commit_count": 52,
"repo_created_at": "2013-07-09T05:53:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9f8addf48... |
43a4e34b-f78b-4ad4-9625-3b51af77c009 | CTPdeBelenMarioQuezada/IntelNow2023 | Documents/IntelNow2023/src/Pruebaconjeturadebil2.cpp | #include <iostream>
#include <cmath>
using namespace std;
bool esPrimo(int numero);
int main()
{
int a, b;
do
{
cout << "Introduzca el valor de a y b: ";
cin >> a >> b;
} while (a >= b);
if (a % 2 != 0)
a++;
for (int i = a; i <= b; i += 3)
{
for (int n1 = ... | ALGO | 0.99956 | 3.905392 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2023-07-29T15:45:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "40f8d21d7e7... |
b212f995-cfcf-40bc-9482-2d869b08d4f2 | antoshkaplus/CompetitiveProgramming | SPOJ/bsheep.cpp |
#include <iostream>
#include <string>
#include <cmath>
#include <cstdio>
#include <set>
#include <limits>
#include <vector>
#include <queue>
#include <map>
#include <algorithm>
using namespace std;
typedef int Int;
typedef int Index;
struct Point {
Point() {}
Point(Int x, Int y) : x(x), y(y) {}
void ... | ALGO | 0.999993 | 4.397129 | {
"github_metadata": {
"branch": "master",
"commit_count": 80,
"repo_created_at": "2014-09-30T13:15:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "409ab4cbd... |
89456e96-78fc-428e-a62d-cda3681d2aa8 | tomm26177/OOP-in-C- | zadanie_2_i_4/Haslo.cpp | #include <iostream>
#include <string>
class Haslo {
public:
string Haslo;
public:
string getHaslo() {
return Haslo;
}
void setHaslo(String s) {
Haslo = s;
}
int jestSamogloska(int i)
{
char c = Haslo[i];
if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' || c == 'y' ||
c == 'A' || c... | TOOL | 0.940029 | 3.265646 | {
"github_metadata": {
"branch": "main",
"commit_count": 69,
"repo_created_at": "2023-03-23T07:48:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "445b7ca052b... |
UltraData-Stack-v3-L2
📦 UltraData Collection | 🌐 UltraData | 📖 Tech Report | 🤗 UltraData-Code | 🤗 UltraData-Code-L2 Classifier
English | 中文
📚 Introduction
UltraData-Stack-v3-L2 is a selected code corpus of approximately 240B tokens for the 11 programming languages in The Stack v3, obtained through quality-control cleaning and fine-grained selection with UltraData-Code-L2-Classifier. This dataset transfers the language-adaptive L2 selection framework proposed by UltraData-Code to another source corpus, in order to examine whether file-level algorithm-related relevance selection can generalize to data sources beyond UltraData-Code-L1.
Construction has two stages. First, source records are cleaned by removing URL-only entries, overly short records, and records containing garbled or malformed text. Second, a language-specific selector combines file-role prediction, algorithmic-relevance scoring, an EXCLUDE veto, and a shared code-quality constraint. The relevance threshold is calibrated separately for each language. The resulting dataset retains 20.10% of the cleaned 11-language candidate pool, and is intended to concentrate interpretable computation and problem-solving logic while preserving broad language coverage.
📢 What's New
- [2026.10.16] The UltraData-Code technical report is released! 🚀🚀🚀
- [2026.10.12] The UltraData-Stack-v3-L2 dataset is released! 🚀🚀🚀
- [2026.09.07] The UltraData-Code dataset is released! It is a complete implementation of the UltraData L0-L4 tiered data management framework. It covers four code data states from L0 through L3, with each level corresponding to a distinct construction stage. This release currently open-sources L2 (~400B tokens) and L3 (~150B tokens) across 11 programming languages. 🚀🚀🚀
- [2026.09.07] MiniCPM5-2B is released!, the second model in the MiniCPM5 series after MiniCPM5-1B. It is a dense 2B Transformer that scales up the same training recipe, built for on-device, local deployment, and resource-constrained scenarios. It reaches 2B-class open-source SOTA, remains competitive with 4B-class models, and shows particular advantages in coding, mathematics, long-context understanding, tool use, and agentic tasks. UltraData-RL-2609 serves as the core RL dataset for MiniCPM5-2B. 🚀🚀🚀
- [2026.02.08] The UltraData platform is now live, introducing the L0-L4 tiered data management framework. 🔍🔍🔍
💡 Highlights
- Transferable algorithmic-relevance selection: The same selection objective and model interfaces used for UltraData-Code-L2 are adapted to Stack-v3-train, with language-specific evidence and thresholds.
- Strong performance gains: Under the same 1B base model and 10B-token continual-pretraining setup, UltraData-Stack-v3-L2 reaches 30.00 average pass@1 on EvalPlus and 22.75 on MultiPL-E, compared with 25.37 and 17.30 for Stack-v3-train.
📊 Dataset Statistics
Token counts are estimated with the tokenizer used in the technical report.
| Language | After cleaning | After selection | Retention | Token share | Tokens |
|---|---|---|---|---|---|
| Python | 96,961,008 | 24,671,724 | 25.44% | 15.86% | 38.94B |
| Java | 165,346,828 | 41,963,467 | 25.38% | 28.76% | 70.60B |
| JavaScript | 110,967,790 | 14,521,755 | 13.09% | 12.92% | 31.73B |
| C++ | 67,981,897 | 17,990,102 | 26.46% | 12.78% | 31.38B |
| PHP | 65,565,149 | 5,500,141 | 8.39% | 10.26% | 25.19B |
| Ruby | 32,667,620 | 6,389,441 | 19.56% | 2.39% | 5.86B |
| Shell | 26,704,436 | 5,045,813 | 18.90% | 8.83% | 21.67B |
| C# | 17,309,141 | 3,548,274 | 20.50% | 3.64% | 8.93B |
| Go | 29,683,899 | 3,138,105 | 10.57% | 1.65% | 4.04B |
| Rust | 11,674,463 | 2,907,231 | 24.90% | 2.13% | 5.24B |
| R | 7,640,182 | 1,456,974 | 19.07% | 0.78% | 1.92B |
| Total | 632,502,413 | 127,133,027 | 20.10% | 100% | 245.50B |
📈 Evaluation Results
The 10B-token comparisons use the same 1B foundation model, training settings, decontamination, and evaluation protocol.
Python results: UltraData-Stack-v3-L2-py ranks second among the evaluated L2 datasets by average EvalPlus pass@1 and obtains the highest MBPP and MBPP+ scores at L2.
Multilingual results: UltraData-Stack-v3-L2 exceeds Stack-v3-train by 4.63 points on EvalPlus and 5.45 points on MultiPL-E, respectively, demonstrating effective L2 language-adaptive selection.
❤️ Acknowledgements
UltraData-Stack-v3-L2 is built from The Stack v3. The selection framework UltraData-Code-L2-Classifier is developed as part of UltraData-Code, and its file-level representations are computed with Qwen3-Embedding-0.6B.
Thanks to the authors and contributors of these open-source projects.
💳 License
The dataset is released under the Open Data Commons Attribution License (ODC-By) v1.0, consistent with the source dataset The Stack v3. Any use of all or part of the code gathered in UltraData-Stack-v3-L2 must abide by the terms of the original licenses, including attribution clauses where relevant.
📖 Citation
If you find this dataset useful in your research, please consider citing:
@article{tu2026ultradata,
title={{UltraData-Code}: From Raw Repositories to Algorithmically Dense and Task-Oriented Code Data},
author={Tu, Chengying and Zhao, Hengyu and Xue, Shuaikang and Qu, Zhongming and Zhou, Jihao and Lin, Xinle and Guo, Junshao and Fu, Zixuan and Ma, Qiang and Zhou, Jie and others},
journal={arXiv preprint arXiv:2610.23960},
year={2026}
}
- Downloads last month
- 3,783