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 |
|---|---|---|---|---|---|---|---|
3b6c8ce1-aca3-4e1e-b233-be8fc263b60f | archit-1997/codeforces | solved_problems/456A.cpp | /*One day Dima and Alex had an argument about the price and quality of laptops.
Dima thinks that the more expensive a laptop is, the better it is. Alex
disagrees. Alex thinks that there are two laptops, such that the price of the
first laptop is less (strictly smaller) than the price of the second laptop but
the qualit... | ALGO | 0.999648 | 3.561688 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2021-01-27T14:22:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5c0889a4b449... |
9d31fe9f-84f0-4063-bc63-c75b374d60c1 | zukun/rcc | vxl/vxl-1.13.0/core/vnl/examples/vnl_svd_economy.cxx | #include <vcl_iostream.h>
#include <vul/vul_timer.h>
#include <vnl/vnl_random.h>
#include <vnl/vnl_matrix.h>
#include <vnl/vnl_matlab_print.h>
#include <vnl/algo/vnl_svd.h>
#include <vnl/algo/vnl_svd_economy.h>
int main()
{
vnl_random rng(9667566ul);
{
vnl_matrix<double> M( 10, 4 );
for (unsigned int i=0 ;... | ALGO | 0.993368 | 4.809045 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2013-02-21T15:10:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 14,
"forks": 16,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9d66b24... |
9b787732-1076-4eed-8cb9-b7c52785f6e8 | YatharthNigam/Codechef | Practice/A_Omkar_and_Bad_Story.cpp | #include <bits/stdc++.h>
using namespace std;
void solve()
{
int n, max = 0;
bool neg = false, zero = false;
cin >> n;
for (int i = 0; i < n; i++)
{
int temp;
cin >> temp;
if (temp < 0)
{
neg = true;
}
if (temp == 0)
zero = tru... | ALGO | 0.999905 | 4.218689 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2021-07-29T13:21: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": "9d9d812322af... |
bb58fb1a-672e-4e31-becd-7518f486d5c1 | sasiking/Ds_Algo | Graphs/TopoSort_DFS.cpp | #include <bits/stdc++.h>
using namespace std;
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define f(i,n) for(int i = 0;i <(int)(n);++i)
#define fr(i,n) for(int i = (int)(n) - 1;i>=0;i--)
#define rep(i,a,b) ... | ALGO | 0.999979 | 4.323209 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2021-05-10T16:13: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": "850d525d434c... |
ed535622-a092-4fd0-9707-966e0e9a18d5 | Tianxintong/git | shua_ti_刷题/Tencent/6_26/test.cpp | #include<iostream>
#include<string.h>
using namespace std;
#define MAX 10000
typedef struct Node
{
int data;
Node *next;
}Node;
void output(Node* head,int pos)
{
Node *p = head;
for(;p->next;p=p->next)
{
cout<<p->data<<" ";
}
}
void Mul(char *a,char *b,int pos)
{
char *ap = a;
char *bp = b;
Node *head = 0;... | ALGO | 0.998259 | 3.293974 | {
"github_metadata": {
"branch": "master",
"commit_count": 60,
"repo_created_at": "2017-04-25T11:45: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": "a2cfe45e5... |
22af8589-bc3c-4274-9af6-dcb91373ad57 | edisonhello/competitive_programming | TOI/2018_1sim/d2.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define sq(x) ((x)*(x))
struct flight{
ll x,y;
int id;
} a[100005];
inline ll dis(const flight &a,const flight &b){
return sq(a.y-b.y)+sq(a.x-b.x);
}
int n,idx[100005],mn_id1,mn_id2;
// int to_id[100005];
ll k,sq_d;
void dc(int idl,int i... | ALGO | 0.999978 | 3.740838 | {
"github_metadata": {
"branch": "master",
"commit_count": 843,
"repo_created_at": "2016-03-15T14:58:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "426b7b78... |
493461b1-b6b8-47ae-9def-38e9ab83d2c4 | AI-MANIAC007/Data-Structures | Lab 5/5_Circularly_Linked_List.h | // Header file consisting of operations on a circularly linked list
#include <iostream>
using namespace std;
class list
{
private:
struct node
{
int data;
struct node *next;
} *head;
public:
list();
void display();
void insertBeg(int);
void insertEnd(int);
bool insertPo... | ALGO | 0.999806 | 5.774579 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2025-04-27T14:46: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": "c0b7d15e6b5... |
830a0293-3b24-4b4e-b4e3-72401d336280 | junyong1111/2022 | algorithm/BOJ/silver/Silver1/1931.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef struct conference{
int start;
int end;
}conference;
bool com(conference a, conference b){
if(a.end < b.end)
return true;
if(a.end ==b.end){
//else if로 하면 segment falut뜸 ... 왜 그럴까
return a.... | ALGO | 0.999966 | 4.624324 | {
"github_metadata": {
"branch": "main",
"commit_count": 537,
"repo_created_at": "2022-03-14T06:19:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7f812077ac... |
837ef548-69ef-4efb-8ac2-7bb4c500b6d5 | hieunsdev/learning | learning/stack/stack.cpp | #include <iostream>
#include <stack>
using namespace std;
// LIFO : last in first out
// push : them phan tu vao stack
// pop : xoa' phan tu ra khoi stack
// top (function) : lay ra phan tu dinh? cua stack
// size (function) : tra ve so luong phan tu
// empty (function) : check xem stack co rong~ hay khong. TRU... | ALGO | 0.999877 | 4.435459 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2023-12-15T02:00: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": "b13892d1a1d... |
c36a2d75-3646-46d4-9fdd-1d4723af4c1b | Bocity/ACM | vjudge/556/HDU/5142/10434052_AC_0ms_1652kB.cpp | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
//#pragma comment(linker, "/STACK:1024000000,1024000000")
#define all... | ALGO | 0.999975 | 3.900654 | {
"github_metadata": {
"branch": "master",
"commit_count": 27,
"repo_created_at": "2016-12-10T13:53: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": "f1035fa77... |
c21a4cf7-a023-4666-9741-43e0de85690e | suaebahmed/CSES-problem-set-and-USACO | cses-problem-set/dp/array-description/array-description-iterative.cpp | #include<bits/stdc++.h>
using namespace std;
#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define For(i,n) for(ll i=0; i<int(n); ++i)
#define scanArr(v) for (auto &it : v) cin >> it;
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define ff first
#define ss sec... | ALGO | 0.999989 | 3.866376 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2020-11-06T13:41:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "aa06fb8bec91... |
09101eee-a22d-48bc-a48e-dc32fcc17040 | akshay-iyer/Harris-Corner | main.cpp | #include "harrisCorner.h"
using namespace cv;
using namespace std;
int main(int argc, char* argv[]) {
Mat img1,img2,img3,img4;
if(argc == 1)
{
cerr<<"No image or video path found. Run the program as\n 1 <path_to_image> OR\n 2 <path_to_video>\n";
return 0;
}
Harris h;
... | ALGO | 0.998476 | 4.692474 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2019-03-25T03:54: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": "88c847180... |
db6e2a9c-9779-4b2d-8257-55526715f0b5 | keroro520/ACM | hust/只剩11天啦/A.cpp | #include <algorithm>
#include <stdio.h>
#include <string.h>
using namespace std;
#define MAXN 105
const int dx[4] = {0, 1, 0, -1};
const int dy[4] = {1, 0, -1, 0};
struct Cell {
int x, y, h;
} a[MAXN * MAXN];
int pos[MAXN][MAXN], head[MAXN * MAXN], f[MAXN * MAXN], in[MAXN*MAXN], Q[MAXN*MAXN];
struct Edge {
int v, ... | ALGO | 0.999837 | 3.602908 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2014-04-15T10:11:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "466efec727... |
48eaf4d4-03f4-4f25-a2da-b2245b871a73 | AbdallahHossam/TicTacToeNN | NN/Net.h | #pragma once
#include "FC.h"
#include <vector>
enum class act_fn {
RELU, TANH, SIGMOID
};
Eigen::VectorXf net_relu(Eigen::VectorXf x); // relu activation function
Eigen::VectorXf net_reluDerivative(Eigen::VectorXf x); // derivative of relu activation function
Eigen::VectorXf net_tanh(Eigen::VectorXf x); // tanh acti... | ALGO | 0.936315 | 5.697873 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2022-04-05T12:04: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": "db544f81d... |
fb44da4e-1fa0-4648-bdc6-dd5668ce31f4 | divykantsharma/Coding-Ninja-Solutions | Milestone 5/Graphs 1/3 Cycle.cpp | #include <iostream>
using namespace std;
int countCycles(bool **arr, long long n)
{
int count = 0;
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
if (i != j && arr[i][j] == 1)
{
for (int k = 0; k < n; k++)
{
... | ALGO | 0.999922 | 4.581227 | {
"github_metadata": {
"branch": "main",
"commit_count": 67,
"repo_created_at": "2023-05-31T12:45:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "919cbe1bbb2... |
a30d526a-0ea7-4d12-ada8-1e590a5c0092 | Bhavesh0327/Haffun_with_DSA | Trees/Trees-binaryToDoubleTree.cpp | #include<iostream>
#include<bits/stdc++.h>
using namespace std;
struct node{
int data;
struct node* left;
struct node* right;
};
struct node* newNode(int data)
{
node* Node = new node();
Node->data = data;
Node->left = NULL;
Node->right = NULL;
return(Node);
}
... | ALGO | 0.999984 | 4.654106 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2020-06-05T05:27:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c40ba394d... |
dd17a754-bde1-4831-a59a-59b6cb97d973 | chess1424/Programming_contests | UVA/939 - Genes.cpp | // <NAME>
// https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=880
#include <bits/stdc++.h>
using namespace std;
map< string , pair<string , pair<string , string> > > m;
map< string , pair<string , pair<string , string> > >::iterator it;
string findStatus(st... | ALGO | 0.999943 | 4.340667 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2017-02-25T05:20: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": "a8475200c... |
77a7763e-0fb3-4362-a13e-b87c13e4a0b4 | Nayekah/Tugas-Besar-1-IF2010-OOP-Purry_Leveling-CTF | src/drivers/playerconfigparser.cpp | #include "parser/PlayerConfigParser.hpp"
#include <iostream>
#include "items/ItemManager.hpp"
#include "parser/ItemConfigParser.hpp"
int main()
{
// 1) load global item list
const std::string itemFile = "data/configtest/item.txt";
ItemConfigParser itemParser;
if (!itemParser.ParseFromFile(itemFile))... | TOOL | 0.904668 | 5.264093 | {
"github_metadata": {
"branch": "main",
"commit_count": 256,
"repo_created_at": "2025-05-06T13:09: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": "90c5ed86cf... |
047e3383-d98b-443b-b999-2806eb686adf | ishandutta2007/codeforces-s | simasimarisa/normal/1360/E.cpp | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <tuple>
#include <cstdint>
#include <cstdio>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <deque>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <cctype>
#in... | ALGO | 0.999923 | 4.507281 | {
"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": "6c06fe96304e... |
b6cb7c70-e5dd-4d09-a6e8-c59f5d004791 | figield/SPOJ | TRASH/tested1.cpp | #include <iostream>
#include <math.h>
#include <stdlib.h>
using namespace std;
int is_prime(unsigned long p)
{
unsigned long r = sqrt(p);
unsigned long i = 2;
while(i <= r) if(!(p % i++)) return false;
return true;
}
// 1 + p^1 + p^2 + ... + p^n
unsigned long sum_pimes(int p, int n){
unsigned long sum = 1... | ALGO | 0.999441 | 4.115577 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2013-12-13T19:43: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": "713b718a4a... |
bb829db3-3d00-4cdf-aa89-b45c38243ead | sahatonny/Security_Project | DH Key exchange.cpp |
#include <cmath>
#include <bits/stdc++.h>
using namespace std;
long long bin_pow(long long base, long long power, long long mod)
{
if(power == 0)
return 1;
else if(power % 2 == 1)
{
long long p1 = base % mod;
long long p2 = (bin_pow(base, power-1, mod)) % mod;
return (p1 ... | ALGO | 0.999862 | 4.683358 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2023-08-10T09:42: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": "0235acfb0d0... |
6552ce5b-46ab-4935-a4b3-8c0fa0755b19 | rrupom/LeetCode | Array/45-jump-game-ii.cpp | #include<bits/stdc++.h>
using namespace std;
class Solution {
public:
int jump(vector<int>& nums) {
int left = 0;
int right = 0;
int move = 0;
int n = nums.size() - 1;
while (right < n) {
int maxReach = 0;
for (int i = left; i <= right; i++) {
maxReach = max(maxReach, i + nums[i]);
}
left =... | ALGO | 0.999984 | 4.725131 | {
"github_metadata": {
"branch": "main",
"commit_count": 38,
"repo_created_at": "2023-08-31T05:53: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": "6e91dda0c55... |
4c01159b-e813-43c7-9244-6bb7d077fc46 | xioumu/STL | 图/minCostMaxFlow.cpp | struct Graph {
struct Adj {
int v, c, w, b;
Adj(int _v, int _c, int _w, int _b)
:v(_v), c(_c), w(_w), b(_b) {}
}*st[maxn];
vector<Adj> adj[maxn];
int n;
int NEXT(int s, int n) {
return s % n;
}
void clear() {
for (int i = 0; i < n ; i++) {
... | ALGO | 0.999536 | 3.973666 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2013-06-10T16:21:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 16,
"forks": 9,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7ada5e260... |
3031b425-7d23-481d-9f79-28798cb94f90 | m-reuter/arpackpp | examples/matrices/nonsym/bnmatrxd.h | /*
ARPACK++ v1.2 2/20/2000
c++ interface to ARPACK code.
MODULE BNMatrxD.h
Function template for the block tridiagonal matrix A, whose
diagonal blocks are tridiagonal with 4 on the diagonal,
-1-rho*h/2 on the subdiagonal and -1+rho*h/2 on the superdiagonal.
Each off-diagonal block of A is an id... | ALGO | 0.994707 | 4.945522 | {
"github_metadata": {
"branch": "main",
"commit_count": 191,
"repo_created_at": "2015-05-07T13:44:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 67,
"forks": 29,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "71ad94d0... |
54a91a2c-ab91-4fe7-82f8-1b0e148407ff | heig-lherman/asd | pw01/src/insertion-sort.h | /* -----------------------------------------------------------------------------------
* File name : insertion-sort.h
* Authors : [redacted]
* Creation date : 24.02.2022
*
* Description : Tri par insertion avec données en vecteurs
*
* Compiler : gcc version 11.2.0 (Solus)
* --------------------... | ALGO | 0.999798 | 6.217085 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-10-20T08:54:25.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "170d342bf3abf... |
a9546b6f-8d20-4a90-81b7-551d97dc4b2d | shivkaraman/DSA | 01_Pep coding/Level 2/03_LinkedList/14_ReverseInRange.cpp | /*
1. Given a singly linklist, Reverse a linkedlist from starting position to end position.
2. Do it in one-pass. without using any extra space.
3. Indexing start from numeric 1.
Input
8->8->14->1->10->12->null
3
5
Output
8->8->10->1->14->12->null
*/
#include <iostream>
using namespace std;
class N... | ALGO | 0.999983 | 5.258502 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-11-26T08:50: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": "07188af66708... |
02268fa5-3536-491d-9da1-3ad42459b770 | ashchuk/cpp-samples | main.cpp | #include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <array>
using namespace std;
//int main() {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
// int n;
// std::string rawInput;
// scanf("%d", &n);
// std::cout << n << "!\n... | ALGO | 0.999826 | 4.382588 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2019-12-14T11:15: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": "1224c1d2e1... |
97ddb94f-2eb4-4000-93fc-dfcd3f2d2d61 | kunal9729/geeks-for-geeks-potd- | Find Maximum Equal sum of Three Stacks.cpp | //{ Driver Code Starts
//Initial Template for C++
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
//User function Template for C++
class Solution{
public:
int maxEqualSum(int N1,int N2,int N3,vector<int> &S1,vector<int> &S2,vector<int> &S3){
reverse(S1.begin(),S1.end());
reverse(S2.b... | ALGO | 0.999903 | 5.552455 | {
"github_metadata": {
"branch": "main",
"commit_count": 199,
"repo_created_at": "2023-04-02T17:43:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "428156664f... |
8cf1bb09-ec54-4283-85e9-6ed7ce6035c2 | beaverden/Algorithms | QuickSort.cpp | template <class T>
int partition(T array[], int left, int right, int pivot)
{
while (left <= right)
{
while (array[left] < pivot && left <= right) left++;
while (array[right] > pivot && left <= right) right--;
if (left <= right)
{
T temp = array[right];
a... | ALGO | 0.999952 | 5.805017 | {
"github_metadata": {
"branch": "master",
"commit_count": 61,
"repo_created_at": "2015-10-04T16:18: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": "92434074e... |
36a1119f-2446-4ccb-8481-df585895fe11 | ishandutta2007/codeforces-d | dotorya/normal/490/B.cpp | //*
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <time.h>
#include <math.h>
#include <string.h>
using namespace std;
typedef long long ll;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;
typedef pair <char, char> pcc;
typedef pair <int, char> pic;
typedef set... | ALGO | 0.999843 | 3.441295 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:31: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": "5047b213dc0c... |
2226d7ca-7aeb-4ccb-a3a8-3c264f826c85 | pimmen/Overseer | src/spatial/bits/spatial_rank.hpp | // -*- C++ -*-
//
// Copyright <NAME> 2009 - 2013.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file COPYING or copy at
// http://www.boost.org/LICENSE_1_0.txt)
/**
* \file spatial_rank.hpp
* Defines \ref spatial::details::Static_rank and
* \ref spatial::details::Dynamic_r... | TOOL | 0.949562 | 7.429631 | {
"github_metadata": {
"branch": "master",
"commit_count": 62,
"repo_created_at": "2017-09-25T17:52:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 13,
"forks": 2,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "57cd84e7... |
763773d8-c46a-4c82-a3d4-e19577c34470 | jm-park/algorithm | baekjoon/[완전탐색]15686_치킨 배달.cpp | #include <iostream>
#include <utility>
#include <vector>
#include <algorithm>
using namespace std;
int ans=987654321, n, m, map[51][51];
bool chosen[15];
vector<pair<int,int>> house, chicken;
void dfs(int idx, int chicken_cnt) {
if(idx > chicken.size()) return;
// m개인 경우, 최소 경로
if(chicken_cnt == m) {
... | ALGO | 0.999943 | 3.846098 | {
"github_metadata": {
"branch": "master",
"commit_count": 165,
"repo_created_at": "2018-07-17T08:21: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": "87b71dc8... |
0d5526f7-1358-4b1f-ae17-a2898cb5639b | kai-wei-kfuse/vscode | 2022/202209/20220907/atc213B.cpp | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int xx, yy, n;
cin >> xx >> yy >> n;
vector<int> ve(n + 1), x(n + 1);
vector<int> ve2(n + 1), y(n + 1);
for (int i = 1; i <= n; i++) {
cin >> x[i] >> y[i];
ve.push_back(x[i]);
ve2.pus... | ALGO | 0.999996 | 4.237203 | {
"github_metadata": {
"branch": "c++",
"commit_count": 42,
"repo_created_at": "2023-03-25T03:45:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fa26f431663c... |
4089fe9d-fe34-4d11-a22f-b614f1b178c8 | Mann-Chandarana/My-Codes | Love babbar/Lec_60_Queue/3_Doubly_Ended_Queue/doublyEndedQueue.cpp | #include <bits/stdc++.h>
using namespace std;
// Implementation using LL
class Node
{
public:
int data;
Node *next;
Node(int val)
{
data = val;
next = NULL;
}
};
class Dequeue
{
Node *head;
Node *tail;
int dqSize;
public:
Dequeue()
{
head = NULL;
... | ALGO | 0.99156 | 4.905513 | {
"github_metadata": {
"branch": "main",
"commit_count": 33,
"repo_created_at": "2023-10-14T18: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": "120740d1cd3... |
f0999105-c5a6-4eaa-8855-66af9ddf04fb | DavidBShan/Competitive-Programming2022-2024 | OlympiadLevelFour/Oct 7/ICPCPACNW16J.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MM = 2e5+2, LOG = log2(MM);
int N, Q; ll st[MM][LOG+1], val;
ll rmq(int l, int r){
int k = log2(r - l + 1);
return min(st[l][k], st[r-(1<<k)+1][k]);
}
int main(){
ios::sync_with_stdio(0); cin.tie(0);
cin >> N >> Q;
for(int... | ALGO | 0.999983 | 4.154773 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-12-17T04:58: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": "bafd7e542b43... |
8ab18b94-9cdc-4745-9cd3-4310372e9b2d | Shagor71/CP-Competetive-Programming- | XOR BASIS/F_Mahmoud_and_Ehab_and_yet_another_xor_task.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mk make_pair
const int N = 2e5 + 7, MX = N, M = 1e9 + 7;
int e;
bool insert(vector<int>&basis, int mask) {
for(int i = 20; i >= 0; i--) {
if(mask >> i & 1 ^ 1) continue;
if(!basis[i]) return basis[i] = mask;
mask ^=... | ALGO | 0.999977 | 3.864273 | {
"github_metadata": {
"branch": "main",
"commit_count": 43,
"repo_created_at": "2025-05-05T15:39: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": "3b2c1e7622f... |
6cd1f487-d0bc-4c76-bdcd-d2f1ce99e94c | ishandutta2007/codeforces-n | ngfam/normal/274/B.cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int n;
long long a[N];
long long sub[N];
long long ins[N];
vector < int > adj[N];
void dfs(int u, int p = 0){
for(int v : adj[u]){
if(v == p){
continue;
}
dfs(v, u);
sub[u] = max(sub[u], sub[v]);
ins[u] = max(ins[u], in... | ALGO | 0.99974 | 3.626603 | {
"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": "f10f6c1b4e4b... |
4b145463-0fef-4af6-9323-249d7482ce17 | ajayjangid-51/dsa | dsasolve/dsalgo/dataStructures_notes_udemy/section-16-Binary-Search-Tree/class301-to-302-Inserting-in-BST.cpp | //🔥💲🍕 AS now aab apn "Binary-Search-Tree" meh "insertion" krna dekhenge , mtlb yeh dekhenge ki apnko "Binary-search-Tree" meh insertion kis tarah se , mtlb kis way meh mtlb kaha and kaise krna hai ki Insertion krne k baad meh bhi voh Tree "Binary-search-tree" hi bana rhe, mtlb "Binary-Search-Tree" ka kuch distructio... | ALGO | 0.999983 | 5.227643 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2022-12-30T17:23: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": "98ce2c56b0... |
f0c8f916-c3ea-406e-9f8c-3df3c2082777 | world-fish/algorithm | carl/binaryTree.h | #include <string>
#include <vector>
#include <stack>
#include <queue>
#include <algorithm>
#include <unordered_map>
#include <iostream>
#include <set>
#include <map>
using namespace std;
typedef long long ll;
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode() : val(0), left(nullp... | ALGO | 0.999901 | 4.515522 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2024-08-21T01:26: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": "729cf51ad... |
9f79676a-a4db-4a8c-a2aa-78c904f76803 | harshraj78/DSA | 5. Arrays/19_maxGroupFlip.cpp | // we are given a binary array. we need to make all the elements of the array same by flipping at most one consecitive sub-array of either 0 or 1. print flips from where to where.
// i/p:- arr[] = {0,0,1,1,0,0,1,1,0}
// o/p:- from 2 to 3
// from 6 to 7
// i/p:- arr[] = {0,0,1,1,1,1,1,1,0}
// o/p:- from 2 to 7
/... | ALGO | 0.99997 | 4.748031 | {
"github_metadata": {
"branch": "main",
"commit_count": 120,
"repo_created_at": "2023-06-01T11:24:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "58e2484a20... |
e56ff445-e26b-430c-9c5a-6e204a242fe4 | Y-YDev/AIGame | C/C/Board.cpp | #include "Board.h"
#include <iostream>
using namespace std;
Board::Board() {}
Board::Board(Board* board) {//Copie du board par constructeur
for (int i = 0; i < board->currentSize; i++) {
cells[i] = board->cells[i];
}
this->totalSeed = board->totalSeed;
this->P1Turn = board->P1Turn;
thi... | ALGO | 0.96599 | 4.107792 | {
"github_metadata": {
"branch": "main",
"commit_count": 47,
"repo_created_at": "2020-12-03T19:29:19.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9b07840b8c42... |
3e170572-ca95-40e4-8375-91c31683d814 | norisumo/Atcoder_ABC | 291/E.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(int i=0; i<(n); i++)
int main() {
int n,m;
cin >> n >> m;
vector<vector<int>> to(n);
vector<int> deg(n);
rep(i,m) {
int a,b;
cin >> a >> b;
--a;
--b;
to[b].push_back(a);
... | ALGO | 0.999999 | 4.098365 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2023-10-22T13:46:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e79581f05d... |
636ea620-e766-4385-ae33-9c6227098949 | Sulochan36/GFG-DSA | Difficulty: Easy/Number of occurrence/number-of-occurrence.cpp | //{ Driver Code Starts
// Initial function template for C++
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
int countFreq(vector<int>& nums, int target) {
// code here
int n = nums.size();
int l =0 , h =n-1;
int count=0;
int f... | ALGO | 0.99926 | 5.546043 | {
"github_metadata": {
"branch": "main",
"commit_count": 154,
"repo_created_at": "2024-02-05T03:48: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": "cbb7ec4917... |
2b848bbf-ad50-4d63-8ff4-1e9c0fc1cadb | ishandutta2007/codeforces-j | jtnydv25/normal/908/D.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define sd(x) scanf("%d", &(x))
#define pii pair<int, int>
#define F first
#define S second
#define TRACE
#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
cerr << name <... | ALGO | 0.99966 | 4.231205 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T05:42:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9013bbfdb08c... |
de159992-9b70-4a3e-a543-98ae8f1a803a | begoon/acm | uva.onlinejudge.org/732, Anagrams by Stack/problem.cpp | #include <iostream>
#include <vector>
#include <map>
#include <stack>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <iterator>
#include <numeric>
#include <limits>
#include <algorithm>
#include <string>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cassert>
#ifdef _DEBUG
#include <... | ALGO | 0.998268 | 4.026123 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2012-09-26T14:30:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 11,
"forks": 7,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8ba9da68a... |
06cc4d91-6afb-4729-96fd-9f47cc93e75c | WCWFA/code-practice | 线段树【模板】4/线段树【模板】.cpp | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 1e5 + 9;
ll n, m, q;
ll a[N], lazy[4 * N], lazy1[4 * N];
struct node
{
int l, r;
ll sum;
};
node tree[4 * N];
void buildTree(int left, int right, int u)
{
tree[u].l = left;
tree[u].r = right;
if (left == right)
{
tree[u].sum = a[le... | ALGO | 0.999865 | 4.619763 | {
"github_metadata": {
"branch": "main",
"commit_count": 28,
"repo_created_at": "2024-06-03T03:41: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": "2d73853a172... |
93c90b23-6510-40ff-9141-1ce1e51f0a6d | deepanshu-rajput-git/210_days_DSA_Challenge | Love_Babbar_450/9Sep2022/Job Sequencing Problem.cpp | // CPP DSA Love Babbar 450
//{ Driver Code Starts
// Program to find the maximum profit job sequence from a given array
// of jobs with deadlines and profits
#include<bits/stdc++.h>
using namespace std;
// A structure to represent a job
struct Job
{
int id; // Job Id
int dead; // Deadline of job
i... | ALGO | 0.999959 | 5.275394 | {
"github_metadata": {
"branch": "master",
"commit_count": 543,
"repo_created_at": "2022-07-14T01:27: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": "970a268c... |
3bd31784-e878-4d1c-a879-83a0c63abcae | FernandoAyach/competitive | beecrowd/c++/2238.cpp | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, w, n) for (int i = w; i < (int)n; i++)
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
typedef long long ll;
typedef unsigned long long llu;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<bool> vb;
typedef vect... | ALGO | 0.999986 | 4.454037 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2023-07-14T14:43:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "96c6a18c885... |
f6852813-21ea-42c8-af19-5c5f81d54db6 | audi2654/allAboutCPP | cpp_adriann_problems/arr_lis_str/prog7.cpp | //Write three functions that compute the sum of the numbers in a list
//using a for-loop, a while-loop and recursion.
#include <iostream>
using namespace std;
void sumWithFor(int [], int);
void sumWithWhile(int [], int);
void sumWithFor(int arr[], int cnt){
int sum(0);
for (size_t i = 0; i < cnt; i++)
... | ALGO | 0.999017 | 5.062395 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-10-20T06:21: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": "df4c9e2fabb2... |
849c20e9-0e77-49ee-ba45-4e274f040686 | jacstrong/Code-Competitions | Code-Chef/2017-8_CHEFPDIG.cpp | /*
* <NAME>
* Written Spetember 2017
* https://www.codechef.com/SEPT17/problems/CHEFPDIG/
*/
#include <iostream>
#include <vector>
#include <string>
void readInputs(std::vector<std::string> &testCases);
void placeChar(std::string &outputS, int &tempI);
int wasTested(std::vector<int> &tested, int num);
int main(... | ALGO | 0.999767 | 4.758149 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2017-10-09T19:53:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "625c967f9... |
6d0407f3-a680-44bd-a413-c3778e0bcd8a | jubin-vjk/AoC2024 | Day3.cpp | #include <iostream>
#include <sstream>
#include<cctype>
using namespace std;
int main() {
int sum = 0, count = 0, dos =0, donts = 0;
bool doOrDont = true;
string line;
while (getline(cin, line)) {
for(size_t i = 0; i < line.length(); i++) {
if (line.substr(i, 4) == "do()") {
... | ALGO | 0.998108 | 4.024948 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2025-05-22T22:02: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": "a2159047aa31... |
b0d0af6d-edb7-4d20-a38b-7a39fc673455 | jp05451/B10915045 | pla2dot.cpp | #include <iostream>
#include <fstream>
#include <sstream>
#include <algorithm>
#include <math.h>
#include <vector>
using namespace std;
class Node
{
public:
char variable;
int else_edge, then_edge;
bool isRedundant;
};
int nin = 0, nout = 0;
vector<Node> node;
vector<char> ilb;
vector<char> ob;
vector<bool> bit;
... | ALGO | 0.998174 | 3.932247 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2022-09-19T18:59: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": "e93cb216d7... |
25601af5-c3d4-4e28-9c14-1fb41554e598 | neetusuthar90/DSA | LCS/LPS.cpp | #include <bits/stdc++.h>
using namespace std;
int LCS(string X, string Y, int n, int m){
int **dp = new int*[n+1];
for(int i = 0; i <= n; i++)
dp[i] = new int[m+1];
for(int i = 0; i <= n; i++){
for(int j = 0; j <= m; j++){
if(i == 0 || j == 0)
dp[i][j] =... | ALGO | 0.999941 | 4.225519 | {
"github_metadata": {
"branch": "main",
"commit_count": 43,
"repo_created_at": "2022-06-03T14:03:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7febf42c4ed... |
b0999b32-9a2d-4dd0-885e-8a4853e050b6 | PawelNowak1/CreateFractalWithChaosGame | FractalChaosGame/UserInput.cpp | #include "stdafx.h"
#include <iostream>
#include "UserInput.h"
#include "FractalGenerator.h"
#include <vector>
void getVerticesInput(std::vector<Vertex>& vertices, const int NUMBER_OF_VERTICES);
bool getExitInput();
bool getUserInput()
{
int width, height, numberOfVertices, currentX, currentY, iterationNumber;
s... | TOOL | 0.911865 | 4.367482 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-09-30T12:04: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": "56dff146c4... |
eff24ed6-004d-4988-afab-bb6a9d7bbca3 | sungwoopark95/QualExamCoding | soungmunkim/C++/자료구조_cpp/5.Tree/rbt/CFDS1_HW5_RBT.h | /*
[RBT 구현]
< Methods>
1. Insert
2. Delete
3. Traversal
preorder
inorder
postorder
4. Search
5. Successor/Predecessor
6. Balance Tree
7. Print
*/
#pragma once
#include <string>
// node의 색상을 나타내는 열거형 (빨간색 또는 검은색)
enum Color {
COLOR_BLACK,
COLOR_RED
};
// RBT (Red-Black Tree) 클래스를 정의합니다.
class RBT {
... | ALGO | 0.997677 | 5.837546 | {
"github_metadata": {
"branch": "main",
"commit_count": 70,
"repo_created_at": "2023-08-07T09:19:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8b47c166f70... |
56d8fcfd-d49a-4ccf-97b1-c3104174be44 | VanshDubey101963/DSA-SSB-ALGOLUTION | set-2/palindrome.cpp | #include <iostream>
using namespace std;
bool isAlphanumeric(char c) {
return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9');
}
char toLower(char c) {
if (c >= 'A' && c <= 'Z') {
return c + ('a' - 'A');
}
return c;
}
bool isPalindrome(string str) {
int left = 0... | ALGO | 0.997086 | 4.941223 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-10-19T10:07: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": "0d354c81007b... |
9d12c16f-c3e4-4218-b867-93eed8bf0693 | mnladish/lab07 | getPosInt.cpp | /******************************************************
** Program Name: Circle List
** Author: <NAME>
** Date: 5/21/17
** Description: This program is a circular doubly linked
** list. It is a FIFO (first in first out), so the first
** node added will be removed first. It adds new nodes
** to the back, prints the firs... | TOOL | 0.965827 | 4.931744 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2017-05-27T12:13: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": "15b619ebfa... |
b789206d-4b1d-4cc6-8541-3be9d67f9119 | FishWoWater/ARCSim-For-SMPL | v0.2.1/hylc/materials/SplineMaterial.cpp | #include "SplineMaterial.hpp"
#include <memory>
#include <vector>
using namespace hylc;
// using namespace fitpackpp;
// NOTE: various debugging definitions for playing with energy model
// #define BENDBARRIER
// #define BENDPOWER 1e0 // 1e3 too stiff, 1e2 also died with limit 400
// #define BENDLIMIT 200
// #define ... | ALGO | 0.97452 | 5.868164 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2022-04-25T11:57:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 18,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c716714e... |
445e26ee-bb59-4985-91cf-5bb48ebfdf67 | kthohr/optim | include/unconstrained/cg.hpp | /*################################################################################
##
## Copyright (C) 2016-2023 <NAME>
##
## This file is part of the OptimLib C++ library.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with ... | ALGO | 0.999638 | 6.749451 | {
"github_metadata": {
"branch": "master",
"commit_count": 307,
"repo_created_at": "2017-06-14T01:31:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 860,
"forks": 140,
"issues": 7,
"pull_requests": 4
},
"file_meta": {
"content_id": "52cb... |
bc824602-7558-41e9-beea-b3331587fb6b | PoojaVishwakarma0402/Leetcode-POTD | 14-12-23_Difference_Between_Ones_and_Zeros_in_Row_and_Column.cpp |
// Author : <NAME>
// Date : 14/12/2023
// Problem : Difference Between Ones and Zeros in Row and Column
// Difficulty : Medium
// Problem Link : https://leetcode.com/problems/difference-between-ones-and-zeros-in-row-and-column/description/
class Solution {
public:
vector<vector<int>> onesMinusZeros(vector<vec... | ALGO | 0.999915 | 6.22128 | {
"github_metadata": {
"branch": "main",
"commit_count": 27,
"repo_created_at": "2023-11-23T18:21: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": "4cbb96f1a35... |
edff5c29-491d-43c9-b8e2-ff24404b76f3 | Kushal997-das/SkillShow | Beginner Level 📁/Maximum Swap/solution.cpp | #include <iostream>
#include <string>
#include <vector>
#include <algorithm> // For the swap function
using namespace std;
class Solution {
public:
int maximumSwap(int num) {
string str = to_string(num);
vector<int> last(10, -1);
// Record the last occurrence of each digit
... | ALGO | 0.999979 | 6.443554 | {
"github_metadata": {
"branch": "main",
"commit_count": 117,
"repo_created_at": "2024-10-07T08:54:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 24,
"forks": 33,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "f68915ba... |
13c0cd46-b6ba-412a-851f-5d0ad6561e37 | Jatin-Shihora/LeetCode-Solutions | 0980-unique-paths-iii/0980-unique-paths-iii.cpp | class Solution {
public:
int x, y, xLen, yLen, totalZeros = 0, res = 0, cell;
void dfs(vector<vector<int>>& grid, int x, int y) {
// exit condition: out of bonds
if (x < 0 || y < 0 || x == xLen || y == yLen) return;
cell = grid[y][x];
if (cell) {
// increasing res if ... | ALGO | 0.99978 | 5.834781 | {
"github_metadata": {
"branch": "main",
"commit_count": 3066,
"repo_created_at": "2021-12-14T12:46:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 97,
"forks": 26,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9d3e5c4... |
70fb02f8-b6d7-4359-991c-c3c3322da450 | TruongThiAnHai/Object-oriented-programming-OOP- | Project3/Project3/Prog3_1.cpp | #include <iostream>
#include <vector>
#include <windows.h>
#include "Vector_1.h"
using namespace std;
using namespace Prog3_1;
int main()
{
Vector vt;
cout << "1. Input vector vt:" << endl;
vt.input();
cout << "\nVector vt: ";
vt.output();
cout << "\n\n2. Find max element in the vector vt:" << endl;
cout << "M... | ALGO | 0.987573 | 3.286577 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2020-12-05T10:12:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "081b305def0... |
c5e8715e-22ba-45a4-86da-fd46a9507dbe | hsunchiu/cpp-primer | chapter12/ex/12.23.1.cpp | /*
Exercise 12.23: Write a program to concatenate two string literals, putting
the result in a dynamically allocated array of char. Write a program to
concatenate two library strings that have the same value as the literals
used in the first program.
*/
#include <iostream>
#include <string>
using namespace s... | TOOL | 0.948226 | 3.296634 | {
"github_metadata": {
"branch": "master",
"commit_count": 73,
"repo_created_at": "2017-12-05T17:02: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": "2b9c10d15... |
3e2a981e-8dba-4199-8776-66fb0fc4c9b3 | c8ef/Bustub | src/execution/sort_executor.cpp | #include "execution/executors/sort_executor.h"
namespace bustub {
SortExecutor::SortExecutor(ExecutorContext *exec_ctx, const SortPlanNode *plan,
std::unique_ptr<AbstractExecutor> &&child_executor)
: AbstractExecutor(exec_ctx), plan_(plan), child_executor_(std::move(child_executor)) {}
... | ALGO | 0.997298 | 6.691919 | {
"github_metadata": {
"branch": "master",
"commit_count": 374,
"repo_created_at": "2023-01-18T09:08: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": "61f822bf... |
7b53bb93-60c9-4ce1-ba07-56f7a327ae49 | justtreee/Practice_of_Algorithm | ACM/网络赛/baidu/1003.cpp | #include <cstdio>
#include <cmath>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <cstdlib>
using namespace std;
#define M 1000
int main()
{
int t,n,m,A[M],B[M],C[M],D[M],a[M],b[M],c[M],d[M];
int aa[M],ab[M],ac[M],ad[M];
int ans[50];
scanf("%d",&t);
int cas=1;
while(t--)
... | ALGO | 0.999175 | 3.581 | {
"github_metadata": {
"branch": "master",
"commit_count": 129,
"repo_created_at": "2016-11-30T07:30: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": "54e04ca0... |
2dcf4e64-cb95-42b8-a7f9-22e6e77a071d | hanjaek/Algorithm | 백준/Silver/11279. 최대 힙/최대 힙.cc | #include <iostream>
#include <vector>
using namespace std;
class MaxHeap {
private:
vector<int> heap;
void heapUp(int index){
while (index > 0 && heap[parent(index)] < heap[index]){
swap(heap[parent(index)], heap[index]);
index = parent(index);
... | ALGO | 0.999961 | 4.539245 | {
"github_metadata": {
"branch": "main",
"commit_count": 146,
"repo_created_at": "2025-04-11T07:25: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": "a627f0fd5c... |
0c59b1a9-b044-49f8-9728-5b65772402ef | PacktPublishing/OpenCV3-Computer-Vision-Application-Programming-Cookbook-Third-Edition | Chapter14/trainSVM.cpp | /*------------------------------------------------------------------------------------------*\
This file contains material supporting chapter 13 of the book:
OpenCV3 Computer Vision Application Programming Cookbook
Third Edition
by <NAME>, Packt Publishing, 2016.
This program is free software; permission is hereby gra... | ALGO | 0.948998 | 6.226828 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2017-02-06T10:42:01.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 213,
"forks": 121,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "3ea0be... |
83b2b49a-be4d-4eb2-84d4-fb8f5ef91093 | dirocco/AudioAnecdotes | Content/05SignalProcessing/3Luna/lib/BaseBandDemodulate.cpp | ////////////////////////////////////////////////////////////////////////////////
//
// BaseBandDemodulate.cpp
//
// BaseBand demodulate incoming baseband digital signal (r(t)) samples
// by application of a matched filter; in this case a root raised
// cosine pulse. r(t) is treated as a one bit signal(k=1) sampled N
/... | ALGO | 0.996732 | 6.601446 | {
"github_metadata": {
"branch": "master",
"commit_count": 607,
"repo_created_at": "2010-05-27T06:05:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 3,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "e09f47cf... |
fc52d473-f6bb-4be1-806b-3ce9b6e8dbec | supreethkurpad/Tailbench | tailbench/moses/mert/TER/tercalc.cpp | //
// C++ Implementation: tercalc
//
// Description:
//
//
// Author: <>, (C) 2010
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "tercalc.h"
using namespace std;
using namespace Tools;
namespace TERCpp
{
terCalc::terCalc()
{
MAX_SHIFT_SIZE = 50;
INF = 999999.0;
shift_cost = ... | ALGO | 0.999027 | 3.034166 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2021-09-06T09:58:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 17,
"forks": 8,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "be40b7f120... |
24d9f5bd-cc8a-4494-b5a8-1cf513c51385 | sunway513/leetcode | 2sum/main.cpp | class Solution {
public:
vector<int> twoSum(vector<int> &numbers, int target) {
//solution: loop from the first element, substracted from the target,
//then compare the differene to the rest of the array. If find a match,
//return the result, if not, continue the looping.
//exception... | ALGO | 0.999922 | 5.643209 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2015-02-21T18:51:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "03c528136e... |
d4483861-2867-4d02-96f5-c0dd7ac554a8 | Errichto/youtube | AOC-2024/17.cpp | #include <bits/stdc++.h>
using namespace std;
long long A, B, C;
// opcode = 0..7
// operand (input) follows
long long combo(int x) {
if (x <= 3) {
return x;
}
if (x == 4) return A;
if (x == 5) return B;
if (x == 6) return C;
assert(false);
}
int i = 0; // instruction pointer
// 2,4 -- B=A%8
// 1,3 -- B^=... | ALGO | 0.999529 | 3.364145 | {
"github_metadata": {
"branch": "master",
"commit_count": 88,
"repo_created_at": "2019-02-03T13:25:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2725,
"forks": 523,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "ae84... |
6df09c7f-ab6d-463e-8440-bfb5bf489304 | Collinnn/Intro-rendering | raytrace/Phong.cpp | // 02562 Rendering Framework
// Written by <NAME>, 2011
// Copyright (c) DTU Informatics 2011
#include <optix_world.h>
#include "HitInfo.h"
#include "Phong.h"
using namespace optix;
#ifndef M_1_PIf
#define M_1_PIf 0.31830988618379067154
#endif
#ifndef M_1_PIf2
#define M_1_PIf2 0.1591549431
#endif
float3 Phong::sha... | ALGO | 0.929875 | 6.210441 | {
"github_metadata": {
"branch": "main",
"commit_count": 36,
"repo_created_at": "2022-08-31T11:01: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": "f52e3d70b57... |
c4c46e71-2819-46b8-bd79-66bd9125e8b2 | c3sr/tcu_scope | third_party/cutlass/cutlass/gemm/block_task_wmma.h | /******************************************************************************
* Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistribution... | TOOL | 0.980784 | 7.835296 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2019-06-24T18:37:36.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 51,
"forks": 11,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "66bdf6d8c... |
3c86a1dd-31a3-4674-bdd9-39638aa4e40b | shashank21j/CompetitiveProgramming | Codeforces/508a.cpp | #include<bits/stdc++.h>
using namespace std;
int main () {
int n,m,k;
int a,b;
int flag = 0;
cin>>n>>m>>k;
int matrix[n][m];
for (int i=0;i<n;i++) {
for (int j=0;j<m;j++) {
matrix[i][j] = 0;
}
}
for (int i=0;i<k;i++) {
cin>>a>>b;
a--;
b--;
matrix[a][b] = 1;
if (((a>0 && matrix[a-1][b] == ... | ALGO | 0.999994 | 3.295872 | {
"github_metadata": {
"branch": "master",
"commit_count": 104,
"repo_created_at": "2013-11-10T20:14:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a10962b3... |
a01e8bb2-5c4d-4d04-bfc6-db741851e598 | SajibTalukder2k16/Lightoj_UVA | Lightoj_1234.cpp | #include<bits/stdc++.h>
using namespace std;
#define fastread ios_base::sync_with_stdio(false);cin.tie(NULL);
#define fileRead freopen("input.txt","r",stdin);
#define fileWrite freopen("output.txt","w",stdout);
#define lightoj_test_case_loop(test) for(int cs=1;cs<=test;cs++)
#define lightoj_output cout<<"Case "<<cs... | ALGO | 0.99518 | 3.46475 | {
"github_metadata": {
"branch": "master",
"commit_count": 109,
"repo_created_at": "2019-11-22T20:49: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": "478b07e5... |
66f0f552-d4fd-4ee1-b0f5-6f4aac5cf0dc | henryleikun/MyLinux_rep | thread/thread_2/mythread.cpp | #include <iostream>
#include <pthread.h>
#include <string>
#include <cstdio>
#include <vector>
#include <unistd.h>
#include <cstdlib>
#include <string.h>
#include "mythread.hpp"
using namespace std;
#define NUM 4
int tickets = 1000;
pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
string toHex(pthread_t tid){
c... | TOOL | 0.943816 | 4.130435 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2024-03-31T04:09: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": "000c5986755... |
ae8c203e-1052-42d7-a6ec-951c0be78cb8 | ishandutta2007/codeforces-i | ivan100sic/normal/986/C.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
const int MAXN = 1 << 22;
int n, m;
int a[MAXN];
bool ima[MAXN], vis[3*MAXN];
void dfs(int x) {
if (x < MAXN && !ima[x])
return;
if (vis[x])
return;
vis[x] = 1;
if (x < MAXN) {
dfs(x+... | ALGO | 0.999841 | 3.923781 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T05:39: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": "b7a42eae1290... |
0c4e1221-5c60-4c57-9b30-9be5f23d26ae | ishitarakchhit/Data-Structures-Code-Help | 14. Binary Search Trees/Homework/FlattenBSTtoSortedLL.cpp | #include<iostream>
#include<queue>
#include<limits>
using namespace std;
class Node{
public:
int data;
Node* left;
Node* right;
Node(int data){
this->data = data;
this->left = NULL;
this->right = NULL;
}
};
//function to create BST
Node* createBST(Node* root, int data)... | ALGO | 0.999994 | 5.180493 | {
"github_metadata": {
"branch": "main",
"commit_count": 181,
"repo_created_at": "2023-02-11T08:51:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "02c6b3b284... |
725aca28-0dc5-4798-96c9-6ed77921fcce | ZhangwenguangHikvision/YoloV5_JDE_TensorRT_for_Track | track/src/matching/tracker.cpp | #include "tracker.h"
#include "nn_matching.h"
#include "../feature/model.h"
#include "linear_assignment.h"
using namespace std;
tracker::tracker(/*NearNeighborDisMetric *metric,*/
float max_cosine_distance, int nn_budget,
float max_iou_distance, int max_age, int n_init )
{
this->metric = new NearNeighborDisM... | ALGO | 0.999273 | 5.867418 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2021-04-07T06:33:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 54,
"forks": 16,
"issues": 5,
"pull_requests": 0
},
"file_meta": {
"content_id": "4f07895e9... |
79f567e1-ce59-41c3-b4d5-f9ed89423fb5 | DannxC/C-Labs | Labs/Lab_5_ces10_2021/Lab_5a/Lab5a_Daniel_Araujo_Cavassani.cpp | #include <stdio.h>
#include <stdlib.h>
/* Cabeçalho, declarações e digitação do número de cadeias */
int main()
{ //Início da função main
char carac, lixo; int estado, i, n;
printf("I D E N T I F I C A C A O D E C O M E N T A R I O S D A L I N G U A G E M C");
printf("\n\nNumero de... | ALGO | 0.993385 | 3.064133 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-06-28T03:56: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": "7c3861904ae6... |
30483284-ca3c-4eed-8571-152e2e1e25e0 | Sanyam-1/Cpp | 1/lab3.cpp | #include<iostream>
#include<stdlib.h>
class queue{
int *data;
int capacity,size;
int front,rear;
public:
queue(int s){
this->capacity=s;
data = new int[capacity];
size=0;
front=-1;
rear=0;
}
bool Empty(){
return size==0;
}
int enqueue()... | ALGO | 0.981068 | 3.623216 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-12-01T15:59: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": "1ac16364fd... |
b83951c1-da6f-4391-8cf9-dd9c54e99f43 | BlackHungry/CGALForUE4.19 | ThirdParty/CGAL/includes/CGAL/Scale_space_reconstruction_3/Jet_smoother.h | // Copyright (c) 2017 GeometryFactory Sarl (France).
//
//This program is free software: you can redistribute it and/or modify
//it 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.
//
//This progra... | ALGO | 0.938017 | 7.017351 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2018-04-23T05:40:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "94cde827a... |
35600a0f-5de9-4c24-ba82-26120477544e | DigitalGlobe/tools | src/OSSIM/oms/coms/src/oms/GeodeticEvaluator.cpp | #include <oms/GeodeticEvaluator.h>
#include <ossim/elevation/ossimElevManager.h>
#include <ossim/base/ossimGeodeticEvaluator.h>
class oms::GeodeticEvaluator::PrivateData
{
public:
virtual ~PrivateData()
{
}
};
oms::GeodeticEvaluator::GeodeticEvaluator()
:thePrivateData(new PrivateData())
{
}
oms::Geodeti... | ALGO | 0.988675 | 6.247182 | {
"github_metadata": {
"branch": "master",
"commit_count": 231,
"repo_created_at": "2016-06-21T16:47:06.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5,
"forks": 13,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "04d69f7b... |
02d7642b-cb91-4b11-8271-95e52f5d9713 | ZuoQing63/NiuKe101 | 01List/013判断一个链表是否为回文结构.cpp | #include <bits/stdc++.h>
using namespace std;
struct ListNode
{
int val;
struct ListNode *next;
ListNode(int x) : val(x), next(nullptr) {}
};
//数组法
class Solution1 {
public:
/**
* 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
*
*
* @param head ListNode类 the head
* @return bool布尔型
... | ALGO | 0.999942 | 5.18003 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-08-06T06:41: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": "a2cabd186356... |
87c2a906-222c-4b40-b1a3-0548d9537223 | 1ambd4/OJ-record | leetcode/0491.non_decreasing_subsequences.cpp | #include <iostream>
#include <vector>
#include <cstdio>
#include <unordered_set>
std::vector<std::vector<int>> find_subsequence(std::vector<int>& nums)
{
std::vector<std::vector<int>> res;
std::vector<int> track;
int n = nums.size();
auto backtracking = [&res, &track, &nums, n](auto&& self, int k) -> ... | ALGO | 0.999878 | 5.337627 | {
"github_metadata": {
"branch": "master",
"commit_count": 453,
"repo_created_at": "2018-02-13T10:47: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": "d0dad93b... |
337ccd2b-2b04-4835-b146-4ab0b85ce881 | iwilkey/kattis | methodicmultiplication/main.cpp | // @author <NAME> (iwilkey)
#include <iostream>
#include <string>
#include <bitset>
#include <bits/stdc++.h>
#include <algorithm>
#include <math.h>
#include <vector>
using namespace std;
#define _USE_MATH_DEFINES
template <typename T>
void log(string tag, T obj) {
cout << tag << ": " << obj << endl;
}
void s... | ALGO | 0.999057 | 3.838891 | {
"github_metadata": {
"branch": "master",
"commit_count": 121,
"repo_created_at": "2022-01-13T03:38:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cf45e345... |
e2808801-aad0-4474-a490-447cf1d906c8 | jetkov/quiksort-3000 | Test Files/TestCoinsToDispense-Nathan2.cpp | #include <iostream>
using namespace std;
int checkCoin(int & change, int & cCoin)
{
int nCoin = 0;
while ((change - cCoin) >= 0)
{
change -= cCoin;
nCoin++;
}
return nCoin;
}
int doubleCheck(int & change, int & cCoin)
{
int nCoin = 0;
do
{
change -= cCoin;
nCoin++;
}while ((change - cCoin) >=... | TOOL | 0.912067 | 3.786702 | {
"github_metadata": {
"branch": "master",
"commit_count": 28,
"repo_created_at": "2017-11-17T14:35: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": "ef1ad9730... |
1e36c094-e37e-4046-93a4-3c5b998f0d7f | ishandutta2007/codeforces-n | namnamseo/normal/850/A.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pp;
typedef pair<ll,ll> pll;
void cppio(){ ios_base::sync_with_stdio(0); cin.tie(0); }
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define eb emplace_back
#define x first
#define y second
#define rep(i,n) for(int i =... | ALGO | 0.999834 | 3.600613 | {
"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": "6f3261ad0259... |
5697c1a6-fa83-4ae0-8f1a-46bc25395407 | NooobQ/advent2021 | day13/day13.cpp | #include<unordered_set>
#include<set>
#include<unordered_map>
#include<iostream>
#include<algorithm>
#include<vector>
#include<sstream>
#include<string>
#include<cstring>
#include<map>
#include<queue>
#include<stack>
#include<cstdio>
#include<ctype.h>
using namespace std;
auto cmp = [](const pair<int, int> &lhs, const... | ALGO | 0.999805 | 3.987788 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2022-01-20T13:14: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": "abeaae683... |
2f840e86-aafb-414b-a497-24d16804e19e | OAID/Tengine | demos/utilities/distance.cc | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | ALGO | 0.924259 | 6.229767 | {
"github_metadata": {
"branch": "tengine-lite",
"commit_count": 695,
"repo_created_at": "2017-12-30T01:21:41.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4478,
"forks": 976,
"issues": 243,
"pull_requests": 3
},
"file_meta": {
"content_id... |
9359dacf-2fed-406c-bde9-dc7a4e3e40f8 | anasansari01/DSA | Set/Find Elements in a Contaminated Binary Tree.cpp | /**
* 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) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.999063 | 6.128557 | {
"github_metadata": {
"branch": "main",
"commit_count": 115,
"repo_created_at": "2025-02-11T15:55:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e0f83d1aae... |
31bfa55a-2d2d-4094-8e29-9a1f0a359e1f | mphilippov-omp/FlightTest | main.cpp | #include <iostream>
#include <regex>
#include <string>
#include <utility>
#include <cstdlib>
#define FLIGHT_LENGTH_THRESHOLD 7
#define FLIGHT_ID_LENGTH_THRESHOLD 5
using namespace std;
std::string ltrim(const std::string &s)
{
return std::regex_replace(s, std::regex("^\\s+"), std::string(""));
}
std::string rtr... | ALGO | 0.991388 | 4.968594 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-06-05T03:35: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": "8a1d3a9aec08... |
6ce8cc11-a3a7-4a9a-9a0c-61c1144827f4 | codedazzlers/DSA-Bootcamps | Jai Juneja/string_questions/find_substring_pos.cpp | #include <iostream>
using namespace std;
int main() {
string str, substr;
cout << "Give string: ";
getline(cin, str);
cout << "Give substring that you want to look for: ";
getline(cin, substr);
int lenStr = 0, lenSubstr = 0;
for (; str[lenStr] != '\0'; lenStr++);
for (; substr[lenSubs... | ALGO | 0.987034 | 4.914849 | {
"github_metadata": {
"branch": "main",
"commit_count": 273,
"repo_created_at": "2021-09-20T13:18:44.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 13,
"forks": 58,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "d4f20b7db... |
f170b0a7-6af7-4f9d-acf0-febfa1dbb8b2 | yyu/projecteuler | 0002.cc | // http://projecteuler.net/problem=2
//
// Each new term in the Fibonacci sequence is generated by adding the previous
// two terms. By starting with 1 and 2, the first 10 terms will be:
// 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...
// By considering the terms in the Fibonacci sequence whose values do not exceed
//... | ALGO | 0.999445 | 5.404442 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2019-03-29T16:45: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": "9419272c8... |
48dc2c23-4315-45f4-8949-778ae96d61d6 | heyuhhh/ACM | contests/2018GCPC/attackonalphazet/submissions/accepted/mazerunner_gregors.cpp | #include <iostream>
#include <vector>
#include <cstring>
#include <limits>
using namespace std;
const int MAX_N = 1e6;
string maze[1001];
vector<int> g[MAX_N];
int depth[MAX_N];
int eulerdepth[2 * MAX_N];
int eulervisit[MAX_N];
void addEdge(int a, int b)
{
g[a].push_back(b);
g[b].push_back(a);
}
void computeRanks(... | ALGO | 0.999981 | 3.889578 | {
"github_metadata": {
"branch": "master",
"commit_count": 693,
"repo_created_at": "2019-11-25T06:31:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8b7a4322... |
b6df31d4-04d7-43de-825a-fe9ef122ceff | manwar/perlweeklychallenge-club | challenge-046/ulrich-rieke/cpp/ch-1.cpp | #include <vector>
#include <algorithm>
#include <string>
#include <utility>
#include <map>
#include <iostream>
std::string decode ( const std::vector<std::string> & encoded ) {
int len = encoded[0].length( ) ;
std::string decoded ;
for ( int i = 0 ; i < len ; i++ ) {
std::map<std::string, int> frequencies ... | ALGO | 0.999695 | 3.899713 | {
"github_metadata": {
"branch": "master",
"commit_count": 44412,
"repo_created_at": "2019-03-30T01:15:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 194,
"forks": 332,
"issues": 5,
"pull_requests": 4
},
"file_meta": {
"content_id": "fe... |
d8e32c03-a9e6-431e-82ed-853df1513824 | giapt2k29/Algorythms_C- | ProblemLAB0101.cpp | #include<bits/stdc++.h>
using namespace std;
string s, Number1, Number2, Day, Time1, Time2;
int Count, Total = 0;
bool check = true;
vector<pair<string, string>> V;
vector<string> V2[87000];
int main() {
freopen("test.inp", "r", stdin);
freopen("test.out", "w", stdout);
ios_base::sync_with_stdio(false);
... | ALGO | 0.986194 | 3.551672 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-08-22T06:13:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1f33e05c0d3a... |
5231b4e4-d1cf-4bf1-a47f-90d7e02d1c51 | Gnaroshi/practice-algorithm-solvedac | With_Levels/Bronze/Bronze_1/11665.cpp | // problem: 직육면체 교집합
// id: 11665
// time taken:
#include <bits/stdc++.h>
using namespace std;
int main(void)
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n, tx1, ty1, tz1, tx2, ty2, tz2;
int x1, y1, z1, x2, y2, z2;
x1 = y1 = z1 = 0;
x2 = y2 = z2 = 1000;
cin >> n;
for (int i = ... | ALGO | 0.999068 | 4.088935 | {
"github_metadata": {
"branch": "main",
"commit_count": 476,
"repo_created_at": "2024-03-13T08:59: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": "9d5130665a... |
cde031e3-bf73-4843-82f2-c9b32bc9e5e1 | cicimagicai/LeetCode | Fighting/LC276.cpp | /*
276. Paint Fence
There is a fence with n posts, each post can be painted with one of the k colors.
You have to paint all the posts such that no more than two adjacent fence posts have the same color.
Return the total number of ways you can paint the fence.
Note:
n and k are non-negative integers.
*/
#include<ios... | ALGO | 0.999994 | 5.386276 | {
"github_metadata": {
"branch": "master",
"commit_count": 178,
"repo_created_at": "2017-01-02T14:48: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": "81abf8b5... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.