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 |
|---|---|---|---|---|---|---|---|
72f0d2fa-187e-4e7d-a03e-6a373c50563e | gbakkk5951/OI | __history/18.2/cdvs4543普通平衡树_splay.cpp | /* 原 理 */
using namespace std;
int main(){}
#include<cstdio>
#include<cctype>
namespace Protector {
const int MAXN = 200010;
const int INF = 0x3f3f3f3f;
template<typename Type>
void read(Type &a) {
char t, f = 1;
while (!isdigit(t = getchar())) {
if (t == '-') {
f = -1... | ALGO | 0.999959 | 3.924478 | {
"github_metadata": {
"branch": "master",
"commit_count": 172,
"repo_created_at": "2017-12-27T10:35:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "24a58958... |
05abc27a-764c-47fa-b5e2-497ded411339 | Zlin0509/Zlin_ACM | _CF/CONTEST/1-499/257/B.cpp | //
// Created by Zlin on 2025/1/15.
//
#include "bits/stdc++.h"
using namespace std;
typedef double db;
typedef long double ldb;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef pair<int, int> pii;
typedef pair<long long, long long> pll;
inline voi... | ALGO | 0.999998 | 3.877225 | {
"github_metadata": {
"branch": "main",
"commit_count": 170,
"repo_created_at": "2024-08-16T08:10: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": "0c5ac02f7a... |
03c18cce-5beb-47e3-91ef-9a4332985d9e | Pavelius/board | board/crt_parse.cpp | #include "crt.h"
const char* psnum16(const char* p, int& value)
{
int result = 0;
const int radix = 16;
while(*p)
{
char a = *p;
if(a >= '0' && a <= '9')
{
result = result*radix;
result += a - '0';
}
else if(a >= 'a' && a <= 'f')
{
result = result*radix;
result += a - 'a' + 10;
}
else i... | TOOL | 0.926692 | 3.470946 | {
"github_metadata": {
"branch": "master",
"commit_count": 101,
"repo_created_at": "2017-04-23T11:33: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": "d0456aa6... |
4f4a7e7e-5cc4-4f2a-9f4a-9cd398fb889a | jwbecalm/cplusplus_study_code | 02 reference/02 Pointers vs References.cpp | /*
When to use What
Overall, Use references when you can, and pointers when you have to.
The performances are exactly the same, as references are implemented internally
as pointers. But still you can keep some points in your mind to decide when to use what :
Use references
In function parameters and return types... | TOOL | 0.950444 | 5.042247 | {
"github_metadata": {
"branch": "master",
"commit_count": 38,
"repo_created_at": "2018-09-29T05:57:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "627ebff14... |
9e28a9cb-ce5d-45f5-b85d-29a7d9a2292a | Vivek1322/Programs | ArrayRotation.cpp | #include<bits/stdc++.h>
using namespace std;
void rotateArray(int * a, int n, int k)
{
if(k==0 || k==n)
return;
int * temp = new int [k];
for(int i=0; i<k; i++)
{
temp[i] = a[i];
}
int i=0, j=k;
while(j<n)
{
a[i++] = a[j++];
}
for(int x=0; x<k; x++)
{... | ALGO | 0.999889 | 4.318512 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-09-04T09:21: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": "1a5e420d42... |
1148e73a-4e23-420a-a753-f583c14c65c3 | Nshtk/FA | FA lab 7/FA lab7.4/strategy.h | #ifndef FA_LAB7_4_STRATEGY_H
#define FA_LAB7_4_STRATEGY_H
#include <algorithm>
#include "parser.h"
using namespace std;
template<typename T>
class Strategy
{
public:
virtual int compareValues(const T &a, const T &b) const
{}
};
class StrategyId : public Strategy<Contract*>
{
int compareValues(Contract* ... | TOOL | 0.931243 | 5.358521 | {
"github_metadata": {
"branch": "main",
"commit_count": 33,
"repo_created_at": "2021-04-23T16:32:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9dce2150197... |
40383933-6f2b-4ddb-b3cd-78dcbc6dabc1 | Shubhamsahu1101/cpp | Unstable_Subarray.cpp | #include <bits/stdc++.h>
#define forall(it, cont) for (auto it = cont.begin(); it != cont.end(); it++)
#define forl(i, a, b) for (int i = a; i < b; i++)
#define forr(i, a, b) for (int i = a; i >= b; i--)
#define int long long
#define pb push_back
#define yes cout << "YES" << endl
#define no cout << "NO" << endl
#define... | ALGO | 0.999615 | 3.820689 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-06-25T07:32: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": "a6a7700834d6... |
a1fa82ea-2c46-4ae8-a4c5-0a225005098f | BennyPenny1/Personal | cpp/calc/equal.cpp | #include <vector>
#include <iostream>
int main()
{
std::string equation = "1.5555/2+";
if (equation[equation.size() - 1] == '+'|| equation[equation.size() - 1] == '-' || equation[equation.size() - 1] == '*' || equation[equation.size() - 1] == '/')
{
equation += answer
}
else
{
s... | ALGO | 0.998453 | 3.681668 | {
"github_metadata": {
"branch": "main",
"commit_count": 49,
"repo_created_at": "2025-02-15T17:07: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": "04052413912... |
404fb547-0904-4d30-b626-8fb5e9e01914 | 9967han/PS-Algorithm | BaekJoon/2411.cpp | #include<iostream>
#include<algorithm>
#include<vector>
#include<cstring>
using namespace std;
int getPath(int fx, int fy, int sx, int sy);
int N, M, A, B;
int map[101][101];
int dp[101][101];
vector<pair<int, int> > v;
int main(){
memset(map, 0, sizeof(map));
memset(dp, 0, sizeof(dp));
cin >> N >> M >> A ... | ALGO | 0.999773 | 3.832038 | {
"github_metadata": {
"branch": "master",
"commit_count": 107,
"repo_created_at": "2020-09-18T13:44:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "342f5118... |
5514cf63-84bd-4790-83fd-5249d2028df5 | mbfilho/icpc | codeforces/273B - Dima and Two Sequences.cpp | #include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#include <iostream>
#include <queue>
#include <set>
#include <map>
#include <stack>
#include <string>
using namespace std;
typedef pair<int,int> pii;
typedef long long ll;
typedef long double ld;
#define mp make_pair
#define ft first
#define sd... | ALGO | 0.999989 | 3.807178 | {
"github_metadata": {
"branch": "master",
"commit_count": 835,
"repo_created_at": "2016-02-27T01:54:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a67c5dff... |
1447e11d-e41e-4cb8-abac-a1e7698dde03 | hllj/Codeforces | 702B/main.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int nmax = 1e5 + 10;
int a[nmax];
int f[nmax];
int n;
int main() {
ios::sync_with_stdio(false); cin.tie(0);
int n;
cin >> n;
for (int i = 0; i < n; i++) cin >> a[i];
sort(a, a + n);
ll res = 0;
for (int i = 0; i < n; i... | ALGO | 0.999932 | 4.117862 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2018-09-10T13:26: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": "86f34de6f3... |
3ab3a9ab-f0d3-4954-9daf-99c787bb19b5 | rwth-i6/rasr | src/Signal/AutoregressionToCepstrum.cc | /** Copyright 2020 RWTH Aachen University. All rights reserved.
*
* Licensed under the RWTH ASR License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.hltpr.rwth-aachen.de/rwth-asr/rwth-asr-license.html
*
* Un... | ALGO | 0.966771 | 7.048516 | {
"github_metadata": {
"branch": "master",
"commit_count": 264,
"repo_created_at": "2020-08-10T08:34:36.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 57,
"forks": 16,
"issues": 7,
"pull_requests": 12
},
"file_meta": {
"content_id": "ca6a4d... |
25769b81-153d-4fd5-8213-0b3016fa9188 | radio-astro/casa | code/air_casawvr/src/radiometermeasure.cpp | /**
\file radiometermeasure.cpp
<NAME> <<EMAIL>>, <<EMAIL>>
Initial version February 2008
Maintained by ESO since 2013.
*/
#include <boost/function.hpp>
#include <boost/bind.hpp>
#include <boost/assign/list_of.hpp>
#include "radiometermeasure.hpp"
#include "radiometer_utils.hpp"
namespace LibAIR2 {
... | ALGO | 0.990721 | 6.240118 | {
"github_metadata": {
"branch": "master",
"commit_count": 18139,
"repo_created_at": "2015-08-20T09:27:16.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 7,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d36f242... |
8b1e0f2f-b336-4181-a4fa-fef4e48ee1f3 | ytz12345/2019_ICPC_Trainings | OtherTrains/19暑假多校/19牛客2/D.cpp | #include <bits/stdc++.h>
using namespace std;
typedef bitset<103> bs;
typedef long long ll;
const int N = 103;
struct node {
bs x;
ll s;
bool operator < (const node &a) const {
return s > a.s;
}
};
priority_queue <node> q;
bs a[N];
int n, k;
int w[N];
char s[N];
ll ans;
int main() {
ios::sync_with_s... | ALGO | 0.999974 | 3.67271 | {
"github_metadata": {
"branch": "master",
"commit_count": 97,
"repo_created_at": "2019-04-16T15:59: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": "f50c4fa4f... |
951a87b2-467b-403e-803f-21b410483f41 | xqian/cpp_projects | lxb/leetcode/c++/TrappingRainWater.cpp | http://oj.leetcode.com/problems/trapping-rain-water/
/* Question:
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.
For example,
Given [0,1,0,2,1,0,1,3,2,1,2,1], return 6.
The above elevation map is represented by ... | ALGO | 0.99993 | 6.122697 | {
"github_metadata": {
"branch": "master",
"commit_count": 296,
"repo_created_at": "2009-12-26T17:19:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 2,
"issues": 13,
"pull_requests": 0
},
"file_meta": {
"content_id": "cdcc21e... |
061e65cf-8c73-41ca-9734-0ae8f0f3c356 | InsightSoftwareConsortium/ITK | Modules/Registration/Common/test/itkImageRegistrationMethodTest_17.cxx | /*=========================================================================
*
* Copyright NumFOCUS
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.o... | TEST | 0.931047 | 5.891332 | {
"github_metadata": {
"branch": "main",
"commit_count": 57165,
"repo_created_at": "2010-07-27T15:48:04.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1517,
"forks": 701,
"issues": 268,
"pull_requests": 49
},
"file_meta": {
"content_id": "0... |
df81e324-6251-4bc1-aa93-7e05b6740ec4 | burakcoskun/programming_contests | codeforces/educational_70/D/soln.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define mp make_pair
#define fs first
#define sc second
int T;
int n;
void print_res(int i) {
for (int j = 0; j < i; ++j) {
cout << "1";
}
cout << "33";
for (int j = 0; j < n / i; ++j) {
cout << "7";
}
}
int... | ALGO | 0.999441 | 3.915555 | {
"github_metadata": {
"branch": "master",
"commit_count": 82,
"repo_created_at": "2018-05-18T09:14: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": "b768e0a7b... |
9db0d8da-886c-4a96-9d05-790b1b188905 | nrajantheone/ArrayTemplateBubbleSort | BubbleSort.h | #if !defined __bubblesort__
#define __bubblesort__ 1
#include <iostream>
#include <stdarg.h>
#include <stdio.h>
#include "array.h"
using namespace std;
const int BUFFER_SIZE = 40;
class BubbleSort {
public:
BubbleSort(){
//cout << "bs" << endl;
}
ostream& operator<<(ostream& out) {
out << output();
... | ALGO | 0.994527 | 4.624032 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-11-11T21:25:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "207936f11e... |
05dd7864-9740-424d-baba-fc2d174ea771 | mustafaahussaam3/Data-Structure | 600QueueUsingArray.cpp | #include <iostream>
using namespace std;
struct Queue
{
int size;
int front;
int rear;
int *Q;
};
void initQueue(Queue *q, int size)
{
q->size = size ;
q->front = q->rear = -1;
q->Q = (int*)malloc(size * sizeof(int));
}
void enqueue(Queue *q, int x)
{
if ( q->rear == q->size -1)
... | ALGO | 0.999035 | 4.10423 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2024-01-23T20:24: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": "901137da1... |
93978109-d273-4e49-b605-a7f5f6d0c9d2 | jefferson10147/DataStruct | segundo_parcial_proyecto_1/Bicola.h | #ifndef Bicola_H
#define Bicola_H
#include <iostream>
using namespace std;
template<class T> class Bicola;
template<class T>
class nodoB {
private:
T valor;
nodoB<T> *sucesor, *predecesor;
public:
nodoB(T v, nodoB<T> *sig = NULL, nodoB<T> *ant = NULL) {
valor = v;
sucesor = sig;
predecesor = ant;
}... | ALGO | 0.98788 | 3.940379 | {
"github_metadata": {
"branch": "master",
"commit_count": 111,
"repo_created_at": "2020-02-15T13:59: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": "c9d1dd24... |
1f6811f2-e73b-4d4f-8366-25c0ee3aef24 | pnnl/memgaze | bin-anlys/src/common/CRCHash.h | // *****************************************************************************
// CRCHash Routines (Version 1.0)
// Copyright © 2004-2005 Mira Software, Inc.
// Author: <NAME>
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that ... | ALGO | 0.977785 | 5.757934 | {
"github_metadata": {
"branch": "master",
"commit_count": 1007,
"repo_created_at": "2022-07-13T21:08:50.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 17,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "acb7d9b... |
7e8c2513-feab-48f4-b402-ec505601ca38 | EricYShao/contestProblems | ccc/ccc2021S3.cpp | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
using ll = long long;
struct friends
{
ll position;
ll walkingSpeed;
ll hearingDistance;
};
vector<friends> allFriends;
ll sumTimes(ll location)
{
ll ans = 0;
for (int i = 0; i < allFriends.size(); i++)
{
ll tr... | ALGO | 0.999811 | 3.532728 | {
"github_metadata": {
"branch": "main",
"commit_count": 60,
"repo_created_at": "2022-07-22T17:42: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": "2d14d0027c2... |
39a94484-665d-4ab7-9b2d-237ec716dd26 | Gahzz/TP1---EDII | Gerador de arquivos.cpp | #include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "cabecalho.hpp"
using namespace std;
//Funcao responsavel pela geracao do arquivo________________________________________________________________________________;
int gerador(int num, int opcao, int arg)
{
FILE *output;
Titem x;
... | TOOL | 0.964458 | 3.851116 | {
"github_metadata": {
"branch": "master",
"commit_count": 25,
"repo_created_at": "2020-08-24T14:44:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "848bcba06... |
3f639f35-36ec-4fa7-96e1-abdf6e40b913 | huanhuanonly/Codeforces | Combinatorics/CF1957C. How Does the Rook Move.cpp | /**
* Codeforces Round 940 (Div. 2) and CodeCraft-23
*
* => C. How Does the Rook Move? ( @c 1600 )
*
* -> https://codeforces.com/contest/1957/problem/C
*
* Submissions ~> https://codeforces.com/contest/1957/submission/318828606 By huanhuanonly
*
* @b Combinatorics and @b Linear-DP
*
* ----May 08, 2025 [... | ALGO | 0.999986 | 5.140866 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2024-10-21T08:53:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2b6bdf4c55e3... |
d0380e56-45cd-45d9-b83e-1141121745d3 | aditya299/leetcode | Challenges for New Users/palindromeLinkedList.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
#include<iostream>
#include<stack>
using namespac... | ALGO | 0.999957 | 6.10545 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2023-04-16T20:30: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": "117def7ff65... |
38c73d81-0848-4eee-9ed3-d1cb3a0c19b3 | Merisho/comprog | algotester/anniversary-7/c.cpp | #include <bits/stdc++.h>
using namespace std;
vector<vector<int>> g;
vector<bool> v;
int dfs(int x) {
v[x] = true;
int k = 1;
for (int i = 0; i < g[x].size(); ++i) {
int to = g[x][i];
if (!v[to]) {
k += dfs(to);
}
}
return k;
}
int main() {
int n, m;
cin >> n >> m;
v = vector<bool>(n, false);
g ... | ALGO | 0.999946 | 3.81835 | {
"github_metadata": {
"branch": "master",
"commit_count": 86,
"repo_created_at": "2019-10-19T08:36: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": "1253f83be... |
f0cbefab-346c-4976-8285-8e15d62cd866 | DangThaiHoang/TimeBankProject | header/System.h | #ifndef SYSTEM_H
#define SYSTEM_H
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include "Member.h"
#include "Request.h"
#include "Comment.h"
#include "BlockMem.h"
using std::string;
class Request;
class System {
public:
vector<Member> memList;
vector<Comment> supComment... | TOOL | 0.906918 | 3.801522 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-02-29T04: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": "dcbaa280d545... |
111eb4e2-3e26-469b-9d5a-5259a8848b7d | ishandutta2007/codeforces-s | sevlll777/normal/1263/D.cpp | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
... | ALGO | 0.999936 | 4.352811 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:07:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6d1352911369... |
2a04659a-5773-47c8-9243-da39c0af9395 | DoublePenetrate/CppStudy | cpp_base/cpp_base_05/5.Stack.cpp | #include <iostream>
using std::cout;
using std::endl;
using std::cin;
class Stack {
public:
bool empty(); //判断栈是否为空
bool full(); //判断栈是否已满
void push(const int & value); //元素入栈
void pop(); //元素出栈
int top(); //获取栈顶元素
Stack(int size = 4)
: _capacity(size)
, _data(new int[_capacity]())
... | ALGO | 0.992138 | 4.756127 | {
"github_metadata": {
"branch": "main",
"commit_count": 60,
"repo_created_at": "2025-06-18T09:19: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": "7ecf49ee8f3... |
384394fc-8e4d-4e2c-8aa1-2ea748efc1f7 | timothygao8710/Competitive-Programming | codeforces/1443/D.cpp | //Author: timg8710
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, int> pii;
#define pb push_back
#define f first
#define s second
int main(){
ios_base::sync_with_stdio(false); cin.tie(0);
int T; cin >> T;
while(T--){
int N; cin >> N;
vector<int... | ALGO | 0.999609 | 4.357113 | {
"github_metadata": {
"branch": "main",
"commit_count": 102,
"repo_created_at": "2022-01-15T22:21:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ae5af409b3... |
cb23a26f-4061-4a54-9e34-ed3f20e47e1f | Lingkai981/benchmark | Usability Evaluation/code/Pregel/SSSP.cpp | #include "basic/test-dev.h"
#include <float.h>
using namespace std;
int src=0;
struct SPEdge_test
{
double len;
int nb;
};
ibinstream & operator<<(ibinstream & m, const SPEdge_test & v){
m<<v.len;
m<<v.nb;
return m;
}
obinstream & operator>>(obinstream & m, SPEdge_test & v){
m>>v.len;
m>>v.nb;
return m;
}
... | ALGO | 0.997505 | 4.231957 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-10-18T00:28: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": "21527d607d1b... |
9ebb933b-1275-474c-a0cc-ede20a2f9bb1 | hodgman/eight | include/eight/core/sort/radix.hpp | //------------------------------------------------------------------------------
template<class T, class FnKey>
T* RadixSort( T* eiRESTRICT inputBegin, T* eiRESTRICT bufferBegin, uint size, const FnKey& fnKey )
{
typedef FnKey::Type Key;
if( size <= 1 )
return inputBegin;
const uint passes = sizeof( Key );
uint c... | ALGO | 0.999849 | 6.208829 | {
"github_metadata": {
"branch": "master",
"commit_count": 25,
"repo_created_at": "2015-05-30T12:52:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 12,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "77b0576f... |
f069e21b-9556-4103-9211-b5ec2e36dc43 | SamarNegm/acm | Substitution Ciphers.cpp | #include<bits/stdc++.h>
using namespace std;
int a[26];
string s="",chipherText="",ENCRYPTED="",test,decr="";
string subsitution(int k,string s)
{
string temp="";
for(int i=0; i<s.length(); i++)
{
// cout<<(int)('z')<<" "<<(int)(s[i]+k)%97<<"\n";
temp+=(char)((int)(s[i]-'a'+k)%26+'a');
... | ALGO | 0.999558 | 3.393477 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-05-30T00:48: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": "36f4122ae9... |
f9e5e09b-d6b5-498f-a36f-3dbb1daea657 | mualloc/leet-code-solutions | Patterns/Sudoku-Solver.cpp | // Very good cache solution: https://leetcode.com/problems/sudoku-solver/solutions/15853/simple-and-clean-solution-c/comments/15881/
class Solution {
public:
// TC: O(9^81) NOTE: 81 is for number of the initial empty cells
// SC: O(81)
void solveSudoku(vector<vector<char>>& board) {
solveSudokuHelpe... | ALGO | 0.999835 | 7.439767 | {
"github_metadata": {
"branch": "master",
"commit_count": 107,
"repo_created_at": "2023-01-07T11:21: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": "dc41ce1e... |
7bf4d2ea-1358-4869-bc21-3d9ec590fec9 | rwollman/NUPACK | src/source/external/boost-simd/include/boost/simd/arch/common/scalar/function/copysign.hpp | //==================================================================================================
/*!
@file
@copyright 2016 NumScale SAS
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
//===========================... | ALGO | 0.973919 | 6.346584 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2021-07-08T21:09:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 7,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "082598ae7... |
5fb367fb-eb8f-46ee-82ec-7099043b0f6d | how-dawn/AdventOfCode | AdventOfCode2024/src/day1.cpp | #include <algorithm>
#include <filesystem>
#include <fstream>
#include <iostream>
#include <map>
#include <numeric>
#include <sstream>
#include <vector>
struct SearchList {
std::vector<int> left;
std::vector<int> right;
};
SearchList readInput(const std::string &filePath) {
SearchList sList;
if (!std::filesy... | ALGO | 0.995026 | 6.074041 | {
"github_metadata": {
"branch": "main",
"commit_count": 69,
"repo_created_at": "2023-12-03T12:00:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f7bfad1ec55... |
42e95e00-2cc6-40f6-bfab-a6a5a2bdb758 | ShohrabRustam/Compitative-Programminng | 2GridTravelerProblemSecond.cpp | #include<iostream>
using namespace std;
int G[100][100];
int
gridTravelerProblem (int a, int b)
{
if (a == 0 || b == 0)
{
G[a][b] = 0;
return 0;
}
else if ((a == 1 && b == 1))
{
G[a][b] = 1;
return 1;
}
else
{
if (G[a - 1][b] == -1)
{
G[a - 1][b] = gridTrave... | ALGO | 0.999986 | 3.438169 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2021-10-18T12:43:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d2d792c5a7... |
586711bc-29e9-4f37-b3e0-fa123e983223 | medsec/catena-variants | src/algorithms/default_algorithm.cpp | #include <cstdlib>
#include <cstring>
#include "default_algorithm.hpp"
#include "../registry.hpp"
using namespace Catena_Variants;
//Register the registrable with the Registry so it can be used by CatenaFactory
Registry<DefaultAlgorithm> regDAP;
DefaultAlgorithm::DefaultAlgorithm()
:Registerable("DefaultAlgorithm", ... | CONFIG | 0.933051 | 4.039865 | {
"github_metadata": {
"branch": "master",
"commit_count": 35,
"repo_created_at": "2015-04-13T14:49:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c5c86c69c... |
04a16bbf-7eb9-4571-bc1b-2471295de8d8 | Neko-Sato/cpp-module-09 | ex02/main.cpp | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.cpp :+: :+: :+: ... | TEST | 0.958625 | 5.525801 | {
"github_metadata": {
"branch": "main",
"commit_count": 28,
"repo_created_at": "2024-08-25T05:51: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": "68b1bf48877... |
a6e9d8e7-b2e3-4f4f-9acf-a4a00f359d1c | hansonzhao007/buflog | src/spoton_bufnode.cc | #include "spoton_bufnode.h"
#include <immintrin.h>
#include <inttypes.h>
#include <algorithm>
#include <atomic>
#include <cassert>
#include <cstdlib>
#include <cstring>
#include <string>
#include <vector>
namespace spoton {
SortedBufNode_t::SortedBufNode_t () {
memset (this, 0, 64);
highkey_ = -1;
paren... | ALGO | 0.962786 | 5.139143 | {
"github_metadata": {
"branch": "master",
"commit_count": 112,
"repo_created_at": "2022-02-04T20:35:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "29b5fdc8... |
906f91e4-8734-40c1-9892-3ea51879126c | Zimse12345/Code | Codeforces_Contest/CF1790/G.cpp | /************************
*FileName:
*Author: Zimse
*Data: 2023-01-
*Description:
************************/
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <vector>
#include <cmath>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <iostream>
#include <cstdlib>
#include <ctime... | ALGO | 0.999813 | 4.493086 | {
"github_metadata": {
"branch": "main",
"commit_count": 57,
"repo_created_at": "2022-10-08T03:09:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c582900fb83... |
92fe8eed-c560-4b32-ab59-62468d08883d | gilsaia/college-study | algorithm/shorestpath/poj3159.cpp | #include<cstdio>
#include<queue>
#include<algorithm>
#include<vector>
#include<cstring>
using namespace std;
const int maxn=30020;
const int maxm=150020;
const int inf=0x3f3f3f3f;
struct Edge{
int from,to,dist,next;
Edge(int u=0,int v=0,int d=0):from(u),to(v),dist(d){}
};
struct Dijkstra{
int n,m;
Edge ... | ALGO | 0.999865 | 3.61301 | {
"github_metadata": {
"branch": "master",
"commit_count": 531,
"repo_created_at": "2018-06-26T08:25: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": "c8c03673... |
d1c6279e-100e-476b-b804-bc0b9c54f308 | Bosy-Ayman/Problem-solving | 0063-unique-paths-ii/0063-unique-paths-ii.cpp | class Solution {
public:
int uniquePathsWithObstacles(vector<vector<int>>& obstacleGrid) {
int m = obstacleGrid.size();
int n = obstacleGrid[0].size();
vector<vector<int>>dp(m, vector<int>(n, -1));
return func(m-1, n-1, obstacleGrid, dp);
}
int func(int m, int n, vector<vec... | ALGO | 0.999968 | 6.149554 | {
"github_metadata": {
"branch": "main",
"commit_count": 59,
"repo_created_at": "2024-03-01T09:37:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5cacd7bf6d9... |
0e00cc9b-189e-4a15-9a5d-95b34ce45f6f | 192224046-POTHYESVARAN/DSA01-Cpp | reverse node in k-Group.cpp | #include <iostream>
struct ListNode {
int val;
ListNode *next;
ListNode(int x) : val(x), next(nullptr) {}
};
ListNode* reverseKGroup(ListNode* head, int k) {
ListNode *dummy = new ListNode(0);
dummy->next = head;
ListNode *prev = dummy, *curr = dummy, *next = dummy;
int count = 0;
whi... | ALGO | 0.999952 | 6.406535 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2023-12-30T07:01: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": "9cb0eb2abf02... |
9623c6fe-e89c-423f-a68a-6dd199ba3ed6 | ApocalypseMac/CP | atcoder/ABC 190/190E.cpp | #include <bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
typedef long long ll;
const int MOD = 1e9 + 7;
const int INF = 0x3f3f3f3f;
int main(){
fast;
int n, m;
cin >> n >> m;
vector<vector<int>> edges(n + 1);
int u, v;
for (int i ... | ALGO | 0.999972 | 3.843008 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2020-10-29T06:54: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": "24de52e1c... |
7bdb60d4-ede0-4955-afaf-f3d5cd84bfd8 | Sookmyung-Algos/2021algos | algos_assignment/3rd_grade/윤이빈_yibin99/11월 2주차/11657.cpp | #include <iostream>
#include <vector>
using namespace std;
#define INF 0x7FFFFFFF
int n, m;
vector<pair<int,pair<int,int>>> edge;
long long dist[501];
bool BellmanFord(){
dist[1]=0;
for(int i=0;i<n-1;i++){
for(int j=0;j<edge.size();j++){
int s = edge[j].second.first;
int e = ed... | ALGO | 0.999957 | 4.297062 | {
"github_metadata": {
"branch": "master",
"commit_count": 5558,
"repo_created_at": "2021-02-22T06:32:53.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4,
"forks": 38,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c20f349... |
9ee2466a-ef0a-4f4c-94c4-cc8524909bf1 | vinivendra/MAC0438-Concorrente | EP3/EP3/main.cpp | #include <iostream>
#include <fstream>
#include <vector>
#include "thread.h"
#include "monitor.h"
using namespace std;
void mostre_uso(const char *nome_prog);
int main(int argc, const char *argv[]) {
int i;
int n; // Quantidade de filosofos.
int aux;
vector<int> pesos;
int r; // Quanti... | ALGO | 0.997374 | 3.318674 | {
"github_metadata": {
"branch": "master",
"commit_count": 39,
"repo_created_at": "2015-04-28T12:51: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": "3f526aea7... |
b0702fb9-c72f-4290-ae6c-cb97f6821650 | deepsamanta/Competitive-programming-solutions | B_Unique_Bid_Auction.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
struct Interval
{
int c, d;
};
bool CompareInterval(Interval e, Interval f)
{
return (e.c < f.c);
}
int main()
{
ll test;
cin >> test;
while (test--)
{
ll a;
cin >> a;
Interval ar... | ALGO | 0.999943 | 3.596911 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2021-07-06T19:20:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d6c6cee0cd3... |
5c9b5320-607d-4955-86ff-9c52a8ec24aa | caomao233/- | 顺序表.cpp | #include<iostream>
using namespace std;
template <class T>
class ArrayList
{
public:
ArrayList(const int size)
{
maxSize = size;
arrayList =new T[maxSize];
curLen=0;
position = 0;
}
~ArrayList()
{
delete[]arrayList;
}
void clear()
{
delete[... | ALGO | 0.998355 | 3.915316 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2022-01-03T03:04: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": "602e4d535216... |
ef97a6f6-c4ae-47c8-9a5d-5a33b26d77ca | paigechampagne/4883-Programming_Techniques-Champagne | assignments/P08/10226.cpp | ///////////////////////////////////////////////////////////////////////////////
//
// Author: <NAME>
// Email: <EMAIL>
// Label: 10226 - Hardwood Species
// Course: CMPS 4883
// Semester: Fall 2020
//
// Description:
// solves 10226 (see attached files for more in... | ALGO | 0.995605 | 5.193395 | {
"github_metadata": {
"branch": "master",
"commit_count": 32,
"repo_created_at": "2020-08-26T15:53: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": "1d1526e85... |
49ff14ef-0c6b-4f86-b94d-adc0ebd84457 | FuChaolei/leetcode_ago | 236.二叉树的最近公共祖先.cpp | /*
* @lc app=leetcode.cn id=236 lang=cpp
*
* [236] 二叉树的最近公共祖先
*
* https://leetcode-cn.com/problems/lowest-common-ancestor-of-a-binary-tree/description/
*
* algorithms
* Medium (67.13%)
* Likes: 1121
* Dislikes: 0
* Total Accepted: 200K
* Total Submissions: 297.9K
* Testcase Example: '[3,5,1,6,2,0,8,... | ALGO | 0.999991 | 6.601065 | {
"github_metadata": {
"branch": "main",
"commit_count": 22,
"repo_created_at": "2021-04-26T15:26: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": "91e996baf1a... |
0b1141b4-a5e1-4464-a7f3-d3a3bd1034ef | akshatshah21/positioning-using-wifi | Trials_ and_testing/wemos_rssi_raw/src/wemos_rssi_raw.cpp | #include <Arduino.h>
#include <ESP8266WiFi.h>
#include <ESP8266WiFiMulti.h>
#ifndef STA_SSID
#define STA_SSID "esp32"
#define STA_PWD "<PASSWORD>"
#endif
const char * ssid = STA_SSID;
const char * pwd = STA_PWD;
ESP8266WiFiMulti WiFiMulti;
//Implementing Kalman Filter:
double ARm, prev_Re= 0, prev_Pre = 1 ,Rre, pre... | WEB | 0.921601 | 5.779887 | {
"github_metadata": {
"branch": "master",
"commit_count": 43,
"repo_created_at": "2019-06-06T03:35:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "65e7a8d16... |
857c8b67-8edd-40e5-a392-6dff18c0b2bd | EAirPeter/cdqzoj-ds | p1011.cpp | #include <cstdio>
using namespace std;
inline int gint() {
int c;
while ((c = getchar()) < '-');
int f = 0;
bool t = false;
if (c == '-')
t = true;
else
f = c & 0x0f;
while ((c = getchar()) >= '0')
f = f * 10 + (c & 0x0f);
return t ? -f : f;
}
inline unsigned g... | ALGO | 0.999833 | 3.562658 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2016-06-02T06:24:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "86097fc618... |
c738d3e3-9d32-464d-b4ed-2815150435e5 | atishayj281/Data-Structure | Tree/Binary Tree/LCA.cpp | #include "bits/stdc++.h"
using namespace std;
class Node
{
public:
int data;
Node *left = NULL;
Node *right = NULL;
Node(int d)
{
data = d;
}
};
/*
1
/ \
2 3
/ \ / \
4 5 6 7
*/
bool getPath(Node *root, int key, vector<int> &path)
{
if (root == NULL)
{
return false;
}
path.pus... | ALGO | 0.999993 | 4.677916 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-12-24T11:59: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": "9a5964eafd... |
7e0c7aa1-70b8-46c6-a031-6c0f092f519b | AMReX-Codes/amrex | Tests/EB_CNS/Source/CNS_derive.cpp | #include "CNS_derive.H"
#include "CNS.H"
#include "CNS_parm.H"
using namespace amrex;
void cns_derpres (const Box& bx, FArrayBox& pfab, int dcomp, int /*ncomp*/,
const FArrayBox& rhoefab, const Geometry& /*geomdata*/,
Real /*time*/, const int* /*bcrec*/, int /*level*/)
{
auto c... | ALGO | 0.974351 | 4.890196 | {
"github_metadata": {
"branch": "development",
"commit_count": 27456,
"repo_created_at": "2017-04-28T19:37:00.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 637,
"forks": 407,
"issues": 21,
"pull_requests": 19
},
"file_meta": {
"content_id... |
a1fd29b0-9341-46f7-b095-97c9ebeafe8d | richardbeare/parabolicMorphology | include/itkParabolicErodeDilateImageFilter.hxx | /*=========================================================================
*
* Copyright NumFOCUS
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.o... | ALGO | 0.909697 | 7.518499 | {
"github_metadata": {
"branch": "master",
"commit_count": 315,
"repo_created_at": "2011-11-03T04:59:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 8,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "a534f716... |
f5932067-6f44-42b2-9cbd-a37914d79c43 | poseidon-code/NeetCode-Solutions | 09-backtracking/00039-Combination_Sum/00039-combination_sum.cpp | // 39: Combination Sum
// https://leetcode.com/problems/combination-sum/
#include <iostream>
#include <vector>
using namespace std;
class Solution {
private:
void backtrack(vector<int>& candidates, int target, int start, vector<int>& current, vector<vector<int>>& result) {
if (start >= candidates.size(... | ALGO | 0.999903 | 6.400912 | {
"github_metadata": {
"branch": "main",
"commit_count": 420,
"repo_created_at": "2022-07-20T17:00:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4d77d025ba... |
539fc965-5976-46c1-b0b7-ec5960655493 | akramsameer/Problems | Book/Chapter 3/Dynamic/Study/Top-Down/UVa 11450 - Wedding shopping.cpp | #include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long int
#define EPS 1e-9
using namespace std;
#define clr(v , d) memset(v , d , sizeof v)
#define sz(v) ((int)(v).size())
const int VISITED = 1;
const int UNVISITED = -1;
const long long OO = 1e12;
const int OOI = 1e9;
const double PI = acos(-1.0... | ALGO | 0.999964 | 3.06129 | {
"github_metadata": {
"branch": "master",
"commit_count": 30,
"repo_created_at": "2017-07-19T10:27: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": "c71fd5a83... |
acdd9142-f273-4d9c-93a7-c70a49738cf1 | Chunbinlin/GQ-Fast-Project | src/gqfast/loader/temp/q3_mesh_opt_4threads_90725_2584.cpp | #ifndef q3_mesh_opt_4threads_90725_2584_
#define q3_mesh_opt_4threads_90725_2584_
#include "../fastr_index.hpp"
#include "../global_vars.hpp"
#define NUM_THREADS 4
#define BUFFER_POOL_SIZE 2
using namespace std;
static args_threading arguments[NUM_THREADS];
static int* R;
static int* RC;
static uint64_t* q3_mesh... | ALGO | 0.990839 | 4.064106 | {
"github_metadata": {
"branch": "master",
"commit_count": 453,
"repo_created_at": "2016-04-28T00:08:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0718de0b... |
54299d42-c79d-4a15-9ba1-99c6732605a0 | metrictools/sensor-valve-srcds | src/util/flagparser.cc | /**
* This file is part of the "FnordMetric" project
* Copyright (c) 2014 <NAME>, Google Inc.
* Copyright (c) 2016 <NAME>, FnordCorp B.V.
*
* FnordMetric is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License v3.0. You should have received a
* copy of t... | TOOL | 0.927143 | 6.523125 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2017-05-20T18:01:03.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "38702a8368... |
d9e28f2e-c887-4aab-8148-c050108b6d01 | MichelleMouse/Ubuntu_System_Monitor | src/linux_parser.cpp | #include "linux_parser.h"
using std::stof;
using std::string;
using std::to_string;
using std::vector;
//Genric function to find value in a system file
template <typename T>
T findValueByKey(std::string const &keyFilter, std::string const &fileName)
{
std::string line, key;
T value;
std::ifstream filestream(Lin... | TOOL | 0.904478 | 5.422448 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2021-09-23T23:50:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0bee8619cce... |
2f91dcc1-5641-4d61-bb61-a2fb6cd1fac7 | wycers/Codelib | ACM Training/2018-08-01 HDU多校第四场/E.cpp | #include <cstdio>
using namespace std;
int n, a[10];
int mp[100][100], l;
long long sum[100][100];
const long long mod = 1e9 + 7;
void init()
{
scanf("%d",&n);
for (int i = 0; i < n; ++i)
scanf("%d", a + i);
l = n * n;
for (int i = 0; i < l; ++i)
{
int tag = i * (i + 1) / 2;
... | ALGO | 0.999859 | 5.351253 | {
"github_metadata": {
"branch": "master",
"commit_count": 570,
"repo_created_at": "2018-08-05T01:44:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 29,
"forks": 1,
"issues": 0,
"pull_requests": 47
},
"file_meta": {
"content_id": "8c3210... |
bc22879d-2e80-4568-ae3b-5c78ad76d6c9 | GinOwO/DSA | Sorting/Bubble Sort/bubble_sort.cpp | #include <iostream>
template<typename T>
void bubble_sort(T*, int);
int main() {
int arr[] = { 9,8,6,4,3,57,4,21,6,-1,0,2 };
std::cout << "Before Sorting:\n";
for ( int i = 0; i < sizeof(arr) / sizeof(arr[0]); i++ ) std::cout << arr[i] << ' ';
bubble_sort(arr, sizeof(arr) / sizeof(arr[0]));
std:... | ALGO | 0.999434 | 5.471694 | {
"github_metadata": {
"branch": "main",
"commit_count": 37,
"repo_created_at": "2023-11-07T10:06:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "177b40dc23e... |
612c6963-3fde-4b00-addc-91e5bdf50b33 | chitshubham/LeetcodeSubmission | 0648-replace-words/0648-replace-words.cpp |
class Solution {
public:
struct TrieNode{
TrieNode* child[26];
bool wordEnd;
TrieNode(){
wordEnd = false;
for(int i = 0; i<26;++i)
{
child[i] = NULL;
}
}
};
void insertKey(TrieNode* root , string s)
{
TrieNode* currNode = root;
... | ALGO | 0.999977 | 5.393425 | {
"github_metadata": {
"branch": "main",
"commit_count": 518,
"repo_created_at": "2024-06-02T06:40:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "db78fb948e... |
5ffdff82-a7e5-4101-a6c2-4489763bdc9b | alexvakimov/pyxaid-code | PYXAID/src_cpp/matrix.cpp | /***********************************************************
* Copyright (C) 2013 <NAME>
* This file is distributed under the terms of the
* GNU General Public License as published by the
* Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
* http://www.gnu.org/cop... | ALGO | 0.997871 | 3.783873 | {
"github_metadata": {
"branch": "master",
"commit_count": 45,
"repo_created_at": "2016-02-09T19:36:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 12,
"forks": 17,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "93e5406... |
3bf1e64e-063d-4456-beae-2ba382d5024c | tbepler/telepath | include/telepath/operations/sum.h | #ifndef INCLUDED_TELEPATH_OPERATIONS_SUM_H
#define INCLUDED_TELEPATH_OPERATIONS_SUM_H
#include "telepath/matrix/operations/fold.h"
namespace telepath{
template< typename T >
struct Sum{
template< typename U >
inline auto operator()( const T& x, U init ) const{
return fold( []( aut... | ALGO | 0.961126 | 6.731211 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2015-03-04T18:25:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5281bb9d3f... |
4736d27d-4324-41fd-8fbc-de1f9c43142a | dratcliff/advent-of-code | aoc/d13/main.cpp | #include <vector>
#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
#include <map>
#include <set>
#include <algorithm>
#include <deque>
#include <regex>
#include "main.h"
using namespace std;
vector<vector<tuple<int, int>>> entries;
tuple<long long, long long> D(vector<tuple<int, int>> entr... | ALGO | 0.998635 | 4.251013 | {
"github_metadata": {
"branch": "master",
"commit_count": 196,
"repo_created_at": "2019-12-01T15:18:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2258c3ba... |
f2c971fd-0cc1-4d81-af1b-1dc203882fd4 | asdf1234226/algorithm | hot100/btree/lc106.cpp | //给定两个整数数组 postorder 和 inorder ,其中 postorder 是二叉树的后序遍历, inorder 是同一棵树的中序遍历,请构造二叉树并返回其根节点。
#include<iostream>
#include<vector>
#include<map>
using namespace std;
struct TreeNode{
int val;
TreeNode* left;
TreeNode* right;
TreeNode(int x){
val=x;
left= nullptr;
right= nullptr;
... | ALGO | 0.999955 | 5.927981 | {
"github_metadata": {
"branch": "main",
"commit_count": 161,
"repo_created_at": "2023-10-12T07:48:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7c37a5a6ca... |
fb2c8ea0-3618-4730-82af-a4f510fbb648 | micheeeeell/AtCoder | others/EDPC/U.cpp | #define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
using namespace std;
#define rep(i,x) for(ll i = 0; i < (ll)(x); i++)
#define rrep(i,x) for(ll i = (ll)(x)-1;0 <= i; i--)
#define reps(i,x) for(ll i = 1; i < (ll)(x)+1; i++)
#define rreps(i,x) for(ll i = (ll)(x); 1 <= i; i--)
#define debug(x) cerr << #x << ": " << (x) << "... | ALGO | 0.999989 | 4.158844 | {
"github_metadata": {
"branch": "master",
"commit_count": 237,
"repo_created_at": "2019-06-21T04:33: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": "e5137dd4... |
d1793a8c-50e9-41ea-832f-5d95e6d4724c | KlvnPrtm/Colege | Sem-9/Grafika Komputer/Tugas2_672022302/main.cpp | #include<windows.h>
#include <GL/glu.h>
#include <GL/glut.h>
#include <math.h>
void mulai() {
glClearColor(1.0, 1.0, 1.0, 0.0);
glMatrixMode(GL_PROJECTION);
gluOrtho2D(0.0, 1000, 0.0, 1000);
}
void lingkaran(float cx, float cy, float r, int segmen, float R, float G, float B) {
glColor3f(R, G, B);
... | ALGO | 0.93543 | 4.459834 | {
"github_metadata": {
"branch": "master",
"commit_count": 43,
"repo_created_at": "2023-05-21T09:59: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": "307dd6414... |
7b178a7a-34b6-4638-ac0c-e21dc6183923 | rerdavies/pipedal | src/makeReleaseMain.cpp | #include "CommandLineParser.hpp"
#include <filesystem>
#include "ss.hpp"
#include "config.hpp"
#include <stdexcept>
#include <iostream>
#include <memory>
#include <array>
#include "unistd.h"
#include "UpdaterSecurity.hpp"
#include "Updater.hpp"
#include <fstream>
#include "SysExec.hpp"
#include "TemporaryFile.hpp"
#inc... | TOOL | 0.903698 | 5.057269 | {
"github_metadata": {
"branch": "main",
"commit_count": 1003,
"repo_created_at": "2021-08-15T15:33:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 154,
"forks": 12,
"issues": 9,
"pull_requests": 1
},
"file_meta": {
"content_id": "46887c... |
73080584-c22b-402c-8dea-26d6cd798f2f | 1brahimmohamed/Algorithms-in-Medicine | Assignment 4/Longest Common Subsequence of Two Sequences/lcs2.cpp | #include <iostream>
#include <vector>
using std::vector;
int lcs2(vector<int> &a, vector<int> &b) {
// get the size of the two vectors (words)
size_t sizeOfA = a.size();
size_t sizeofB = b.size();
// create table of integers (2d vector/array) with the size of the two words
vector<vector<int>... | ALGO | 0.999924 | 4.897887 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2022-10-25T23:07: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": "01b7ecd9d... |
4eec8126-f22e-404a-abe2-a2c8750e0f96 | Longnewbie/DSA | 10.CayNhiPhan/bt21_Delete/main.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
inline ll gcd(ll a,ll b) {ll r; while(b){r = a%b; a=b; b=r;}return a;}
inline ll lcm(ll a,ll b) {return a/gcd(a,b)*b;}
#define pb push_back
#define pii pair<int,int>
#define pip pair<int,pair<int,int>>
int mod = 1e9+7;
/*
- Cho mảng số nguyên A[] có ... | ALGO | 0.999996 | 4.730402 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-01-09T10:31:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "96710e740482... |
351679c4-9f8d-447c-8996-e80c11383124 | hypre-space/hypre | src/FEI_mv/femli/mli_solver_parasails.h | /******************************************************************************
* Copyright (c) 1998 Lawrence Livermore National Security, LLC and other
* HYPRE Project Developers. See the top-level COPYRIGHT file for details.
*
* SPDX-License-Identifier: (Apache-2.0 OR MIT)
***************************************... | ALGO | 0.988332 | 6.06259 | {
"github_metadata": {
"branch": "master",
"commit_count": 12337,
"repo_created_at": "2018-11-19T20:42:15.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 763,
"forks": 210,
"issues": 132,
"pull_requests": 33
},
"file_meta": {
"content_id": "... |
1160e427-8f2e-48f3-b51d-01a8ce68585e | ishandutta2007/codeforces-n | nweeks/normal/1333/D.cpp | #include <bits/stdc++.h>
using namespace std;
#define SZ(x) ((int)(x).size())
typedef long long ll;
const int MAXN = 3000;
string dir;
vector<vector<int>> optimal_moves;
int tot(0);
int n, k;
bool simulate(void)
{
int i(0);
vector<int> m;
while (i < n)
{
if (i+1 < n and dir[i] == 'R' and dir[i+1] == 'L')
{
... | ALGO | 0.999964 | 3.771365 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:35: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": "da5d3f310fd0... |
15e28c02-98aa-449f-a449-cbeaad745f48 | brpapa/algorithms | solutions/uva/11137.cpp | /*
dynamic programming > subset sum > with repetition
difficulty: easy
date: 21/Feb/2020
by: @brpapa
*/
#include <iostream>
#include <vector>
#include <cstring>
#define ll long long
using namespace std;
vector<int> coins;
ll memo[25][10000];
ll cc(int c, int v) {
// c-ésima moeda, valor restante para ... | ALGO | 0.999717 | 4.404911 | {
"github_metadata": {
"branch": "master",
"commit_count": 197,
"repo_created_at": "2019-01-25T20:40:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 35,
"forks": 15,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fc9a23... |
3a8bbb81-db25-4977-ada8-08404bf0b370 | Armaan100/DAA-Lab-Temp | Practice Graph 1/hierholzers_algo_print_euler.cpp | #include<iostream>
#include<vector>
using namespace std;
void DFS(int node, vector<vector<int>> &adjList, vector<bool> &visited){
visited[node] = 1;
for(int i=0; i<adjList[node].size(); i++){
if(!visited[adjList[node][i]]){
DFS(adjList[node][i], adjList, visited);
}
}
}
... | ALGO | 0.999924 | 5.005544 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-05-21T09:22:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4023d0a3fcbb... |
bd1a2f96-38ba-46d6-b665-b199cd9adfdb | ykavranoglu/Prim-and-Dijkstra-Algorithms | prim.cpp | /*
Commented definitons of each function exists on top of them, below main() function
*/
#include <iostream>
#include <string>
#include <fstream>
#include <vector>
#include <algorithm> // std::sort
//Nodes in the graph, or vertices, children means connections from it, they are not necessarily its "children"
struct No... | ALGO | 0.997347 | 3.84803 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2021-05-22T16:58: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": "65e1f2aa8cee... |
a4234d6a-0057-4978-9f97-f57397912e28 | tanyaaa05/Data-Structures-Learning | Vectors/commonElementsIn3Sorted.cpp | #include <iostream>
#include <vector>
#include <set>
using namespace std;
vector<int> commonElements(vector<int> &arr1, vector<int> &arr2, vector<int> &arr3) {
// Get the sizes of the three input arrays
int n1 = arr1.size();
int n2 = arr2.size();
int n3 = arr3.size();
// Vector to store t... | ALGO | 0.99991 | 6.584297 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-11-23T08:40: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": "8edb7df912f2... |
744086b1-3f12-408a-b7da-88238ef534d9 | pritamnikam/CodingInterviewPreparation | MergeIntervals/MinimumNumberPlatforms.cpp | /*
minimum number of platforms
Problem 2: Given a list of intervals representing the arrival and departure times of trains to a
train station, our goal is to find the minimum number of platforms required for the train station
so that no train has to wait.
*/
using namespace std;
#include <algorithm>
#include <io... | ALGO | 0.99967 | 5.613752 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2022-02-24T04:41: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": "4aea7def9521... |
093b6ecf-2503-4d6c-8e24-c955cee02b30 | thomasdang92/ATUM8 | 15in/src/atum8/systems/drive.cpp | #include "atum8/systems/drive.hpp"
#include "main.h"
namespace atum8 {
// User Control Drive Code
void Drive::controller() {
if (Chris.get_digital(DIGITAL_A)) {
if (speedResistor == 0.5) {
speedResistor = 1;
pros::delay(100);
}
else if (speedResistor == 1) {
speedResistor = 0.5;
... | TOOL | 0.928461 | 5.435667 | {
"github_metadata": {
"branch": "main",
"commit_count": 168,
"repo_created_at": "2023-02-03T00:44:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4050ac0e77... |
37c57e2e-be46-4d54-9a78-ffcae1e64ab3 | Sajan-Vishwakarma/Leetcode-Solutions | 2241-design-an-atm-machine/2241-design-an-atm-machine.cpp | class ATM {
public:
vector<long long> banknotes{500,200,100,50,20};
map<int,long long> bank;
ATM() {
bank[500] = 0;
bank[200] = 0;
bank[100] = 0;
bank[50] = 0;
bank[20] = 0;
}
void deposit(vector<int> banknotesCount) {
... | ALGO | 0.999778 | 4.678926 | {
"github_metadata": {
"branch": "main",
"commit_count": 721,
"repo_created_at": "2022-04-03T17:57: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": "2d9c06ed2e... |
024e80cc-3cb1-47cb-9091-50b1f99840a3 | zhangzisu/sources | _collection/LOJ/2473.cpp | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#define MAXN 1667
#define MOD 64123
int n, k, w, d[MAXN], v[MAXN], ans;
int head[MAXN], to[MAXN << 1], next[MAXN << 1], tot = 0;
inline void $(int u, int v) {
next[tot] = head[u], to[tot] = v, head[u] = tot++;
next[tot] = head[v], to[t... | ALGO | 0.99999 | 3.848446 | {
"github_metadata": {
"branch": "Online-Judge",
"commit_count": 361,
"repo_created_at": "2018-03-11T08:30:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "cf... |
25799d7d-c981-43be-b075-a1e288f766fc | sitRyo/templateCpp_atcoder | Codeforces/Educational_Round/Round63/proB.cpp | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <functional>
#include <queue>
#include <string>
#include <cstring>
#include <numeric>
#include <cstdlib>
#include <cmath>
#include <map>
using namespace std;
typedef long long ll;
#define INF 10e17 // 4倍しても(4回足しても)long longを溢れない
#de... | ALGO | 0.999881 | 4.033782 | {
"github_metadata": {
"branch": "master",
"commit_count": 36,
"repo_created_at": "2018-07-25T15:35: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": "b320c7d25... |
f297f98b-cef4-4d6e-b327-f5950b954c8b | RoeeXu/leetcode-cn | 0918.cpp | /***************************************************
* Copyright (c) 2019 <NAME>. All Rights Reserved
****************************************************
* File: 0918.cpp
* Author: root
* Date: 2019-11-25 19:03:10
* Brief:
****************************************************/
class Solution {
public:
in... | ALGO | 0.999901 | 5.633895 | {
"github_metadata": {
"branch": "master",
"commit_count": 217,
"repo_created_at": "2019-11-13T07:42: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": "ea790ac4... |
3ffeabba-de7c-47f7-8d76-6a530af7a7b6 | raincross7/code-similarity | codes/train_code/problem486/problem486_253.cpp | #include <bits/stdc++.h>
using namespace std;
int add (int a , int b , int mod) {
a += b;
while (a >= mod) a -= mod;
while (a < 0) a += mod;
return a;
}
int mul (int a , int b , int mod) {
return a * 1ll * b % mod;
}
int main() {
ios::sync_with_stdio(0) , cin.tie(0) , cout.tie(0);
#ifdef LOC... | ALGO | 0.999937 | 4.207188 | {
"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": "9768c29ca5ad... |
af9192dc-9a5c-41f6-9065-a21924f7d992 | yemiekai/Test_cpp | leetcode/include/60_GetPermutation.h | #ifndef _60_GET_PERMUTATION_H
#define _60_GET_PERMUTATION_H
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <string>
#include <string.h> // memset的头文件
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
// 60 排列序列
/***************************************... | ALGO | 0.999709 | 4.419062 | {
"github_metadata": {
"branch": "master",
"commit_count": 66,
"repo_created_at": "2021-01-01T05:05: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": "feadce074... |
cfe98ed5-6393-45c4-aaa3-cc8159ce20c7 | AlexWei061/cpp | practice/2021SummerVacation/August2021/20210824/T67346.cpp | #include<bits/stdc++.h>
using namespace std;
const int px[5] = { 0, 1, 0, -1, 0 };
const int py[5] = { 0, 0, 1, 0, -1 };
int n = 0;
int m = 0;
int maze[25][25] = { 0 };
int way[25][25] = { 0 };
struct Tnode{
int x, y;
int depth;
}q[10010];
int head = 0; int tail = 0;
void bfs(Tnode start){
q[++tail] = start;
... | ALGO | 0.999963 | 3.443623 | {
"github_metadata": {
"branch": "master",
"commit_count": 499,
"repo_created_at": "2019-10-21T06:10:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "21c713c8... |
84447d3f-d10c-4694-a4f1-fb99d0dbedbd | Harshal-9/CNS_LAB | Assignment_5.cpp | #include<bits/stdc++.h>
using namespace std;
int main()
{
string plainText;
int key;
cout<<"\n Enter plain text : ";
getline(cin,plainText);
// Removing spaces and converting to small from plaintext
string temp = "";
for(int i=0;i<plainText.size();i++)
{
if(plainText[i]!=' ')
... | ALGO | 0.999965 | 4.122393 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2022-12-06T12:59:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7b2c20d0f39... |
09487909-c76a-439f-831e-0911e026a706 | Krish-Choudhary/DSA | 112twoStacks.cpp | #include <bits/stdc++.h>
using namespace std;
// https://www.codingninjas.com/studio/problems/two-stacks_983634?leftPanelTabValue=PROBLEM
class TwoStack {
public:
int* arr;
int topIndex1;
int topIndex2;
int size;
// Initialize TwoStack.
TwoStack(int s) {
this -> size = s;
to... | ALGO | 0.999701 | 5.075433 | {
"github_metadata": {
"branch": "main",
"commit_count": 188,
"repo_created_at": "2023-12-03T15:20:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "643d04e62e... |
1b8f2bae-5819-4a9e-a826-ea5393dac803 | gh4abhi/Competitive-Programming | Leetcode/Trees/Binary Trees/113. Path Sum II.cpp | // Problem Link - https://leetcode.com/problems/path-sum-ii/
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* ... | ALGO | 0.99992 | 6.174063 | {
"github_metadata": {
"branch": "main",
"commit_count": 1287,
"repo_created_at": "2020-10-22T18:00:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "80bb37180... |
14e98782-0dc2-412f-8ed5-e506060b2fde | arthurherbout/crypto_code_detection | data/code-jam/files/635102_snizovtsev_706485_0_extracted_c.cpp | #include <climits>
#include <cstring>
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <algorithm>
using namespace std;
#define foreach(iter, cont) \
for (typeof((cont).begin()) iter = (cont).begin(); iter != (cont).end(); iter++)
bool rect[101][101];
int solve ()
{... | ALGO | 0.99723 | 3.912342 | {
"github_metadata": {
"branch": "master",
"commit_count": 66,
"repo_created_at": "2019-09-20T18:35:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 4,
"issues": 10,
"pull_requests": 1
},
"file_meta": {
"content_id": "ece95164... |
70488072-3abc-4b37-90d6-0b8cfd679bdc | SheilendraSingh/DSA | MinimuminSortedandRotatedarray.cpp | #include <iostream>
#include <vector>
using namespace std;
int findMin(vector<int> &nums)
{
int left = 0, right = nums.size() - 1;
while (left < right)
{
int mid = left + (right - left) / 2;
// If middle element is greater than the rightmost, min must be right
if (nums[mid] > nums... | ALGO | 0.99999 | 6.685946 | {
"github_metadata": {
"branch": "main",
"commit_count": 80,
"repo_created_at": "2025-06-21T09:08:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e54b82cee5e... |
d8ef354c-88a1-4c8e-a84c-d0af5ddf1290 | Gedemon/Civ5-DLL | CvGameCoreDLLUtil/include/CvWeightedVector.h | #pragma once
#ifndef CIV5_WEIGHTED_VECTOR_H
#define CIV5_WEIGHTED_VECTOR_H
#include <algorithm>
#include "EventSystem/FastDelegate.h"
#include "FFastVector.h"
// Functor for random number callback routine
typedef fastdelegate::FastDelegate2<int, const char *, int> RandomNumberDelegate;
//+++++++++++++++++++++++++++... | TOOL | 0.950526 | 7.413485 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2012-11-21T20:13:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 75,
"forks": 28,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fa2d3f2f... |
afa17127-6489-420d-be12-dd7a9303851f | raincross7/code-similarity | codes/train_code/problem408/problem408_98.cpp | #include <bits/stdc++.h>
using namespace std;
#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
typedef long long ll;
typedef long double lb;
typedef pair<int,int> P;
const int MOD = 1000000007;
const ll INF = 1e10;
const double EPS = 1e-10;
const double PI = 3.141592653589793;
template<class T... | ALGO | 0.999994 | 3.306517 | {
"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": "7e88fea35b13... |
682aad2f-61f1-4c5e-8fbd-35cd5cc2f846 | Harsha22hemanth/DSA0151-C- | day 3 programs/30)narcissistic number or not.cpp | #include <iostream>
#include <cmath>
using namespace std;
int countDigits(int n) {
int count = 0;
while (n != 0) {
count++;
n /= 10;
}
return count;
}
bool isNarcissistic(int n) {
int original = n;
int sum = 0;
int digits = countDigits(n);
while (n > 0) {
int... | ALGO | 0.99855 | 5.277631 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2024-05-13T03:05:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "39742d0bb99... |
3ffccec3-4bb8-48c6-9c3b-73e75c4351b0 | kptriescoding/lab_programs_4th_sem | DAA/CPP/Prog10.cpp | #include <bits/stdc++.h>
using namespace std;
void findCombination(vector<int> &candidates, int target, vector<vector<int>> &res, vector<int> &temp, int index)
{
if (target == 0)
{
res.push_back(temp);
return;
}
if (index == candidates.size() || target < 0)
{
return;
}
... | ALGO | 0.999924 | 4.961356 | {
"github_metadata": {
"branch": "main",
"commit_count": 76,
"repo_created_at": "2022-06-14T12:59:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2e389c6371a... |
ca883407-9fed-426d-a1be-a0bee6e00496 | dboglobal/DBOGLOBAL | NtlLib/Shared/PathEngine-5.10/code/libs/PathEngine_Core/SilhouetteLookup.cpp | //**********************************************************************
//
// Copyright (c) 2007
// PathEngine
// Lyon, France
//
// All Rights Reserved
//
//**********************************************************************
#include "platform_common/Header.h"
#include "SilhouetteLookup.h"
#include "SilhouetteReg... | ALGO | 0.995108 | 4.022527 | {
"github_metadata": {
"branch": "master",
"commit_count": 36,
"repo_created_at": "2020-04-24T10:59:32.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 61,
"forks": 95,
"issues": 6,
"pull_requests": 1
},
"file_meta": {
"content_id": "6475d0ec... |
3e513598-a0e2-4eab-ba79-8e1d448aca42 | LitStronger/homework | 大三(上)/C++/week8/Matrix.cpp | #include <iostream>
using namespace std;
class Matrix
{
public:
Matrix(int new_arr[], int len)
{
arr = new int[10][10];
edge_len = len;
int k = 0;
for (int i = 0; i < len; i++)
{
for (int j = 0; j < len; j++)
{
arr[i][j] = new_arr[k... | ALGO | 0.993984 | 4.285643 | {
"github_metadata": {
"branch": "master",
"commit_count": 66,
"repo_created_at": "2020-03-28T15:00:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 18
},
"file_meta": {
"content_id": "de13ab57... |
5016f98e-34c4-431d-832a-4443f750c655 | sreesadineni/DSA | Flood fill Algorithm - GFG/flood-fill-algorithm.cpp | //{ Driver Code Starts
#include<bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
int dirx[4]={-1,1,0,0};
int diry[4]={0,0,1,-1};
vector<vector<int>> floodFill(vector<vector<int>>& image, int sr, int sc, int color) {
int n=image.size();
int m=image[0].size... | ALGO | 0.997707 | 5.914992 | {
"github_metadata": {
"branch": "main",
"commit_count": 825,
"repo_created_at": "2022-07-12T17:26: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": "2b5eb07c3d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.