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 |
|---|---|---|---|---|---|---|---|
a8eadc96-0591-4683-bf09-ede0fe2a9270 | gghati/Standard-Algorithms | Basic Algos/stack-matching-parentesis.cpp | # include <bits/stdc++.h>
using namespace std;
# define fastt ios::sync_with_stdio(0); cin.tie(0);cout.tie(0)
# define testt int T; cin>>T; while(T--)
# define ll long long
int main(){
fastt;
// testt{
int N;
cin >> N;
stack<int> s;
vector<int> v;
v.push_back(0);
i... | ALGO | 0.998985 | 3.181808 | {
"github_metadata": {
"branch": "master",
"commit_count": 141,
"repo_created_at": "2020-08-17T19:13:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 18,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4b9c18a... |
1aa6733e-356e-475a-a17a-c4508362b819 | Tora416/MultiCodeEmbed | dataset/dataset_raw/gcj_cpp/rodz/8294486_5681755159789568_rodz.cpp | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> ii;
typedef long long ll;
const int N = 110;
int dist[N][N];
int e[N], s[N];
int n;
double pd[N][N];
bool vis[N][N];
ll tdist[N][N];
bool vis2[N][N];
ll calc_tdist(int i, int j) {
if (i == j)
return 0;
if (vis2[i][j] == true)
return ... | ALGO | 0.999771 | 3.862044 | {
"github_metadata": {
"branch": "master",
"commit_count": 57,
"repo_created_at": "2025-07-10T08:38:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ff6a72181... |
8767401e-58b4-4f84-af0d-38a30a4362d4 | msjtw/Algorithmics | zadaniaOI/oi28/etap1/gan.cpp | #include <iostream>
#include <vector>
#include <set>
#include <tuple>
using namespace std;
typedef long long int ll;
typedef tuple<int, int, int> tiii;
const int MX = 1e5+7;
const int BASE = 1<<17;
vector<tiii> adj[MX];
multiset<int> tree[BASE<<1];
int flat[MX];
int subtree[MX]; // subtree size
int vals[MX];
int ro... | ALGO | 0.999693 | 3.684597 | {
"github_metadata": {
"branch": "main",
"commit_count": 157,
"repo_created_at": "2020-12-01T17:05:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1a1e1d8da6... |
b0aeb39d-f353-44f3-95bf-1d48280c3874 | SheafificationOfG/Fibsonicci | eval.cpp | #include <atomic>
#include <chrono>
#include <iostream>
#include <iomanip>
#include <optional>
#include <thread>
#include <pthread.h> /* for pthread_cancel */
#include "fib_base.h"
#ifndef LIMIT
#define LIMIT 1.0
#endif
using sec_t = std::chrono::duration<double>;
using std::uint64_t;
const sec_t soft_limit(LIMIT *... | ALGO | 0.998839 | 6.136118 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2024-07-14T03:56:36.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 126,
"forks": 13,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a93755b27e... |
173405e0-f139-4f53-a65e-f348150fff19 | angelvalay/ProgramasEnC | programacion_estructurada/unidad_2/027ordenamientoIsaac.cpp | #include <iostream>
#include <ctime>
#include <stdlib.h>
#include <stdio.h>
int main() {
int evaRango=0,longarreglo=0,numMin=0,numMax=0,aleatorio=0,index=0,i=0;
int evaluar=0,contador=0,flag=0,a=0,b=1,cnt=0;
srand(time(0));
printf("\n\nLongitud arreglo: ");
scanf("%d",&longarreglo);
printf("\nIn... | ALGO | 0.999295 | 3.476181 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2018-08-27T07:09: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": "b49b9fc143... |
0608923b-a6e5-440a-8538-0ec9094a69c2 | LargeDumpling/Programming-Contest | Trainings/2018My_All/2018.10.6/I.cpp | /*
Author: LargeDumpling
Email: <EMAIL>
Edit History:
2018-10-06 File created.
*/
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
const int MAXN=100050;
const int INF=2147483647;
int n,m,k,fir[MAXN],edd[MAXN<<1],nxt[MAXN<<1],ed=0;
int... | ALGO | 0.999987 | 3.885833 | {
"github_metadata": {
"branch": "master",
"commit_count": 113,
"repo_created_at": "2017-10-17T05:22:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "411dc50a... |
b3d675f5-3a1c-4568-b051-11364792c626 | manageryzy/lineCircle | lineCycle/cut/cutCPU.cpp | #include "../stdafx.h"
#include "../resource.h"
int countInside;
int countOutside;
int countCross;
namespace cpuCUT{
__inline float mult(Point a, Point b, Point c);
int gra[768][1366];
HANDLE * events;
const float eps = 1e-8;
const float PI = 3.141592653;
vector <Line *> * cutLineListList;
vector <CArc ... | ALGO | 0.99613 | 3.266374 | {
"github_metadata": {
"branch": "master",
"commit_count": 89,
"repo_created_at": "2015-04-23T05:36:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f9a747e98... |
00ac6d03-6744-4bcb-b682-eb178e4e5c89 | hushell/cnf | toys/rtcrf/src/rtcrflearn.hpp | # ifndef __RTCRFLEARN__
# define __RTCRFLEARN__
# include "rtcrf.hpp"
# include "sparsevect.h"
namespace RtCrf
{
typedef struct
{
float _alpha;
float _beta;
float _lcost;
} fbnode;
class Crflearn : public RtCrf::Crf
{
public:
Crflearn(const char *tmpl, const char *corp... | DATA | 0.945511 | 6.794162 | {
"github_metadata": {
"branch": "master",
"commit_count": 43,
"repo_created_at": "2015-07-02T10:19:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2d01bf1f2... |
7383be45-2fa8-4777-92be-77c7f71f904b | andreimargeloiu/Competitive-programming-problems | carrie.cpp | # include <fstream>
# include <algorithm>
# include <cstring>
# define mod 30211
# define NR 100005
using namespace std;
ifstream f("carry.in");
ofstream g("carry.out");
int i,j,n,m,K;
int a[NR][102][2], adaug[50], mentin[50], nr[NR];
// a[i][j]-numarul de moduri ca sa ajungi la pozitia i, facand j carryuri la de la po... | ALGO | 0.999934 | 3.835825 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-09-17T16:24:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 67,
"forks": 59,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "d86db1d4... |
dbc0393c-9da4-41d3-93b1-5de077c160e0 | orionrobots/uArm_code | open_close_gripper.ino | /* Sweep uArm Gripper. Based on original Arduino sweep demo */
#include <Servo.h>
Servo myservo; // create servo object to control a servo
// a maximum of eight servo objects can be created
int pos = 0; // variable to store the servo position
void setup()
{
myservo.attach(9); // atta... | ALGO | 0.963378 | 5.82771 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2014-05-24T17:18:33.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f61cb61a90e... |
1f67b844-e78c-4552-8141-1f98d3f90d15 | RiyaadHossain/Introduction-to-Data-Structure | Module 9/deletation.cpp | #include <bits/stdc++.h>
using namespace std;
class Node
{
public:
int val;
Node *next;
Node *prev;
Node(int val)
{
this->val = val;
this->next = NULL;
this->prev = NULL;
}
};
void printNodes(Node *head)
{
Node *tmp = head;
while (tmp)
{
cout << tmp... | ALGO | 0.999887 | 4.133954 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2023-11-28T03:59:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3051f81316a... |
67c71257-170e-4205-b7af-269adbb8fc49 | GrandDawn/USTC-randomized-thevenin | thevenin.cpp | #include <vector>
#include <unordered_set>
#include <map>
#include <random>
#include <chrono>
#include <thread>
#include <algorithm>
#include <queue>
#include "adjustment.cpp"
namespace thevenin_theorem{
using namespace std;
vector<tuple<int, int, char, equiv_R::complex>> v;
void init(vector<tuple<int, int, char, e... | ALGO | 0.995681 | 3.739654 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-12-14T12:37: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": "de679f8991b2... |
d2cc09ae-835e-48a5-8d15-52329b78da2d | calvinckfong/leetcode | 1000/0036.cpp | // 36. Valid Sudoku
class Solution {
public:
bool isValidSudoku(vector<vector<char>>& board) {
// row
for (int i=0; i<9; i++)
{
map<char, int> freq;
for (int j=0; j<9; j++)
{
char c = board[i][j];
if (c=='.') continue;
... | ALGO | 0.999219 | 6.439534 | {
"github_metadata": {
"branch": "master",
"commit_count": 768,
"repo_created_at": "2024-02-01T04:10:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fadd7cf9... |
2cabebd8-a40e-498e-a4a9-fb5fe6aaf13e | ShahjalalShohag/code-library | Number Theory/Sum of nCi over a Fixed Congruence Class.cpp | #include<bits/stdc++.h>
using namespace std;
const int N = 1 << 16;
const int mod = 998244353;
const int root = 3;
using ll = long long;
int lim, rev[N], w[N], wn[N], inv_lim;
void reduce(int &x) { x = (x + mod) % mod; }
int POW(int x, int y, int ans = 1) {
for (; y; y >>= 1, x = (long long) x * x % mod) if (y & 1) ... | ALGO | 0.999992 | 4.70909 | {
"github_metadata": {
"branch": "main",
"commit_count": 952,
"repo_created_at": "2018-11-18T08:49:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3240,
"forks": 840,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "a2f3b... |
55691155-f02b-49a0-ab21-bd4934d51bfb | JohnathonB6573/CS-201-Labs | Exam1/exam.cpp | #include <iostream>
#include <string>
#include <vector>
#include <fstream>
#include <iomanip>
#include <sstream>
#include "exam.h"
using namespace std;
void readFile(vector<double> &tv, vector<double> &dvd, vector<double> &music) {
ifstream fin;
fin.open("input-2.txt");//opens the file
string currType;
double ... | TOOL | 0.939819 | 4.018419 | {
"github_metadata": {
"branch": "main",
"commit_count": 28,
"repo_created_at": "2022-08-10T19:37:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cd4a5933bfe... |
932b17aa-9c8f-4797-b46a-dbcd17e978f1 | ishandutta2007/codeforces-a | antoine/normal/1158/F.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define DBG(v) cerr << #v << " = " << (v) << endl;
const int mod = 998244353;
const ll mod2 = (ll) mod * mod;
ll modPow(ll n, ll k) {
ll res = 1;
for (n %= mod; k; k >>= 1) {
if (k & 1)
res = res * n % mod;
n = n * n % mod;
}
return res;
}... | ALGO | 0.999984 | 3.975384 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-04-11T00:51:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "55d8ac54e07d... |
cffc0a5a-f7a4-4cf3-a6f3-66212ea337ff | thegamer1907/Code_Analysis | scrape/data/Tokitsukaze and Discard Items/Phemon_A.cpp | #include<bits/stdc++.h>
using namespace std;
long long n, m, k;
long long p[100010];
long long tot = 0;
long long kk = 0, kkk = 0;
long long ans;
bool flag = 0;
int main(){
cin >> n >> m >> k;
for (int i = 1; i <= m;i++)
scanf("%lld", &p[i]);
tot = 1;
ans = 1;
while (tot <= m){
if (p... | ALGO | 0.999967 | 3.228296 | {
"github_metadata": {
"branch": "master",
"commit_count": 73,
"repo_created_at": "2019-05-24T10:35:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "12f3ebf81... |
81b5bb28-1b8f-4414-988e-d2d374f4b502 | OpenMORA/nav-slam-pkg | LaserOdometry2D/CLaserOdometry2D.cpp | /* +---------------------------------------------------------------------------+
| Open MORA (MObile Robot Arquitecture) |
| |
| http://babel.isa.uma.es/mora/ |
| ... | TOOL | 0.979441 | 6.047978 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2014-05-26T09:41:07.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 21,
"forks": 13,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4bb27d65... |
9bbbd80e-b21a-4a77-8a29-d5f823cdc582 | tatsumack/atcoder | abc153/ECrestedIbisVsMonster.cpp | #include <iostream>
#include <limits.h>
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#incl... | ALGO | 0.999701 | 3.488001 | {
"github_metadata": {
"branch": "master",
"commit_count": 527,
"repo_created_at": "2018-03-12T23:22:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7efb4749... |
3772a089-7216-4640-a82b-07b4b1683106 | clatisus/ACM-ICPC-Team-Archive | zhongzihao-personal/templates/source_back/fft/fft/fft.cpp | #include<bits/stdc++.h>
const double PI = acos(-1.0);
void FFT(std::complex <double> *a, int length, int type){
std::complex <double> *w = new std::complex <double> [length];
for (int i = 0; i < length; ++ i){
double angle = 1.0 * i / (length >> 1) * PI;
w[i] = std::complex <double>(cos(angle), type * sin(angle... | ALGO | 0.99945 | 3.603819 | {
"github_metadata": {
"branch": "master",
"commit_count": 577,
"repo_created_at": "2018-06-11T16:19:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "10949d81... |
bce6a02e-40ce-4741-b6d3-becc4ee4d185 | Arteezy09/Data-Structures | BinHeap.cpp | #include<iostream>
#include<climits>
#include <fstream>
#include <string>
#include <cstring>
#include <limits>
#include <chrono>
using namespace std;
ifstream f1;
ofstream f2;
void swap(int *x, int *y)
{
int temp = *x;
*x = *y;
*y = temp;
}
class MinHeap
{
int *arr;
int max_size;
int heap_si... | ALGO | 0.996789 | 3.988387 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2018-01-15T17:17:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0021d5dee3... |
6ad8fe8c-ecac-480f-919f-b08654ec5eec | winniez/myleetcode | maximal-rectangle.cpp | /*
Maximal Rectangle
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.
*/
/*
Mar 19 2014
Solution:
- create height matrix same size as input matrix, preprosess the input matrix to get the hight (number) of 1's above (and include) each cell;
- run larg... | ALGO | 0.999941 | 6.999974 | {
"github_metadata": {
"branch": "master",
"commit_count": 148,
"repo_created_at": "2013-12-17T23:43:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "150ed7f0... |
efe45a3b-2546-4de3-be83-dad706baca01 | Yawn-Sean/Daily_CF_Problems | daily_problems/2025/06/0621/personal_submission/cf618c_lengli.cpp | /*
lengli_QAQ
Hope there are no bugs!!!
*/
#include <bits/stdc++.h>
#define fastio std::ios::sync_with_stdio(0); std::cin.tie(0); std::cout.tie(0)
#define all(x) x.begin(),x.end()
#define pb push_back
#define i64 long long
constexpr i64 inf=5e18;
struct Point {
i64 x, y;
Point(i64 x0 = 0, i64 y0 = 0) : x(x0),... | ALGO | 0.999969 | 4.027285 | {
"github_metadata": {
"branch": "main",
"commit_count": 20410,
"repo_created_at": "2024-02-26T01:04:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 478,
"forks": 302,
"issues": 0,
"pull_requests": 7
},
"file_meta": {
"content_id": "3bee... |
d2b3ea7e-2757-441f-9096-e5e91a9df095 | uxth/leetcode | cpp/1453.maximum-number-of-darts-inside-of-a-circular-dartboard.cpp | /*
* @lc app=leetcode id=1453 lang=cpp
*
* [1453] Maximum Number of Darts Inside of a Circular Dartboard
*
* https://leetcode.com/problems/maximum-number-of-darts-inside-of-a-circular-dartboard/description/
*
* algorithms
* Hard (33.68%)
* Likes: 79
* Dislikes: 198
* Total Accepted: 3.4K
* Total Submi... | ALGO | 0.999779 | 6.25476 | {
"github_metadata": {
"branch": "main",
"commit_count": 202,
"repo_created_at": "2023-08-31T18:12: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": "c7d0fbc6be... |
52b7d655-e7ee-4b57-a708-fc981a6ca768 | bound1ess/codeforces-problemset | 471/a.cpp | #include <cstdio>
#include <algorithm>
#define BEAR "Bear\n"
#define ELEPHANT "Elephant\n"
#define ALIEN "Alien\n"
const int N = 6;
int a[N];
inline int count(int val, int i) {
int count = 0;
for (; i < N; ++i) {
if (a[i] == val) {
++count;
}
}
return count;
}
int main() {
for (int i = 0; ... | ALGO | 0.992335 | 3.09563 | {
"github_metadata": {
"branch": "master",
"commit_count": 364,
"repo_created_at": "2015-05-14T09:32:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8531068d... |
fb9915d0-0608-48af-a51e-85ced98409b1 | hyperon-hyeon/Digital-Image-Processing | code/histoEqualizationNstretching.cpp | #pragma warning(disable:4996)
#include <stdio.h>
#include <stdlib.h>
#include <Windows.h>
void obtainHisto(BYTE* Img, int* Histo, int W, int H) {
int ImgSize = W * H;
for (int i = 0; i < ImgSize; i++) Histo[Img[i]]++;
}
void obtainAHisto(int*Histo, int*AHisto) {
for (int i = 1; i < 256; i++) {
AHisto[i] = AHisto... | ALGO | 0.996457 | 3.550242 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2025-04-19T14:59:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f167f6fef63... |
278ed18d-6a53-43da-9a1f-6f8304a32733 | emilyju0314/gpt_code_plagiarism | dataset/code_content_classifier/allpro_train/0_0_4852.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
int n, k, x;
cin >> n >> k >> x;
vector<int> beauty(n);
for(int i = 0; i < n; i++) {
cin >> beauty[i];
}
vector<vector<long long>> dp(n + 1, vector<long long>(x + 1, 0));
for(int i = 1; ... | ALGO | 0.999972 | 4.604618 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2024-04-28T03:59: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": "1fc5de44d29... |
21028ad6-338a-4263-a661-f944bd8a5418 | q1375854021/LeetCode | Code_think/P106_build_binarytree/Vscode_CPP/source/main.cpp | #include <cstddef>
#include <iostream>
#include <unordered_map>
#include <vector>
#include <numeric>
#include <list>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <deque>
using std::list;
using std::accumulate;
using std::vector;
using std::max;
using std::min;
using std::cout;
usin... | ALGO | 0.999991 | 6.156696 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2025-05-20T06:47:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7858aaf7db2... |
5262034d-299c-4e5d-bd3d-f36966d89ed6 | jccarvalhosa/maratona | live-archive/north_america/pacific_northwest/2009/sith.cpp | #include <cstdio>
#include <iostream>
#include <cstring>
using namespace std;
char s[55][55];
int v[55555];
int vis[55];
int main()
{
int n, c, l, l2, r, r2, y;
cin >> n;
for(int i=1;i<=n;i++) {
scanf(" %[^\n] %d.%d %d.%d", s[i], &l, &l2, &r, &r2);
l = l*10+l2;
r = r*10+r2;
... | ALGO | 0.999319 | 3.984666 | {
"github_metadata": {
"branch": "master",
"commit_count": 482,
"repo_created_at": "2012-12-12T23:19:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6cff4004... |
1f8ad211-5083-49c4-90c4-294ae8a90115 | saltytrain2/Cowbot | src/MoveOrdering.cpp | #include "MoveOrdering.h"
#include <vector>
#include <algorithm>
#include "Move.h"
#include "types.h"
using namespace Cowbot;
MoveOrdering::MoveOrdering(ChessBoard *board, FakeEval* fakeEval)
: mBoard(board), mFakeEval(fakeEval), mHistory{}
{}
void MoveOrdering::orderMoves(moveVectorIter begin, moveVectorIter ... | ALGO | 0.993068 | 6.840928 | {
"github_metadata": {
"branch": "main",
"commit_count": 49,
"repo_created_at": "2022-03-12T17:21:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7a559cd7146... |
ff413213-1a28-4b07-9019-4f0dd52fc686 | Yash15301/hackerrank-cpp | virtual_functions.cpp | #include<cmath>
#include<cstdio>
#include<vector>
#include<iostream>
#include<algorithm>
using namespace std;
class Person
{
public:
int age;
string name;
virtual void getdata()
{
cin >> this->name >> this->age;
}
virtual void putdata()
{
... | ALGO | 0.940811 | 3.01712 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2021-08-11T16:29:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b57aa6d6870d... |
3b1d543c-8596-4533-ba7e-af8aa9297352 | ANYbotics/grid_map | grid_map_demos/src/iterator_benchmark.cpp | /*
* grid_map_iterator_benchmark.hpp
*
* Created on: Feb 15, 2016
* Authors: <NAME>, <NAME>
*/
#include <grid_map_core/grid_map_core.hpp>
#include <chrono>
#include <iostream>
using namespace std;
using namespace std::chrono;
using namespace grid_map;
#define duration(a) duration_cast<milliseconds>(a).coun... | TEST | 0.932088 | 6.211594 | {
"github_metadata": {
"branch": "master",
"commit_count": 803,
"repo_created_at": "2014-09-11T17:17:59.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2885,
"forks": 834,
"issues": 105,
"pull_requests": 46
},
"file_meta": {
"content_id": "d... |
c99849e0-dbef-4d4f-906c-c577b4f70ba1 | ImArvy/Google-Practice | CountSortGooglePractice.cpp | #include <iostream>
using namespace std;
int findMin(int inputArray[], int size) {
int min = INT_MAX;
for (int i = 0; i < size; i++) {
if (inputArray[i] < min) {
min = inputArray[i];
}
}
return min;
}
int findMax(int inputArray[], int size) {
int max = INT_MIN;
... | ALGO | 0.999988 | 6.290113 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2022-07-29T05:13:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f3b99c464346... |
0d6fd6e6-671e-4177-b41c-cfa6f71cb4e6 | weolar/miniblink49 | third_party/skia/src/pathops/SkOpCoincidence.cpp | /*
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkOpCoincidence.h"
#include "SkOpSegment.h"
#include "SkPathOpsTSect.h"
bool SkOpCoincidence::extend(SkOpPtT* coinPtTStart, SkOpPtT* coinPtTEnd, SkOpPtT* oppPtTStart... | TOOL | 0.994959 | 3.299592 | {
"github_metadata": {
"branch": "master",
"commit_count": 1788,
"repo_created_at": "2016-09-27T03:41:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7578,
"forks": 1142,
"issues": 340,
"pull_requests": 6
},
"file_meta": {
"content_id": ... |
a419e83a-5093-49ea-a174-dfaef0b3effd | yanyanlongxia/MyCode | MyProjects/C++/2020/07.19/set.cpp | //
// Created by admin on 2020/7/20.
//
#include <bits/stdc++.h>
#define int long long
#define MN 200500
using namespace std;
int fa[MN],n,m,a[MN],s[MN],sz[MN],tag[MN];
vector<int>ele[MN];
inline int read()
{
int x=0,ff=1;char ch=getchar();
while (!isdigit(ch))
{
if (ch=='-')
ff=-1;
... | ALGO | 0.999912 | 4.515977 | {
"github_metadata": {
"branch": "main",
"commit_count": 85,
"repo_created_at": "2021-01-09T04:12:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "76a4870cb9a... |
026d4ee8-5b35-4fbe-bb15-d0521e7b84bc | LeeQmoon/caculator | main.cpp | #include<iostream>
#include<sstream>
#include<cmath>
#include"Stack.cpp"
#include<string.h>
using namespace std;
double TransformDigit(NumberStack& number);//把数字字符串转化为数值
void SaveResultToStack(double temp, NumberStack& number);//把计算结果存入数字栈中
double Caculate(char ch, NumberStack& number);//计算结果
double GetResult(NumberS... | ALGO | 0.99987 | 3.441844 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2019-04-21T11:29: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": "4ac0baf44... |
dc4079d3-2293-49c4-828a-90db08b3db34 | juniperdiego/LeeetCode | multiplyStrings/main.cpp | #include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <algorithm>
using namespace std;
void printArray(int *array, int size)
{
for(int i = 0; i < size; i++)
cout << array[i]<< "\t" ;
cout << endl;
}
void printVector(vector<int> array ... | ALGO | 0.99989 | 5.144357 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2015-04-10T03:23:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8684b4ef1... |
7802fcbc-1a59-4b3b-9f20-85e3cff8e24c | otavioon/COLA-2022-Tools | datasets/src/optz/codenet/0/p02936_s149031882.cpp | #include <iostream>
#include <vector>
using namespace std;
typedef struct {
int p;
int x;
} pxdata;
vector <int> *tree;
int *counter;
void func( int p, int x )
{
counter[p] += x;
// cout << "add [" << p << "]+" << x << endl;
for ( int i = 0; i < tree[p].size(); i ++ ) {
func( tree[p][i], x )... | ALGO | 0.999593 | 3.995581 | {
"github_metadata": {
"branch": "master",
"commit_count": 70,
"repo_created_at": "2022-06-08T12:17:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5a7025aa9... |
67085388-d382-4230-b554-6a152803652c | ishandutta2007/codeforces-l | lhic/normal/1045/I.cpp | #ifndef BZ
#pragma GCC optimize "-O3"
#endif
#include <bits/stdc++.h>
#define FASTIO
#define ALL(v) (v).begin(), (v).end()
#define rep(i, l, r) for (int i = (l); i < (r); ++i)
#ifdef FASTIO
#define scanf abacaba
#define printf abacaba
#endif
typedef long long ll;
typedef long double ld;
typedef unsigned long long ul... | ALGO | 0.99993 | 3.852269 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T06:17:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3690921dbe78... |
340b2ed8-f9d7-46a4-91cb-01a011696215 | PoorvKumar/LeetCode | 0134-gas-station/0134-gas-station.cpp | class Solution
{
private:
// queue<int> q;
stack<int> q;
int n;
int canComplete(vector<int>& gas,vector<int>& cost,int index)
{
int i=index;
// int initialGas=0;
// int val=initialGas+gas[index]-cost[index];
int val=0;
do
{
v... | ALGO | 0.999991 | 5.32345 | {
"github_metadata": {
"branch": "main",
"commit_count": 2949,
"repo_created_at": "2022-09-10T04:29:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "337f044b0... |
4612e754-e1a6-4218-82f9-0792028f059b | v-spath/diamond-blastn | src/dp/swipe/anchored_wrapper.cpp | #include <memory>
#include "../dp.h"
#include "anchored.h"
#include "../score_profile.h"
#include "../score_vector_int8.h"
#include "../score_vector_int16.h"
#include "../dp/ungapped.h"
#include "../util/simd/dispatch.h"
using std::list;
using std::vector;
using std::unique_ptr;
using std::pair;
using std::sort;
using... | ALGO | 0.98624 | 5.629974 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-03-03T21:32:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0dcb9a2e6789... |
b9e79168-2ba2-41ba-b51c-1b049f84ef53 | watermelonCrane/PS-Practice | BOJ/7568.cpp | //성공
#include <iostream>
#include <vector>
using namespace std;
bool operator<(pair<int, int>& a, pair<int, int>& b) {
return a.first < b.first && a.second < b.second;
}
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
int N;
cin >> N;
vector<pair<int, int>> listmob(N);
for (a... | ALGO | 0.999989 | 4.506777 | {
"github_metadata": {
"branch": "main",
"commit_count": 109,
"repo_created_at": "2023-07-25T14:15:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "72b76d82b8... |
1db4060c-37b2-4ca8-ad78-f2e5966bd856 | PRDeltoid/CISP430 | Lectures/Examples/char_stack.cpp | #include <iostream>
#include <string>
using namespace std;
const int MAX = 100;
char stack[MAX];
int top = -1;
int is_empty() {
if(top == -1) {
return 1;
} else {
return 0;
}
}
int is_full() {
if(top == MAX) {
return 1;
} else {
return 0;
}
}
char peek() {
... | ALGO | 0.998871 | 4.779215 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2017-08-30T01:46:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f37863a93... |
94f6098c-7f66-4d84-8c2b-3c1062002b3d | timi-liuliang/echo | thirdparty/jplayer/thirdparty/libde265/libde265/encoder/algo/tb-rateestim.cc | /*
* H.265 video codec.
* Copyright (c) 2013-2014 struktur AG, <NAME> <<EMAIL>>
*
* Authors: struktur AG, <NAME> <<EMAIL>>
*
* This file is part of libde265.
*
* libde265 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the... | ALGO | 0.958927 | 6.3442 | {
"github_metadata": {
"branch": "master",
"commit_count": 3016,
"repo_created_at": "2018-03-10T04:07:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 971,
"forks": 116,
"issues": 254,
"pull_requests": 0
},
"file_meta": {
"content_id": "2... |
4a60a04b-e614-47a4-9723-536c1a8a7835 | SakodaShintaro/gui_based_shogi_engine | cpp/main_functions/solve_grid_world.cpp | #include "../grid_world.hpp"
#include <fstream>
class NeuralNetworkImpl : public torch::nn::Module
{
public:
NeuralNetworkImpl() = default;
NeuralNetworkImpl(int64_t h, int64_t w) : h_(h), w_(w), square_(h * w)
{
using namespace torch::nn;
const std::vector<std::pair<int64_t, int64_t>> in_out_channels ... | ALGO | 0.998378 | 5.540899 | {
"github_metadata": {
"branch": "main",
"commit_count": 228,
"repo_created_at": "2023-12-06T07:23:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "518959c5a5... |
f503bc22-8641-41da-be2e-e0a7258a2d32 | liuyubobobo/Play-Leetcode | 0501-1000/0926-Flip-String-to-Monotone-Increasing/cpp-0926/main.cpp | /// Source : https://leetcode.com/problems/flip-string-to-monotone-increasing/
/// Author : liuyubobobo
/// Time : 2018-10-20
#include <iostream>
#include <vector>
using namespace std;
/// Precalculation
/// Time Complexity: O(n)
/// Space Complexity: O(n)
class Solution {
public:
int minFlipsMonoIncr(string ... | ALGO | 0.999991 | 5.571542 | {
"github_metadata": {
"branch": "master",
"commit_count": 2592,
"repo_created_at": "2016-12-01T17:08:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2732,
"forks": 718,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "b6... |
bcaa1fd4-b296-4783-b4ca-48560e920e92 | vd-07/CP | hackerrank/cnc02/3.cpp | #include <bits/stdc++.h>
#define int unsigned long long int
using namespace std;
int v[100001][3];
int n;
int dp[100001][3];
int selectMe(int choconum, int ans, int lastselection) {
if(dp[choconum][lastselection] != -1)
return dp[choconum][lastselection];
if(choconum == n)
return ans;
int ... | ALGO | 0.999931 | 3.883084 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2019-09-09T18:28:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "14c14ae64... |
d7fed069-d40b-4ca4-9796-7d295707bc3a | liuxinyuanxy/myCode | p3332.cpp | #include <iostream>
#include <cstdio>
#include <algorithm>
#define gc getchar
using namespace std;
template <typename T> void rd(T& s)
{
s = 0;
bool p = 0;
char ch;
while (ch = gc(), p |= ch == '-', ch < '0' || ch > '9');
while (s = s * 10 + ch - '0', ch = gc(), ch >= '0' && ch <= '9');
s *= (p ? -1 : 1);
}
templ... | ALGO | 0.999979 | 4.190981 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2021-10-07T17:09:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "eeb3bfbcb... |
2a5b5e1d-a841-496a-8f43-c5907dca85a3 | rybak/ITMO | computational-geometry/contests/cg2011/p1.1/golden_segment_intersection/check.cpp | #include <iostream>
#include <memory>
#include <CGAL/Segment_2_Segment_2_intersection.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include "common.h"
#pragma pack(push, 1)
struct segment_pair
{
cg::segment_2 first;
cg::segment_2 second;
};
#pragma pack(pop)
typedef CGAL::Exact_predicate... | ALGO | 0.978195 | 4.970905 | {
"github_metadata": {
"branch": "main",
"commit_count": 1277,
"repo_created_at": "2023-07-15T17:48:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a65008bee... |
7664b1c1-52a8-4692-921f-26858917f500 | OshadaViraj/LineFollower | ROBOT.ino |
#define THRESHOLD 100
unsigned int sensorValues[6];
int flag;
int in1=8;
int in2=9;
int in3=10;
int in4=11;
int en1=0;
int en2=1;
int Rspeed;
int Lspeed;
void setup()
{
delay(500);
pinMode(A0,INPUT);
pinMode(A1,INPUT);
pinMode(A2,INPUT);
pinMode(A3,INPUT);
pinMode(A4,INPUT);
pinMode(A5,INPUT);
pinMode(in... | TOOL | 0.959041 | 3.786702 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2016-05-20T15:36:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "582fcc5b72... |
e2524cf2-4f5a-4f83-bbfd-851b955155d0 | Freeverc/point-cloud-processing | cluster/cpp/src/main.cpp | #include "cluster.h"
#include "opencv2/core.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/imgproc.hpp"
#include <iostream>
#include <string>
#include <vector>
int main(int argc, char *argv[]) {
std::cout << "Point cloud clustering : " << std::endl;
std::cout << "./point_cluster point_cloud_path clustered_... | ALGO | 0.971715 | 5.927204 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2021-07-12T17:42:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8d2d3c0b3... |
26843a0f-74dd-4c2e-8aaf-afe2140fecb6 | Yang-Junjie/AlgorithmSolutions | luogu/P1803/main.cpp | // #include <algorithm>
// #include <iostream>
// #include <string>
// #include <utility>
// #include <vector>
// #include <numeric>
// #include <limits>
// #include <iomanip>
// #include <cmath>
// #include <set>
#include <bits/stdc++.h>
using namespace std;
#define LEN(a) ((int)(a).size())
#define ALL(x) (x).begin()... | ALGO | 0.99992 | 4.044675 | {
"github_metadata": {
"branch": "master",
"commit_count": 161,
"repo_created_at": "2025-03-25T08:57: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": "60dcad6b... |
a37bad8f-3f48-437e-8a87-b19b95909a5c | satyamtiwari736182/CP | pepcoding/Level 1/Dev C++/DP_Practice_3.cpp | #include<bits/stdc++.h>
using namespace std;
#define REP(i,a,b) for(i=a;i<=b;i++)
#define REP2(i,a,b) for(i=a;i<=b;i++)
#define print(arr,l,r) for(int i=l;i<=r;i++) cout<<arr[i]<<" ";
#define vi vector<int>
#define all(x) x.begin(),x.end()
#define pi pair<int,int>
#define ll long long
#define fs first
#define se secon... | ALGO | 0.999731 | 3.081318 | {
"github_metadata": {
"branch": "main",
"commit_count": 36,
"repo_created_at": "2022-02-26T18:00:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "257405ead63... |
8a563e16-871f-4e95-a62a-d27cc14788ff | a4org/A4 | LeetCode/Graph/DFS/BinaryTreeMaximumPathSum.cpp | /*
* LeetCode 124 Binary Tree Maximum Path Sum
* Hard
* <NAME>
* 2021.8.23
*/
/* Revision
*
* $1 2022.5.6 <NAME>
*
*/
#include <vector>
using namespace::std;
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode() : val(0), left(nullptr), right(nullptr) {}
TreeNode(i... | ALGO | 0.999984 | 6.127456 | {
"github_metadata": {
"branch": "main",
"commit_count": 492,
"repo_created_at": "2021-05-11T18:19:59.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4346282181b... |
e1954f02-10fe-4f05-a64e-d39c52b05370 | NceBoy/NceAlg | nce_alg/platform/openvino/samples/args_helper.hpp | // Copyright (C) 2018-2019 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
/**
* @brief a header file with common samples functionality
* @file args_helper.hpp
*/
#pragma once
#include <algorithm>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <gflags/gflags.h>
#include... | TOOL | 0.961862 | 6.125398 | {
"github_metadata": {
"branch": "master",
"commit_count": 125,
"repo_created_at": "2021-02-23T07:44:12.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 32,
"forks": 10,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "5bf0b19... |
7f0882d1-11fd-4b84-858d-547a71b8a6b5 | emilybache/Tennis-Refactoring-Kata | cpp/tennis4.cc | #include <string>
class TennisResult {
public:
TennisResult(std::string serverScore, std::string receiverScore) {
this->serverScore = serverScore;
this->receiverScore = receiverScore;
}
std::string format() {
if ("" == this->receiverScore)
return this->serverScore;
... | ALGO | 0.988956 | 6.023697 | {
"github_metadata": {
"branch": "main",
"commit_count": 588,
"repo_created_at": "2013-06-10T12:36:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 780,
"forks": 1324,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "2abce... |
7c918f1d-da48-4d8c-b793-b01d3e90127b | adam-wolcott/cisp1020-projects | 7/7.20/cisp2-chapter7.20.cpp | // Exercise #20
// In the student sample programs for this book, you will find a text file named 1994_Weekly_Gas_Averages.txt.
// The file contains the average gas price for each week in the year 1994.
// (There are 52 lines in the file. Line 1 contains the average price for week 1, line 2 contains the average price f... | TOOL | 0.98142 | 5.193677 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2021-02-11T07:55: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": "60df8c7a9045... |
06607329-9470-4b7a-be37-e61eb116bb59 | KrissApost/D_group | Pesho/step_kan_razl.cpp | #include <bits/stdc++.h>
using namespace std;
bool er[10000001];
int arr[10000001];
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int N, q;
cin >> N >> q;
vector<int> pr(1000000);
int mm = sqrt(N);
for(int i = 2; i <= mm; i++){
if(!er[i]) for(int y = i*i... | ALGO | 0.999915 | 3.550867 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-09-01T08:40: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": "fdb6a3c18043... |
28974bc7-f97e-48d2-b72c-27c1d621a028 | zephyr06/LET_OPT | CPLEX/concert/include/ilconcert/ilonumfunci.h | // -------------------------------------------------------------- -*- C++ -*-
// File: ./include/ilconcert/ilonumfunci.h
// --------------------------------------------------------------------------
// Licensed Materials - Property of IBM
//
// 5725-A06 5725-A29 5724-Y47 5724-Y48 5724-Y49 5724-Y54 5724-Y55 5655-Y21
// ... | TOOL | 0.958182 | 5.735575 | {
"github_metadata": {
"branch": "main",
"commit_count": 996,
"repo_created_at": "2023-03-07T16:55:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1232cb2b8d... |
3a1eee0c-fbf5-4280-bc82-128ff990596c | imkiller32/GeneralCodes | FibHeap.cpp | #include<bits/stdc++.h>
using namespace std;
struct node
{
int data,deg,mark;
node *par,*child,*left,*right;
};
map<int,node *> mp;
int tree=0;
node *create(int k)
{
node *ptr=new node;
ptr->data=k;
ptr->deg=0;
ptr->mark=0;
ptr->par=ptr->child=NULL;
ptr->left=ptr->right=ptr;
return ptr;
}
node *concatena... | ALGO | 0.99995 | 3.558325 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2018-05-23T09:42:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3311a17b0... |
c5ba9401-476c-408c-ab2c-8a300b6f2c3f | trilinos/Trilinos | packages/stokhos/src/nox/NOX_Epetra_LinearSystem_SGJacobi.cpp | // @HEADER
// *****************************************************************************
// Stokhos Package
//
// Copyright 2009 NTESS and the Stokhos contributors.
// SPDX-License-Identifier: BSD-3-Clause
// *****************************************************************************
// @... | ALGO | 0.981149 | 6.466915 | {
"github_metadata": {
"branch": "master",
"commit_count": 104031,
"repo_created_at": "2015-11-16T19:39:16.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1299,
"forks": 593,
"issues": 263,
"pull_requests": 61
},
"file_meta": {
"content_id":... |
69ddbe94-b580-483f-b96e-0de3475d5cc4 | ishandutta2007/codeforces-a | alireza_kaviani/normal/1156/C.cpp | /**
* code generated by JHelper
* More info: https://github.com/AlexeyDmitriev/JHelper
* @author alireza_kaviani
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
template <class T> using Tree = tree<T, null_... | ALGO | 0.999987 | 5.014508 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-04-11T00:51:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b5301b37b292... |
024470ca-e4aa-4557-addf-223565a4482b | ng8165/USACO | Platinum/2017-02/mincross_feb2017.cpp | // Why Did the Cow Cross the Road
// USACO Platinum February 2017: http://www.usaco.org/index.php?page=viewproblem2&cpid=720
// XJOI Problem 15282: https://xjoi.net/contest/4450/problem/2?locale=en
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
class BIT {
// Binary Indexed Tree/Fenwick Tre... | ALGO | 0.999982 | 4.634848 | {
"github_metadata": {
"branch": "main",
"commit_count": 153,
"repo_created_at": "2022-06-17T06:57:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "61ac202e2b... |
0fcf3ef0-fef4-47d3-9ec4-e9e5fc60db60 | Omar-Sharif/Competitive-Programming | LIGHT OJ/BFS/Light_Oj/1174 - Commandos.cpp | #include<bits/stdc++.h>
using namespace std;
#define mm 110
vector<int>edges[mm];
int source[mm],destiny[mm];
int s,d;
int bfs(int src)
{
int level[mm],vis[mm];
memset(level,0,sizeof(level));
memset(vis,0,sizeof(vis));
queue<int>q;
q.push(src);
level[src]=0;
vis[src]=1;
while(!q.empty... | ALGO | 0.99965 | 3.48283 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2018-06-04T04:29: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": "4f0cb30807... |
a821d2c2-cde0-4210-9d85-e8cfa03e3f70 | naverwhale/whaleos-platform2 | cros-disks/process.cc | // Copyright 2012 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "cros-disks/process.h"
#include <algorithm>
#include <array>
#include <cstdlib>
#include <string>
#include <fcntl.h>
#include <poll.h>
#include <signal.h>
#includ... | TOOL | 0.956993 | 6.596711 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-09-26T08:05:26.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0df1ce3fd43cb... |
c1df3690-6eb5-4070-992e-e7f8599095c3 | opcodeer/Data-structure-C- | Expt24.cpp | #include <iostream>
using namespace std;
class node{
public:
int data;
node* next;
node* prev;
node(int val){
data = val;
next = NULL;
prev = NULL;
}
};
void insertAthead(node *&head,int val){
node* newnode = new node(val);
newnode->next=head;... | ALGO | 0.99992 | 3.928061 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2023-10-25T18:28:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "36b7e2983584... |
fb8d6af6-c60e-49ff-bf12-1d107575b282 | amithjkamath/codesamples | cpp/datastructures/schaumDS/SODSWCPP/Ex0701.cpp | // Data Structures with C++ by <NAME>
// Copyright McGraw-Hill, 1999
// Example 7.1 on page 128
// Using a list of strings
#include <iostream>
#include <list> // defines list<T> class template
using namespace std;
typedef list<string> List; // defines List type
typedef List::iterator It; // defines I... | TOOL | 0.925668 | 5.134806 | {
"github_metadata": {
"branch": "master",
"commit_count": 72,
"repo_created_at": "2016-09-04T15:22:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "be939f9e0... |
2e1d08db-0984-4046-b709-055b734e945c | koutali/project_euler | c++/project44/project44/main.cpp | #include "stdafx.h"
using namespace std;
unsigned int generatePentagonalNumber(unsigned int seed)
{
return (seed*(6*seed - 1));
}
void generatePentagonalNumbers(vector<unsigned int> & pentagonalNumbers)
{
cout << "Generating pentagonal numbers vector" << endl;
for (unsigned int i = 0; i < 15000; ++i)
{
pentag... | ALGO | 0.998773 | 5.195402 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2015-04-14T07:16:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8637a8bbb3... |
bc92796b-4f3e-4759-a3f8-9cac5a5ba82f | ManikandanParamasivan/Linked_List | Recur_linked_list.cpp | #include<bits/stdc++.h>
using namespace std;
class Node{
public:
int data;
Node* next;
};
Node* head;
void push(Node** head_ref, int new_data)
{
Node* new_node = new Node();
new_node->data = new_data;
new_node->next = (*head_ref);
(*head_ref) = new_node;
/* HERE HEAD IS POINTED ... | ALGO | 0.99989 | 4.933835 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2021-10-17T18:28: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": "1f2b2bc0ace3... |
be91be20-64c4-4f9c-884b-7d796497cede | gdfx-cc/gdfx | src/gdfx/math/Random.cpp | //-----------------------------------------------------------------------------
// Copyright (C) GDFX Authors
//-----------------------------------------------------------------------------
/*
MT19937 - Mersenne Twister - 2002/1/26
MT19937-64 - Mersenne Twister - 2004/9/29
Copyright (C) 1997 - 2002, <NAME> an... | ALGO | 0.932915 | 6.104135 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2023-05-21T17:20:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "73b264f384b... |
098f82d1-9a1c-4b0a-976d-af4dd9c1a3f8 | yashi2407/Leetcode-Submissions | 0363-max-sum-of-rectangle-no-larger-than-k/0363-max-sum-of-rectangle-no-larger-than-k.cpp | class Solution {
public:
// This function finds the max subarray sum <= k in a 1D array
int lowerBoundIndex(vector<int>& row, int k) {
set<int> prefixSums;
prefixSums.insert(0);
int currSum = 0;
int maxSum = INT_MIN;
for (int val : row) {
currSum += val;
... | ALGO | 0.999979 | 6.583753 | {
"github_metadata": {
"branch": "main",
"commit_count": 677,
"repo_created_at": "2025-04-05T15:23:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8437a4bd19... |
847e9219-29b5-4529-894a-78d7f9348ca0 | Chelovechek-move/Ballistics | src/ballistics/atmosphere/Atmosphere.cpp | #include "Atmosphere.hpp"
namespace Ballistics::Atmosphere
{
void Atmosphere::initialize()
{
const rapidcsv::Document doc(csvLocation_);
// Reading column "DATE" from the file
const std::vector<std::string> jdStringCol = doc.GetColumn<std::string>("DATE");
// Converting the date... | ALGO | 0.968728 | 5.837987 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2023-12-04T11:13: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": "c3b1347114d6... |
0af9d4b7-6966-42d9-884b-f31bbb4d6a9b | akhilr007/Interview-Bundler | dynamic programming/03-frog-jump-1D.cpp | class Solution{
private:
// time complexity -> O(2^n)
// space complexity -> O(n)
int solveRec(int idx, vector<int>& height, int n){
if(idx == 0) return 0;
int left = solveRec(idx-1, height, n) + abs(height[idx] - height[idx - 1]);
int right = 1e8;
if(idx > 1) right = solv... | ALGO | 0.999995 | 5.482368 | {
"github_metadata": {
"branch": "main",
"commit_count": 90,
"repo_created_at": "2023-02-28T15:18:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e6de4fad39e... |
05e29a93-dc64-4cac-a091-361b96b65ff1 | bghanchi/Data-structure | C++/Maxx_Diff.cpp | #include<bits/stdc++.h>
#include<string.h>
#include<tuple>
#define all(c) c.begin(),c.end()
#define ll long long int
#define debug(c) cout<<c<<endl;
#define pb push_back
#define em emplace_back
#define mt make_tuple
using namespace std;
typedef vector<int>vi;
typedef vector<vi>vii;
typedef pair<int,int>pi;
int maxdiff... | ALGO | 0.999957 | 3.996707 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2019-02-02T03:59:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9031a359d... |
c723871d-9b75-47e7-b9ce-61ef29453685 | tekraj-chapai/greenhouse_automation_arduino | greenhouseautomation.ino | #include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd (0x27, 16,2);
const int AirValue = 616; //replace the value from calibration in air
const int WaterValue = 335; //replace the value from calibration in water
int soilMoistureValue = 0;
int soilmoisturepercent=0;
#define POTENTIOMETER_PIN A2
#define RELAY_PIN 3
#d... | TOOL | 0.952893 | 5.226913 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2024-03-18T09:06:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "754b4201bb... |
004d646a-df7e-4f78-9189-4de85b437c51 | rishi058/CP-DSA | CSES/02_Sorting and Searching/22_Tasks and Deadlines.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define all(v) v.begin(), v.end()
#define F(a,b,i) for (int i = a; i < b; i++)
#define Rev(a,b,i) for (int i = a; i >= b; i--)
#define RISHI ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
template <typename dStruct>
void print(dStruct& vName)... | ALGO | 0.999888 | 3.813788 | {
"github_metadata": {
"branch": "main",
"commit_count": 44,
"repo_created_at": "2023-04-18T16:12:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9bcf0a74ebf... |
5b756df7-6d7f-4bbb-9242-bb4a22522465 | BackupGGCode/rsa | rsa/tags/rsa_v0.3/source/BigInt.cpp | /* ****************************************************************************
*
* BigInt.cpp
*
* Author: <NAME>
* Release date: 14th of March 2008
*
* This file contains the implementation for the BigInt class.
*
* There are a few static constants defined in this file:
*
* - ULongMax : ULONG_MAX ... | ALGO | 0.999301 | 4.959469 | {
"github_metadata": {
"branch": "master",
"commit_count": 71,
"repo_created_at": "2015-04-28T22:03:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a982beef1... |
d017d829-e1eb-457e-bc27-6aefd18f0b88 | satyam4484/CP | stack/NextGreaterToRight.cpp | //<NAME>
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define mod 1000000007
#define inf 1e18
#define ump unordered_map
#define mp make_pair
#define vc vector
#define inpv(v,n) for(int i=0;i<n;i++... | ALGO | 0.999991 | 4.027455 | {
"github_metadata": {
"branch": "master",
"commit_count": 67,
"repo_created_at": "2021-04-24T17:56:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "97b5715a1... |
4c5507b9-a42e-4e32-bf06-d6d8d921c848 | lantimilan/topcoder | CODEFORCE/prob499C.cpp | // prob499C.cpp
//
// observation: the number of hops are the number of lines that separates
// the two points
#include <iostream>
using namespace std;
int sgn(long long l)
{
if (l == 0) return 0;
else if (l > 0) return 1;
else return -1;
}
int main()
{
int x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2... | ALGO | 0.999462 | 4.380314 | {
"github_metadata": {
"branch": "master",
"commit_count": 493,
"repo_created_at": "2012-07-16T05:16:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "59ded778... |
8e70769a-40ab-4d90-ad9d-501e90e7fd98 | ishandutta2007/codeforces-b | bigbag/normal/658/B.cpp | #include <map>
#include <set>
#include <stack>
#include <cmath>
#include <queue>
#include <vector>
#include <cstdio>
#include <string>
#include <cstring>
#include <cstdlib>
#include <iostream>
#include <algorithm>
using namespace std;
const int max_n = 222222, inf = 1111111111;
int n, k, q, a[max_n];
set<pair<int, i... | ALGO | 0.999893 | 3.942876 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-04-11T01:05:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4a9829d89f51... |
a2066fa9-21af-44ea-bd4a-c7bf09ac83a6 | Jeremias-V/Code | Solutions/UVa Online Judge/11518.cpp | #include <cstdio>
#include <vector>
using namespace std;
int ans = 0;
void DFS(int V, vector<vector<int>> &G, vector<bool> &visited){
if(!visited[V]) ans++;
visited[V] = true;
vector<int> adj = G[V];
for(int i = 0; i < adj.size(); i++){
if(!visited[adj[i]]){
DFS(adj[i], G, vis... | ALGO | 0.999956 | 3.65545 | {
"github_metadata": {
"branch": "main",
"commit_count": 43,
"repo_created_at": "2021-01-20T00:49:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "354969a64fc... |
35ca118f-aded-4ab2-a3de-220354cdeac5 | PhooPwintChoThar/CPP-Lab | Lab0708_2.cpp | #include<iostream>
#include<cstring>
using namespace std;
void reverseString(char *);
void getStringDetails ( const char* , int &, int&);
int main(){
char string1[80];
cout<<"Enter a string : ";
cin.getline(string1, 80);
int vowelCount=0;
int length =0;
getStringDetails(string1 , length ,... | ALGO | 0.981797 | 4.405333 | {
"github_metadata": {
"branch": "main",
"commit_count": 63,
"repo_created_at": "2024-12-18T10:01:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e8ec5b80744... |
01876351-a51f-490e-b822-26dcee5c21e1 | Fabcher/Search_Cpp | main.cpp |
// Example for Breadth First Search and Depth First Search
#include <iostream>
#include <map>
#include <set>
#include <list>
using namespace std;
class Tree
{
public:
std::map< int, std::set<int> > elem_conn;
std::map< int, bool > visited; // Let's always use maps (instead of sets)
std::list< int > to_visi... | ALGO | 0.999558 | 4.081635 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2022-03-06T12:17: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": "e934ef5b8848... |
6f75257c-747a-4298-8e36-e1742f6f06cd | hardiksinghnegi/Algo_DS_Design | DataStructures/single_link_list.cpp | #include<iostream>
using namespace std;
class Node{
int data;
Node *next;
public:
Node(int val){
data = val;
next = NULL;
};
int getValue(){
return data;
};
void setValue(int val){
data = val;
};
void setNext(Node* forw){
next = forw;
};
Node* getNext(){
return next;
};
};
c... | ALGO | 0.999463 | 3.960756 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2018-05-12T07:38:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5ec119a24a... |
9f1ed098-9e10-46f7-9b66-7eff53a308d8 | cstkennedy/cs330-examples | 06-CPP-Shapes/Example-8/source/runShapes.cpp | // <NAME>
// Review Example: Inheritance and the Factory Model
#include <iostream>
#include <iomanip>
#include <fstream>
#include <vector>
#include <memory>
#include <iterator>
#include <algorithm>
#include "utilities.h"
#include "shapeFactory.h"
// #include "ShapeCollection.h" // No longer needed
/** @file */
usi... | TOOL | 0.923608 | 7.011554 | {
"github_metadata": {
"branch": "master",
"commit_count": 1020,
"repo_created_at": "2022-03-15T18:06:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 16,
"forks": 37,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6f4dd... |
91a0f379-49e1-4080-a78b-fe7cf74de7e2 | zeeshan1995/rc_files | advanced/.ccls-cache/@home@zeeshan/project@hackerearth@nissan_hiring@again.cpp |
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
int main()
{
freopen("input.txt", "r", stdin);
int n;
std::cin >> n;
std::vector<int>count,index(1e6+5,-1);
for(int i=0; i<n; ++i)
{
std::string s;
std::cin >> s;
for(int i = 0; i<s.size(); i++)
{
if(s[i] == '1')
{
... | ALGO | 0.999929 | 3.255892 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2020-07-09T09:25: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": "44c4c2b743... |
bf602e2a-0650-4748-8ad3-11995244cf6d | Parkgod98/Algorithm_Cpp | 백준/Gold/12869. 뮤탈리스크/뮤탈리스크.cc | #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <map>
#include <cmath>
#include <stack>
#include <queue>
#include <set>
using namespace std;
typedef long long ll;
#define INF 99999999
//ios_base::sync_with_stdio(false);
//cin.tie(NULL);
//
//cout << ... | ALGO | 0.999928 | 3.81693 | {
"github_metadata": {
"branch": "main",
"commit_count": 775,
"repo_created_at": "2024-09-02T10:16:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b548e6f1d3... |
9fa72d9c-a37b-49b7-9e77-c15161308681 | sympiler/nasoq | src/ldl/parallel_blocked_ldlt_02.cpp | //
// Created by <NAME> on 2020-10-29.
//
#include "nasoq/ldl/parallel_blocked_ldlt_02.h"
#include <cassert>
#include <chrono>
#include <vector>
#include "nasoq/common/Sym_BLAS.h"
#include "nasoq/common/Reach.h"
namespace nasoq {
bool ldl_left_sn_parallel_02(int n, const int *c, const int *r, const double *value... | ALGO | 0.999784 | 4.337905 | {
"github_metadata": {
"branch": "master",
"commit_count": 161,
"repo_created_at": "2020-03-24T16:14:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 72,
"forks": 22,
"issues": 6,
"pull_requests": 1
},
"file_meta": {
"content_id": "5f8950... |
fbdda527-d81f-461d-bb6f-44187e54f0be | Dongyuyang/ARKR_DEXA | vector_visitor.hpp | // Boost.AGeomAeAtry IndexAOA
//
// R-tree levels validating visitor implementation
//
// Copyright (c) 2011-2013 <NAME>, <NAME>.
//
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
... | ALGO | 0.997153 | 5.993705 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2016-10-25T08:04:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d4da2e0ac8... |
52be7e48-9c8a-4d6c-a591-94ba156870ac | LeeKwang-min/Baekjoon-Algorithm | 문제 풀이/연습/2252.cpp | /*
작성자 : 이상수
일시 : 2021.03.12
제목 : 줄 세우기 - 2252
풀이 : 위상정렬 알고리즘이다.
위상정렬 알고리즘의 방법
조건
1. 사이클이 없어야 하고
2. 방향성 그래프여야 한다
큐를 사용한다.
방법
1. 진입 차수가 0인 모든 정점을 큐에 삽입
2. 큐에서 원소를 하나 꺼내서 해당 정점과 연결된 모든 간선 제거
3. 제거 과정에서 진입차수가 0이된 정점들 큐에 삽입
4. 큐가 빌때까지 반복
(4 도중 모든 정점을 방문하지 못하고 큐가 빈다면 사이클이 존재한다는... | ALGO | 0.999995 | 4.742521 | {
"github_metadata": {
"branch": "main",
"commit_count": 294,
"repo_created_at": "2021-01-27T12:52:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "eb233b8033... |
5b9f7a24-2cc9-482c-88f5-75075d3a1420 | babaraokalyankar/Sem8new | dfs.cpp | #include <iostream>
#include <vector>
#include <stack>
#include <omp.h>
using namespace std;
class Graph {
private:
int numVertices;
vector<vector<int>> adj;
public:
Graph(int vertices) : numVertices(vertices), adj(vertices) {}
void addEdge(int src, int dest) {
adj[src].push_back(dest);
... | ALGO | 0.999977 | 6.865475 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-05-08T02:54:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "50b43b2fafd3... |
1fb6348b-4373-499b-aba7-aee979549c37 | AlexPetukhov/codeforces | Archive/SegTree1.cpp | class node{
public:
ll sum;
node* le;
node* ri;
int l;
int r;
node(int a,int b){
sum = 0;
le = ri = 0;
l = a;
r = b;
}
};
typedef node* tree;
ll get(tree t, int l, int r){
ll ans = 0;
if(t == 0)r... | ALGO | 0.99996 | 4.448007 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2017-08-22T14:08: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": "953141b257... |
7e5651ae-c4d4-4fb3-ad0f-f114022c53ba | A-R-Rony/Data-structure-and-Algorithms | Dynamic Programmig/digit dp range L to R.cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define IOS ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_st... | ALGO | 0.999946 | 4.602367 | {
"github_metadata": {
"branch": "main",
"commit_count": 328,
"repo_created_at": "2022-09-18T16:56:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "08b7bb12fe... |
82ea344f-99f2-4b5e-b009-86e538323cc0 | alexandraback/datacollection | solutions_5751500831719424_1/C++/Tata201201/A_large.cpp | #include<stdio.h>
#include<math.h>
#include<iostream>
#include<stack>
#include<queue>
#include<vector>
#include<set>
#include<map>
#include<algorithm>
using namespace std;
char str[1000][1000];
int main(){
freopen("A-large.in","r",stdin);
freopen("A-large.out","w",stdout);
int t;
cin >> t;
for(int... | ALGO | 0.999681 | 3.216784 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2017-03-08T11:33:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6b47454f4... |
eac350e0-e184-436c-946d-55c5915cb4f8 | Sy0307/Self_Practice_For_Algorithm | ABC/ABC240/B.cpp | #include <bits/stdc++.h>
using namespace std;
using ui = unsigned int;
using ull = unsigned long long;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
const int maxn = 1e5 + 10;
const int mod = 1000000007;
#define inl inline
#define fr(i, a, b) for (int i = a; i <= b; i++)
#define ford(i, a,... | ALGO | 0.999727 | 4.094969 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2022-01-10T09:06:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0b3cfe1ff01... |
eaeef30c-a896-47e3-8eb8-99fbbaaa3b00 | RBC-UKQCD/CPS_public | cps_pp/include/util/crc32-reference.h | #ifndef INCLUDED_CRC32_H
#define INCLUDED_CRC32_H
#include <cstring>
#include <cstdio>
#include <stdint.h>
typedef uint32_t crc32_t;
template<typename T>
inline T reverse_crc_T(T data) {
const int nBits = 8 * sizeof(T);
T reflection = 0;
for (int bit = 0; bit < nBits; ++bit) {
if (data & 0x1) {
refle... | ALGO | 0.935598 | 6.200404 | {
"github_metadata": {
"branch": "master",
"commit_count": 1311,
"repo_created_at": "2016-09-23T15:05:01.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 6,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7ccccf44... |
f0211c33-6fe0-484c-9fa1-5a05dbc528cd | Watkins7/UMBC-Undergrad | C++/Other Examples/double_arrays/main.cpp | #include <iostream>
#include <fstream>
using namespace std;
// Constant that sets row and column length of the array
const int MAXSIZE = 4;
void createDefaultBoard(int myArray[MAXSIZE][MAXSIZE]);
void loadBoard(int myArray[MAXSIZE][MAXSIZE]);
bool selectTile(int myArray[MAXSIZE][MAXSIZE], int, int);
void swapTile(in... | TOOL | 0.936538 | 4.737476 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-08-10T20:19: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": "a56a225e13f4... |
9a8c22e5-5947-48e2-967f-05aa41129773 | selfboot/LeetCode | DFA/65_ValidNumber.cpp | /*
* @Author: <EMAIL>
* @Last Modified time: 2016-06-30 15:29:11
*/
class Solution {
public:
bool isNumber(string s) {
/*
DFA. Details can be found here:
https://github.com/xuelangZF/LeetCode/blob/master/Images/65_ValidNumber.png
https://github.com/xuelangZF/LeetCode/blob/master... | ALGO | 0.976313 | 4.525584 | {
"github_metadata": {
"branch": "master",
"commit_count": 174,
"repo_created_at": "2015-09-14T06:47:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1123,
"forks": 318,
"issues": 2,
"pull_requests": 1
},
"file_meta": {
"content_id": "9c0... |
e8b8afc4-63b6-4389-8aa5-6578665f5e72 | timtingwei/PAT | BasicLevel_C++/1047. 编程团体赛.cpp | // Copyright [2018] <mituh>
// 1047. 编程团体赛.cpp 9:25 -> 9:38
/*
1047 编程团体赛(20 point(s))
编程团体赛的规则为:每个参赛队由若干队员组成;所有队员独立比赛;参赛队的成绩为所有队员的成绩和;成绩最高的队获胜。
现给定所有队员的比赛成绩,请你编写程序找出冠军队。
输入格式:
输入第一行给出一个正整数 N(≤10
4
),即所有参赛队员总数。随后 N 行,每行给出一位队员的成绩,格式为:队伍编号-队员编号 成绩,其中队伍编号为 1 到 1000 的正整数,队员编号为 1 到 10 的正整数,成绩为 0 到 100 的整数。
输出格式:
在... | ALGO | 0.998627 | 4.051923 | {
"github_metadata": {
"branch": "master",
"commit_count": 339,
"repo_created_at": "2018-07-21T05:25:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a9ac8d0f... |
e7fe3fee-3db4-4f85-9f28-5b7558153106 | WhiteF326/cpp | cpplib/Fraction.cpp | #include <cassert>
namespace shiroha{
namespace math{
long long gcd(long long a, long long b){
if(a < 0) a = -a;
if(b < 0) b = -b;
if(a == 0) return b;
if(b == 0) return a;
if(a == 1 || b == 1) return 1;
if(a == b) return a;
... | ALGO | 0.961888 | 4.825685 | {
"github_metadata": {
"branch": "master",
"commit_count": 171,
"repo_created_at": "2021-04-03T02:47:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "52ce53c4... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.