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
adc24a9d-35f3-400e-b10f-30ec6acf341f
ishandutta2007/codeforces-t
teja349/normal/955/B.cpp
//teja349 #include <bits/stdc++.h> #include <vector> #include <set> #include <map> #include <string> #include <cstdio> #include <cstdlib> #include <climits> #include <utility> #include <algorithm> #include <cmath> #include <queue> #include <stack> #include <iomanip> //setbase - cout << setbase (16); cout << 100 << end...
ALGO
0.999993
3.293336
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:27: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": "7e475c355a3c...
f94613c9-da2f-4988-943e-7de976a59a42
GokceSoylu/cryptology
hw1.cpp
#include <iostream> #include <string> #include <algorithm> using namespace std; class Crypto { public: virtual string encrypt(const string &text, const string &key) = 0; virtual string decrypt(const string &text, const string &key) = 0; }; class ReverseCipher : public Crypto { public: string encrypt(const...
ALGO
0.999064
5.739665
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2025-03-04T22:22: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": "1cb30a00ac6...
a17556fd-ce2a-40c2-9780-58b512c77aa6
Devojoytip/LeetCode-Practice
Friends Pairing Problem - GFG/friends-pairing-problem.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends const int mod = 1e9+7; class Solution { public: long long int f(int n, vector<long long int> &dp) { if(n==0) return dp[n]=0; if(n==1) return dp[n]=1; if(n==2) return dp[n]=2...
ALGO
0.999972
5.710135
{ "github_metadata": { "branch": "main", "commit_count": 1043, "repo_created_at": "2023-02-08T10:55: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": "65b2adc12...
616d40eb-e262-4354-8610-4977a0f7be07
NVIDIA-RTX/Streamline_Sample
donut/nvrhi/src/common/sparse-bitset.cpp
/* * Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy...
ALGO
0.914304
7.23515
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2022-03-09T23:36:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 24, "forks": 16, "issues": 7, "pull_requests": 1 }, "file_meta": { "content_id": "d991553b7d...
9560d6da-28ad-47cf-a994-b9625517aae2
Andwerpz/Competitive-Programming-Practice
- cpp -/longlegs.cpp
#include <bits/stdc++.h> typedef long long ll; typedef long double ld; using namespace std; //Codeforces - 1814B //lets say that the maximum length your legs are going to ever be is x. //you can compute the minimum amount of steps to travel to (a, b) in constant time given x. //then, just brute force all values of...
ALGO
0.999927
4.449364
{ "github_metadata": { "branch": "main", "commit_count": 339, "repo_created_at": "2021-02-26T19:38:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a874dc8cfd...
ac8ef7aa-d09f-415a-9d0d-1904cb42a5de
plumzero/querecord
16_DataStruct/08_Graph/m/mgraph.h
// 仅作测试用,不考虑输入异常情况 // 邻接矩阵实现 // 无向图 #include <stdio.h> #include <stdarg.h> #include <vector> #include <algorithm> typedef struct VNode { int val; } VNode; typedef struct MGraph { std::vector<VNode*> vertex; // 顶点信息 std::vector<std::vector<int>> arc; // 顶点之间的关系。无向图中,若顶点与顶点之间有关联,则为 1,否则为 0 } MG...
ALGO
0.998498
4.763408
{ "github_metadata": { "branch": "master", "commit_count": 729, "repo_created_at": "2019-12-29T01:12: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": "69558e85...
f3a316a0-5c79-4ded-aed0-b79ddbb23a84
delta4d/AlgoSolution
codeforces/190/1/D.cpp
#include <cmath> #include <cstdio> #include <algorithm> using namespace std; const int MAXN = 34; int n, m; int f[MAXN][MAXN], s[MAXN][MAXN]; int gao(int j) { s[m][m+1+j] = s[m][j] * s[m][m]; int tot = s[m][j] * f[m][j] + s[m][m+1+j] * f[m][m+1+j]; for (int i=0; i<m; ++i) { int x = f[i][j] + s[i][m] * f[i][m+j+...
ALGO
0.999989
3.469606
{ "github_metadata": { "branch": "master", "commit_count": 154, "repo_created_at": "2013-02-15T16:09:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "656cc203...
968a4191-a6ee-45fb-957a-e65eddce71cd
sohamsil44/MAR-Activities
PrimeNoFast.cpp
/* #MAR #MAKAUT #Coding_solution The sieve of Eratosthenes is one of the most efficient ways to find all primes smaller than but when the value of n is very large following is applied. Segmented Sieve The idea of segmented sieve is to divide the range [0..n-1] in different segments and compute primes in all segments on...
ALGO
0.999987
5.294329
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-06-18T17:13: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": "2c28f7b02c...
8ec7bd01-57b5-4ac2-82c3-529bb6526b12
sion-k/Algorithm
baekjoon/09007/main.cpp
#include <bits/stdc++.h> using namespace std; int k, n; int s[4][1000]; const int INF = 987654321; int main() { cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0); int tc; cin >> tc; while (tc--) { cin >> k >> n; for (int i = 0; i < 4; i++) { for (int j = 0; j <...
ALGO
0.999984
4.237819
{ "github_metadata": { "branch": "master", "commit_count": 1174, "repo_created_at": "2020-09-18T09:54: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": "2e436fb...
bd91d438-b3e9-40ed-8cb8-fafbcdd7be65
ishandutta2007/codeforces-s
smax/normal/1342/B.cpp
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #define DEBUG(...) debug(#__VA_ARGS__, __VA_ARGS__); #else #define DEBUG(...) #endif template<typename T, typename S> ostream& operator << (ostream &os, const pair<T, S> &p) {return os << "(" << p.first << ", " << p.second << ")";} template<typename C, typena...
ALGO
0.999964
3.780504
{ "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": "19b3e27d36e5...
336a04f3-f363-434d-8c20-70e33908c0f6
btjanaka/algorithm-problems
kattis/treehouses.cpp
// Author: btjanaka (<NAME>) // Problem: (Kattis) treehouses // Title: Treehouses // Link: https://open.kattis.com/problems/treehouses // Idea: Kruskal's algorithm, but start by joining the e treehouses that are // connected by open land, as well as the p pairs of treehouses that are already // connected. // Difficulty...
ALGO
0.999947
4.872627
{ "github_metadata": { "branch": "master", "commit_count": 419, "repo_created_at": "2019-02-08T09:56:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e9c7b4c2...
4e4ceed0-1e02-444b-a5c9-5a03bcdf6c4c
amoybarrett/basecall
crosstalk.cpp
/* * @kangkang,subtile(block)(median) */ #include "crosstalk.h" using namespace std; double crosstalk::getArray(double* m, vector<double> v){ for(long long b = 0; b < v.size(); b++){ m[b] = v[b]; } } void crosstalk::linearFi...
ALGO
0.999112
3.961583
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-10-09T10:47:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9778592ebf...
a0887a82-1d25-453c-bc14-a23124db3b4f
Santoi/quantum-chess
src/server/quantum_chess/chessman/king.cpp
#include <vector> #include <utility> #include <list> #include <string> #include "king.h" #include "tower.h" #include <algorithm> #include "../../../common/chess_exception.h" King::King(const Position &position, bool white_, Board &board_, EntanglementLog &entanglement_log_) : Chessman(position, white_, ...
ALGO
0.99334
5.576377
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2021-10-27T02:30:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "99d7bbc86f8...
b04f9197-8b49-4055-a43b-b2503a9e4331
ishandutta2007/codeforces-e
eden_cy/normal/1566/F.cpp
#include<bits/stdc++.h> using namespace std; #define FOR(i,s,t) for(int i=(s),_t=(t); i<=_t; ++i) #define DOR(i,s,t) for(int i=(s),_t=(t); i>=_t; --i) #define EOR(i,x) for(int i=Head[x]; ~i; i=Nxt[i]) typedef double db; typedef long long ll; namespace Eddd { inline char sc() { return getchar(); static const int...
ALGO
0.99992
4.056728
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:34:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "640e161ccd29...
3dc51a69-774c-4bc0-aa75-00f30bd56050
HaikuArchives/Pe
rez/Sources/SymbolTable.cpp
/* $Id$ Copyright 1996, 1997, 1998 <NAME> B.V. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of ...
TOOL
0.965025
3.890188
{ "github_metadata": { "branch": "master", "commit_count": 745, "repo_created_at": "2014-03-18T19:58:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 46, "forks": 29, "issues": 25, "pull_requests": 0 }, "file_meta": { "content_id": "1eb047...
151782ce-ce9a-42f3-9f15-fc42e9264939
JeongYeonUk/Problem
D4/1824.cpp
#pragma warning(disable:4996) #include <iostream> #include <algorithm> #include <string> #include <cstring> using namespace std; string arr[20]; int check[20][20]; int mem; bool flag; const int dx[] = { 1,0,-1,0 }; const int dy[] = { 0,1,0,-1 }; void solve(int y, int x, int dir, int count) { if (flag) return; ...
ALGO
0.999908
4.069208
{ "github_metadata": { "branch": "master", "commit_count": 220, "repo_created_at": "2019-05-25T03:18:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ad9c7e2f...
e8e8bad5-ef22-4c20-a2d1-b1d71613015b
khalil192/cp
awesome ds/binary_index_trees/binary_index_tree_sample.cpp
/* USEFUL comments along with sample usage are yet to be added...... fenwick trees use case : benifits .......... */ #include<iostream> #include<string.h> #include<vector> #include<math.h> #include<queue> #include<stack> #include<algorithm> #include<iterator> #include<map> #include <sstream> #include<set> #define lli...
ALGO
0.999567
3.493249
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2019-03-27T17:39:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "96aa6b8e8...
fbddeaa6-72f0-4535-9158-8c6817a8f900
hustlyhang/leetcodeself
problem/1006.笨阶乘.cpp
/* * @lc app=leetcode.cn id=1006 lang=cpp * * [1006] 笨阶乘 */ // @lc code=start #include <stack> #include <map> using namespace std; class Solution { public: stack<long> nums; stack<char> op; void cl() { long long a = nums.top(); nums.pop(); long long b = nums.top(); n...
ALGO
0.999981
5.542078
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2021-04-14T00:59:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db82ba7e6...
50b6b169-c8ce-4616-9b14-1f8ef8bdf1f9
redpanda-data/redpanda
src/v/cluster/scheduling/constraints.cc
/* * Copyright 2020 <NAME>, Inc. * * Use of this software is governed by the Business Source License * included in the file licenses/BSL.md * * As of the Change Date specified in that file, in accordance with * the Business Source License, use of this software will be governed * by the Apache License, Version 2...
TOOL
0.910966
7.659385
{ "github_metadata": { "branch": "dev", "commit_count": 42575, "repo_created_at": "2020-11-02T22:43:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 10585, "forks": 648, "issues": 690, "pull_requests": 289 }, "file_meta": { "content_id": "...
86727211-ee6d-46ee-be9a-5c50c4a230d2
yurilopes/genetic-optimization
chromosome.h
#pragma once #include <vector> #include <inttypes.h> #include <ctime> #include <random> #include <stdio.h> #include "gene.h" #define MAXFLOATPRINT 999999.f #define MINFLOATPRINT -999999.f extern mt19937 genGA; class Chromosome; //Forward declaration of Chromosome class for FitnessFunction typedef typedef double(*F...
ALGO
0.996082
4.994179
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2017-01-18T17:21:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9a4057dab...
f20fe83d-e10d-4ac8-a29e-7628368ad57e
i212498/Data-Structures
Data Structures/LinkedList.h
#pragma once template <typename T> struct Node { T data; Node* next; }; template <typename T> class LinkedList { private: Node<T>* head; int size; public: LinkedList(); bool isEmpty(); void insertAtTail(T val); void insertAtHead(T val); void insertAtIndex(T val, int index); //starts at 0 int findNode(T va...
ALGO
0.990332
4.57943
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2023-07-15T17:24: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": "1e6b9cf778b...
2f1308fe-95e2-49b9-a7c6-c18d653e337a
metehkaya/Algo-Archive
Problems/LeetCode/Solutions/2115.Find_All_Possible_Recipes_from_Given_Supplies.cpp
class Solution { public: int n; vector<string> words; map<string,int> hashh; void addHash(string& s) { map<string,int>::iterator it = hashh.find(s); if(it == hashh.end()) { hashh[s] = n++; words.push_back(s); } } vector<string> findAllRecipes(vecto...
ALGO
0.999813
5.547183
{ "github_metadata": { "branch": "main", "commit_count": 78, "repo_created_at": "2023-04-04T19: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": "824d94423f6...
2df6f6aa-a9f6-481b-93ae-c7c3bebc9331
juarezpaulino/coderemite
problemsets/Codeforces/C++/C899.cpp
/** * * Author: <NAME>(coderemite) * Email: <EMAIL> * */ #define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; #define eb emplace_back #define mp make_pair #define fi first #define se second #define sz(v) ((int) (v).size()) #define all(v) (v).begin(), (v).end() #define sqr(x) ((x)*(x)) typede...
ALGO
0.999868
3.385138
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2020-12-12T21:51: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": "faced85937f6...
32cf171e-332c-45a9-a36f-66dfd284410c
SeiperLu/Nauka
8/8,13.cpp
#include<iostream> template<typename Any> void Swap(Any &a, Any &b); struct job { char name[40]; double salary; int floor; }; template <> void Swap<job>(job &j1, job &j2); void show(job &j); int main() { using namespace std; cout.precision(2); cout.setf(ios::fixed, ios::floatfield); ...
ALGO
0.965099
4.421351
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2021-03-01T13:36: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": "b23236f8cf...
b0b75fb4-c6d0-4f6c-b435-ccab40b61583
PreetMax85/CG-Practical-Code
dda_atharva.cpp
#include<iostream> #include<GL/glut.h> using namespace std; int xa, ya, xb, yb, lineType; int Round(float a) { return (int)(a+0.5); } void ddaLine(int xa, int ya, int xb, int yb, int lineType) { int dx, dy, steps; dx = xb - xa; dy = yb - ya; if(abs(dx) > abs(dy)) steps = abs(dx); else steps =...
ALGO
0.97136
4.903441
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-04-29T18:41:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bb74678ec72f...
e337de15-95f4-4a75-8341-d51426af93a1
ishandutta2007/codeforces-a
amshz/normal/276/E.cpp
# include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair <int, int> pii; typedef pair <ll, ll> pll; typedef pair < pair <int, int> , int> ppi; # define F first # define S second # define endl '\n' # define sep ' ' # define pb push_back # define fast_io ios::sync_wi...
ALGO
0.999366
4.277358
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "14070fa64ee7...
bcd09ad2-fa01-4011-855a-74c7dd438a71
mold9580/DSA
SortedMatrix.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: vector<vector<int>> sortedMatrix(int n, vector<vector<int>> m) { //Create an auxaliry array of n*n size, copy all elements of matrix to array, sort the array, Copy all the element back to matrix vector<int> v; for(a...
ALGO
0.999903
5.330058
{ "github_metadata": { "branch": "master", "commit_count": 108, "repo_created_at": "2021-08-03T21:07:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e28a7d42...
68f5b8ae-4631-4d6e-86bd-4a12ba843450
ishandutta2007/codeforces-n
nqiiii/normal/512/D.cpp
#include <bits/stdc++.h> using namespace std; const int maxN = 100, mod = 1000000009; int Add(int x, int y) { x += y; return x < mod ? x : x - mod; } int Dec(int x, int y) { x -= y; return x < 0 ? x + mod : x; } int Mul(int x, int y) { return 1ll * x * y % mod; } int inv[maxN + 10], fac[maxN + 10], invFac...
ALGO
0.99992
3.922697
{ "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": "e53a5a192326...
32d587bf-fe98-4e2c-aae1-6225e811195a
mahirshahriar1/Competitive_Programming
Algo Vault/Hashing/poly_hash.cpp
#include <bits/stdc++.h> using namespace std; constexpr int PR[] = {2147462393, 2147462419, 2147462587, 2147462633, 2147462747, 2147463167, 2147463203, 2147463569, 2147463727, 2147463863, 2147464211, 2147464549, 2147464751, 2147465153, 2147465563, 2147465599, 2147465743, 2147465953, 2147466457, 2147466463, 2147466521,...
ALGO
0.999803
5.433278
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2023-07-30T19:17: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": "dff5bf8ec34...
8f6f47cc-4d07-4531-b4dc-68f920518fb2
harshr3107/Coding-problems
0987-vertical-order-traversal-of-a-binary-tree/0987-vertical-order-traversal-of-a-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.999993
6.076456
{ "github_metadata": { "branch": "main", "commit_count": 1831, "repo_created_at": "2024-06-17T15:07:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e2f1192a1...
ee8cc018-9092-4f4b-893a-ee776ab366b3
pieper/Slicer4
Applications/CLI/BRAINSTools/BRAINSResample/itkGridForwardWarpImageFilterNew.h
/*========================================================================= * * Program: Insight Segmentation & Registration Toolkit * Module: $RCSfile: itkGridForwardWarpImageFilterNew.h,v $ * Language: C++ * Date: $Date: 2009-04-23 03:43:41 $ * Version: $Revision: 1.2 $ * * Copyright (c) In...
ALGO
0.992252
7.232696
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2010-03-23T23:08:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "224ffa987...
0b54ce0b-76dc-4670-89d4-49673997a294
akashsahu1701/Cpp-codes-
Queue.cpp
#include "bits/stdc++.h" using namespace std; #define n 20 class Queue { int *arr; int front; int back; public: Queue() { arr = new int[n]; front = -1; back = -1; } void push(int x) { if (back == n - 1) { cout <...
ALGO
0.996804
4.195937
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2021-01-09T07:41: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": "e1a6eb6e2...
2dcc6a1f-37bf-4957-8a92-0b98ef667edf
ishandutta2007/codeforces-a
amoo_safar/normal/1214/E.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #define pb push_back #define F first #define S second #define all(x) x.begin(), x.end() #define debug(x) cerr << #x << " : " << x << '\n' using namespace std; using namespace __gnu_pbds; typedef long long ll; typedef long double ld; typedef string str...
ALGO
0.999933
3.718433
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eef880b36b78...
d0ebe59d-6829-4c94-9b68-742c1e49325b
IshaAgawal/GoogleCodeJam
3.cpp
# include <iostream> # include <vector> # include <map> # include <stack> # include <queue> # include <algorithm> # define ll long long # define pll pair < ll, ll > # define fs first # define se second # define mp make_pair # define pb push_back # define rep(i, n) for( ll (i) = 0; (i) < (n); (i)++) # define REP(i, n) ...
ALGO
0.998858
3.68994
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-04-25T14:56:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cdec86082d...
9b01ba34-51be-41cc-a056-6f7c4462e3ac
namhai0510/C--
C--/The Hard Work of Paparazzi.cpp
#include <bits/stdc++.h> using namespace std; #define nothing ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define endl "\n" #define ll long long #define ull unsigned long long #define fi first #define se second #define pb push_back const ll oo = 1e13; const ll mod = 1e9 + 7; const int maxn = 1e6;...
ALGO
0.999859
4.195414
{ "github_metadata": { "branch": "main", "commit_count": 617, "repo_created_at": "2022-11-05T14:19:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "13a718c71a...
7f8edc63-4180-4d12-b873-5e397a61e81b
amarg6413/CP-programming
1-LCA_of_Binary_Tree.cpp
#include <bits/stdc++.h> using namespace std; struct node { int data; node *left, *right; }; struct node *addnode(int val) { struct node *newnode = new node(); newnode->data = val; newnode->left = newnode->right = NULL; return newnode; } node *utility(node *root, int x, int y, bool &v1, bool ...
ALGO
0.999997
4.380742
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2021-02-14T19:39:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "706a0925a02b...
a7abf024-bf7b-443e-b9a0-3a72cdc8d0e8
TheUniqueFersa/PROC
CODEFORCES/C. Target Practice.cpp
/* https://codeforces.com/problemset/problem/1873/C theuniqueFersa: YI!! <30 | 14/05/2025 */ #include <iostream> #define endl '\n' using namespace std; const int N = 10; int matrix[N][N]; void solve(){ int res = 0; for(int i = 0; i< 10 ; i++){ for(int j =0; j<N; j++){ char c; ...
ALGO
0.996084
4.226006
{ "github_metadata": { "branch": "main", "commit_count": 259, "repo_created_at": "2024-10-13T21:19:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2c0a93bcd2...
bbe578af-f803-4c8e-987b-5caac00f2213
BorjaAdayUCM/Programacion-Competitiva
UVA/12086.cpp
#include <iostream> #include <vector> using namespace std; class FenwickTree{ vector<int> ft; public: FenwickTree(int n) { ft.assign(n + 1, 0); } int getSum(int b) { int ret = 0; while (b) { ret += ft[b]; b -= (b & -b); } return ret; } void add(int pos,int val){ while (pos < ft.size()) { ft...
ALGO
0.998811
4.291968
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-03-07T23:50: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": "a0f1b26818be...
0e3f3df5-172e-4ecb-944b-218c12c88307
jbohren-forks/personalrobots-pkg
motion_planning/ompl/code/ompl/extension/kinematic/extension/est/src/EST.cpp
/********************************************************************* * Software License Agreement (BSD License) * * Copyright (c) 2008, <NAME>, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions ...
ALGO
0.999605
6.184594
{ "github_metadata": { "branch": "master", "commit_count": 23066, "repo_created_at": "2017-08-07T02:30:46.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5da8cd4...
4009a9df-6009-40d6-b41d-f8eb867a4538
paveloom-university/Programming-Exercises-S01-2017-to-S03-2018
ARPREC/arprec-2.2.13/tests/pslq_main_util.cpp
#include <cstdio> #include <arprec/mp_real.h> #include "pslq1.h" void print_usage() { puts("pslq1 [-d NUM] [-e NUM] [-h] [-m NUM] [-r NUM] [-s NUM] [-v]"); puts(" -d NUM, --digits NUM"); puts(" Use NUM digits of precision."); puts(" -e NUM, --eps NUM"); puts(" Specify the base 10 lo...
TOOL
0.997837
5.384996
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-05-05T13:55:15.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dc8690f2c1c...
cf3ae135-9ce7-4733-92b4-7926dcb5c33d
frcteam195/FRCCppConversion
cpp/src/main/include/trajectory/DistanceView.hpp
#pragma once #include <vector> #include <cmath> #include <type_traits> #include "geometry/State.hpp" #include "utils/CKMath.hpp" #include "TrajectoryView.hpp" namespace ck { namespace trajectory { template <class S> class DistanceView : public TrajectoryView<S> { static_ass...
ALGO
0.979757
6.769855
{ "github_metadata": { "branch": "master", "commit_count": 77, "repo_created_at": "2021-05-31T20:49:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "1447b5c6db...
1287512c-f572-4f0a-a325-2ed3107e9ad1
jasonrohrer/minorGems
game/steamGate/server/curve25519GenKeys.cpp
#include "minorGems/crypto/cryptoRandom.h" #include "minorGems/crypto/keyExchange/curve25519.h" #include "minorGems/formats/encodingUtils.h" #include <stdlib.h> #include <stdio.h> #include <string.h> static void usage() { printf( "Generates a public key and a shared secret key from a\n" "communicati...
TOOL
0.975073
5.496101
{ "github_metadata": { "branch": "master", "commit_count": 1136, "repo_created_at": "2017-10-12T17:17:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 34, "forks": 56, "issues": 2, "pull_requests": 2 }, "file_meta": { "content_id": "d7c37...
b22b4071-43b5-4637-8a7c-4c447b3bf484
bewuethr/stroustrup-ppp
chapter08/chapter08_ex05.cpp
// Chapter 08, exercise 05: write two functions that reverse the order of // elements in a vector<int> #include "../lib_files/std_lib_facilities.h" void print(const string& label, const vector<int>& v) { cout << label << " (" << v.size() << "): {"; for (int i = 0; i<v.size(); ++i) { if (i%8 == 0) cout...
TOOL
0.996806
5.661661
{ "github_metadata": { "branch": "main", "commit_count": 222, "repo_created_at": "2014-08-28T01:21:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 328, "forks": 126, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "d1f248...
b785eda1-f367-40d3-ae7b-92c48ac686d4
donggoolosori/BOJ_Record
solved_ac/Class_4/9251/2.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; string a, b; int cache[1000][1000]; int getLCS(int aidx, int bidx) { if (aidx < 0 || bidx < 0) return 0; int &ret = cache[aidx][bidx]; if (ret != -1) return ret; if (a[aidx] == b[bidx]) ...
ALGO
0.999978
4.195918
{ "github_metadata": { "branch": "main", "commit_count": 512, "repo_created_at": "2020-05-25T14:13: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": "f63ad89020...
555b4302-398f-464c-94f9-d694dd7b0833
Krishna752006/DS-Deepa-Class
2nd 9 Days/Day 17/Stack using Queue.cpp
#include <iostream> using namespace std; class Node { public: int data; Node *next; Node(int a) { data = a; next = nullptr; } ~Node(){ } }; class Queue { public: Node *first; Node *last; int size = 0; Queue() { first = nullptr; last = nullptr; } ...
ALGO
0.994148
4.248585
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2025-02-12T10:03: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": "5be6bf4cc04...
3d21d92b-ff29-4a3e-9b4b-6d7b26b35575
chy-2003/reponame
AC_Record/POJ1681.cpp
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int INF = 2147483647; const int bz[ 2 ][ 5 ] = { { -1, 0, 1, 0, 0 }, { 0, 1, 0, -1, 0 } }; int n; char ch[ 20 ][ 20 ]; int Matrix[ 250 ][ 250 ]; int Vis[ 250 ]; int Index[ 250 ], Sort[ 250 ]; int Free[ 250 ]; int f( int x, int y ) { ...
ALGO
0.999874
3.752193
{ "github_metadata": { "branch": "master", "commit_count": 68, "repo_created_at": "2018-07-05T04:57: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": "1fa77bdf7...
c8a41bcf-d005-4362-a378-3d14e369ccce
qkue/Introduction_to_CPP_Programming
Vector container/8/task_and_solution.cpp
/* Удаление элемента Удалите из массива элемент с индексом k. Обратите внимание, что считывание и вывод массива уже написаны за вас, необходимо написать только фрагмент программы — само удаление элемента. Входные данные В первой строке задано натуральное число n (n⩽100) и индекс k (0⩽k<n). В следующей строке заданы n ...
ALGO
0.999687
3.522598
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2024-06-03T17:08:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "119bf1e7256...
dba9d685-bf1e-4d28-be0f-7cc33e606651
javadev/LeetCode-in-All
src/main/cpp/g0201_0300/s0221_maximal_square/Solution.cpp
// #Medium #Array #Dynamic_Programming #Matrix #Dynamic_Programming_I_Day_16 // #Top_Interview_150_Multidimensional_DP #Big_O_Time_O(m*n)_Space_O(m*n) // #2024_05_26_Time_56_ms_(84.56%)_Space_24.5_MB_(55.52%) #include <vector> #include <algorithm> class Solution { public: int maximalSquare(std::vector<std::vector...
ALGO
0.999979
6.136874
{ "github_metadata": { "branch": "main", "commit_count": 107, "repo_created_at": "2024-01-22T11:41:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "514e53fcf6...
b468efea-531f-4cb2-899f-68909367e174
andreevmaxi/strprint_function
StrPrint.cpp
/*! * @mainpage * This is function that prints your array of chars until it founds '\0' */ /*! * \file StrPrint.cpp */ #include <cstdio> #include <cassert> const int Nchars = 1000; /** \brief StrPrint \author andreevmaxi \version 1.0 \date september 2019 year \copyright korobcom \details This is funct...
TOOL
0.926985
3.615114
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-09-09T11:29: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": "500f3302c9...
1cb27b0e-269c-40f3-9167-b941ed93441d
fatih-burak/SPP-HybDecomp
Direct Models/CC_CP/main.cpp
#include "main.h" #include <thread> int main(int argc, char **argv){ // Read input and output paths string path = argv[2]; string filein = argv[3]; string pathAndFileout = argv[4]; string path_UB = argv[1]; Solution sol; double start = getCPUTime(); // initialize the input variables from a ...
ALGO
0.999864
4.174308
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2025-05-07T07:52:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d86d8bb52d...
eadb5b7f-05c5-46d6-9d73-082b95910d1e
gayatri721/-CrackYourPlacement
STRINGS/Smallest window in a string containing all the characters of another string .cpp
class Solution { public: //Function to find the smallest window in the string s consisting //of all the characters of string p. string smallestWindow (string s, string p){ if(s.size()<p.size())return "-1"; int req[26]={0}; int brr[26]={0}; for(int i=0;i<p.size();i++) ...
ALGO
0.999994
5.347571
{ "github_metadata": { "branch": "main", "commit_count": 69, "repo_created_at": "2022-05-04T03:30:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5a372317723...
fb7d00f6-84a7-47c0-a514-87603fc5855e
PranavSitaraman/Arduino
Software Tests/Sine_Wave_Oscillation/Sine_Wave_Oscillation.ino
#include <Arduino.h> #include <Wire.h> #include <MeAuriga.h> #define lMotorPwm 11 #define lMotor1 48 #define lMotor2 49 #define lInterrupt 19 #define lChannelB 43 #define rMotorPwm 10 #define rMotor1 47 #define rMotor2 46 #define rInterrupt 18 #define rChannelB 42 #define MAX_ACC 20.0 double lTarPwm = 0; double lCurPwm...
TOOL
0.911743
5.11167
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2021-09-25T19:58:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a25327632d0...
1cf0856d-8adf-473b-8f79-44aacc8471ac
mfujiwara/atcoder-ruby
PAST/past202004-open/l.cpp
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; pair<long long,int> op(pair<long long,int> a, pair<long long,int> b) { if (a.first == b.first) { return a.second < b.second ? a : b; } else { return a.first < b.first ? a : b; } } pair<long long,in...
ALGO
0.99978
3.953717
{ "github_metadata": { "branch": "master", "commit_count": 1975, "repo_created_at": "2020-05-10T13:32: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": "de3bd04...
1529c539-04c8-4bf0-9ef0-1226fae51569
omteja04/Contest-Programs
USACO/Problem_2_The_Bovine_Shuffle.cpp
/** * Author: omteja04 * Created on: 24-09-2024 19:40:08 * Description: Problem_2_The_Bovine_Shuffle **/ #include <bits/stdc++.h> #define debug(x) cerr << "Line(" << __LINE__ << ") -> " << (#x) << " = " << (x) << '\n' using namespace std; void levi() { int n; cin >> n; vector<int> v(n, 0); for (int...
ALGO
0.999993
4.435243
{ "github_metadata": { "branch": "master", "commit_count": 100, "repo_created_at": "2024-08-28T05:18: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": "d46422f3...
75302a67-c8d6-45f6-a33a-cfdf7b6ab38f
ibrahimlovato/Ibrahim
future investment value.cpp
// 2.23.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> int main() { double investmentAmount, annualInterestRate, numberOfYears, futureInvestmentValue; //for the investment amount std::cout << "Enter investment amount:" << std::endl; std::c...
ALGO
0.985031
4.489044
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-02-19T18:38: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": "f16e3608a1...
c609cc1e-e924-4db8-9e4d-547c548e3b11
Tarunagg1/Ds_Alog_notes
Linked_List/Linked_List.cpp
#include <iostream> using namespace std; struct node { int data; node *next; node(int value): data(value), next(NULL) {} } *head = NULL; bool Is_List_Empty() { return (head == NULL); } void Insert_At_Beginning(int value) { node *temp = new node(value); temp -> next = head; head = temp; }...
ALGO
0.999384
4.608768
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-01-19T04:18:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fb86479132...
fe8d9afc-2406-47f3-96d1-0ef3aef12a71
DominikHorn/learned-hashing
include/dynamic-pgm.hpp
#pragma once #include <cstdint> #include <memory> #include <pgm/pgm_index.hpp> #include <pgm/pgm_index_dynamic.hpp> #include <stdexcept> #include <string> #include "convenience/builtins.hpp" namespace learned_hashing { template <typename T, size_t Epsilon, size_t EpsilonRecursive = Epsilon, typename Float...
ALGO
0.908274
6.855583
{ "github_metadata": { "branch": "main", "commit_count": 155, "repo_created_at": "2021-08-03T15:41:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "688e3e82c6...
50da364d-a09a-45d7-918a-ebb016025678
Joker-Yi/408-postgraduate
Data structure/linearList/linkList_headInsert.cpp
// // Created by Yee on 2021/8/26. // #include <stdio.h> #include <stdlib.h> // 带头结点的单链表 头插法创建单链表 typedef struct LNode { // 定义单链表结点类型 int data; // 结点的数据域 struct LNode *next; // 结点的指针域 指向下一个结点的指针 } LNode, *LinkList; // 给struck LNode数据类型 设置别名LNode(结点), *LinkList(指向单链表的指针) // 尾插法建立单链表 o(n) // 都是对尾...
ALGO
0.999607
3.999299
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2021-08-23T07:51:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a2173e2b7...
dc1364b6-6715-4287-a643-29b3cf3020c9
AppledoreM/OI
PastFiles/Codeforces/Contest2019/Manthan_Codefest19/E.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <cmath> using namespace std; typedef long long ll; const int maxn = 2e6 + 5; int n,w; int trees[maxn][23],vecs[maxn]; int lg[maxn]; ll ans_lis[maxn], rsum[maxn]; void build(int sz){ for(int i = 1; i <= 20; i++){ for(i...
ALGO
0.999956
3.493553
{ "github_metadata": { "branch": "master", "commit_count": 175, "repo_created_at": "2018-08-02T09:00:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6d83b318...
e29ef6da-b97f-440f-8990-411f6e2f962e
schien/practices
src/array/main.cpp
#include <iostream> #include "input_helper.h" #include "solution.cpp" void usage() { std::cout << "[usage] i {n x_1 ... x_n} {m y_1 ... y_m}\n" << " t {n x_1 ... x_n} k\n" << " m {n x_1 ... x_n}\n" << " p {n x_1 ... x_n}\n" << " d {n x_1 .....
ALGO
0.999493
4.224654
{ "github_metadata": { "branch": "master", "commit_count": 178, "repo_created_at": "2018-06-28T03:00: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": "be436fd3...
46963d1d-b296-4906-bbc3-1ad743b4a53b
letstatt/itmo
algo-labs/lab8 - minpath games/i.cpp
#include <algorithm> #include <iostream> #include <vector> #include <queue> using namespace std; #define nl << '\n' void solve(); int n; int main() { /*ios_base::sync_with_stdio(0); cout.tie(0); cin.cie(0);*/ while (cin >> n) { solve(); } } void solve() { vector<vector<int>> g, gr...
ALGO
0.999983
4.066281
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2022-06-09T09:54:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "51479da35cd...
2d50b2ab-734d-461b-85bf-824c04a6cd33
ermine27/atcoder
abc/263/263-d.cpp
#include <bits/stdc++.h> using namespace std; #define reps(i,s,n) for(int i = (int)(s); i < (int)(n); ++i) #define rep(i,n) reps(i,0,n) #define repf(i,n) reps(i,1,n+1) #define all(v) v.begin(), v.end() using ll = long long; using vi = vector<int>; using vl = vector<long long>; template<class T>bool chmax(T &a, const T...
ALGO
0.999928
4.199421
{ "github_metadata": { "branch": "main", "commit_count": 124, "repo_created_at": "2022-05-16T12:56:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "c6d83786ed...
45b3ebf7-0246-48f9-956e-d7d812d82897
abhishek18124/PPCPPNov2022
06 - May/Lecture 41/001Tries_Strings.cpp
/* Implementation of the TRIE data structure to store strings. Motivation : Given an array of N strings, and an array of Q queries, check for each query if it is present in the array or not. */ #include<iostream> #include<unordered_map> using namespace std; class node { public : char ch; bool terminal; ...
ALGO
0.999285
5.511593
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2022-12-10T14:17:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2b55dd7577d...
816ae11e-2030-44ee-ac61-7d527cf7e398
hardy2p/C-CP
lecture9.cpp
#include<iostream> #include<array> using namespace std; void printArray(int arr[],int size) { for(int i=0;i<size;i++) { cout<<arr[i]<<" "; } } int main(){ int arr[9]; cout<<"Enter the elements of the array"<<endl; for(int i=0;i<9;i++) { cin>>arr[i]; } // for(i...
TOOL
0.975701
3.746317
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2024-09-23T19:26:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ea2211d0d07...
0e51bcea-1e51-4953-ab3f-1c0832abbbd4
JakNat/JIMP2
lab3/minimaltimedifference/MinimalTimeDifference.cpp
// // Created by tbk on 16.03.2018. // #include "MinimalTimeDifference.h" #include <regex> class string; #include <vector> #include <sstream> #include <regex> #include <cmath> using namespace std; namespace minimaltimedifference{ using std::regex; using std::smatch; unsigned ToMinutes( std::string str){ ...
ALGO
0.996165
5.299891
{ "github_metadata": { "branch": "master", "commit_count": 146, "repo_created_at": "2018-03-02T13:48: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": "1b8b2915...
c3c71527-c20f-464b-ab75-3e2bfd0a2fe9
pachecowillians/URI
2407.cpp
#include <iostream> #include <cmath> #include <cstdio> #include <iomanip> using namespace std; typedef struct ponto { int l, c; } Ponto; int Max(int n1, int n2) { if (n1 > n2) { return n1; } else { return n2; } } int main() { int mat[3][3]; Ponto p[3]; int cont...
ALGO
0.999951
3.95994
{ "github_metadata": { "branch": "main", "commit_count": 48, "repo_created_at": "2021-04-23T01:57: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": "003fb08d433...
250703fd-e73d-4974-bee1-29ddf1f9cfd1
Muhand/College-Work
CSC 470 - Computer Graphics/Labs/Lab 2/Lab 2/Lab2/Lab2/main.cpp
//////////////////////////////////////////////////////////////////// // <NAME> // CSC 470 - Computer Graphics // Lab #2 - Problem 4 - creative //////////////////////////////////////////////////////////////////// #include <stdio.h> // use as needed for your system #include <stdlib.h> #include <math.h> ...
TOOL
0.998976
4.204419
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2016-09-26T03:03: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": "4312acb6f...
d477e56d-609b-4958-8b26-e23eb82b657a
henryhlc/playground
make/cf2001/e1.cc
#include <iostream> #include <vector> using namespace std; int main() { int tt; cin >> tt; for (int t = 0; t < tt; t++) { int n, k, p; cin >> n >> k >> p; // conditions // - added to k nodes // - each node value is the number of times it is added in the subtree // - fi...
ALGO
0.999974
4.759517
{ "github_metadata": { "branch": "main", "commit_count": 60, "repo_created_at": "2023-09-15T22:32: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": "54e96bedcac...
277f5a57-b771-4757-a38c-3844879fd591
ck1001099-Teaching/cpp_course_2021summer
3_lesson3/InClass/50!.cpp
//計算50!的大小 #include <iostream> using namespace std; void OutputNumber(int[200]); void BigMul(int[200], int[200]); int main(){ int number[200]; for (int i = 0 ; i < 200 ; i++){ number[i] = 0; } number[199] = 1; for (int i = 1 ; i <= 50 ; i++){ int tmp[200]; for (int j = 0 ; j < 200 ; j++){ tmp[j] = 0; ...
ALGO
0.999828
3.71456
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2021-08-03T12:41:02.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fc3f05b448...
8184bb58-79f0-42ff-b9b0-14b18fe2d2d8
ArjanBroos/FluidSim
FluidSim/FluidSim/boxRotating.cpp
#include "boxRotating.h" #include "util.h" #include <glload/gl_3_3.h> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/type_ptr.hpp> BoxRotating::BoxRotating(glm::vec3 pos, glm::vec3 size, float m){ center = pos; this->size = size; mass = m; rotation = glm::vec3(0,0,0); omega = glm::vec3(0, 0, 0); } ...
ALGO
0.999381
4.262236
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2014-06-11T00:26:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e580414ec...
913c5fdb-3e70-4035-bc5a-fc1b5e7d571f
sandeepshiven/Competitive
Strivers A2Z DSA course/4. Binary Search 1D-2D Arrays - Search Space/4.2. BS on Answers/Median of Two Sorted Arrays.cpp
#include<bits/stdc++.h> using namespace std; int main() { return 0; } /* Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). Example 1: Input: nums1 = [1,3], nums2 = [2] Output: 2.00000 E...
ALGO
0.999989
5.70311
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2023-07-02T11:10: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": "031b3e3a113...
da119198-989a-4713-887b-64feb12b1436
roshanyadavv/CP
googlekickstart_imagelabeler.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; int c = 0; cin >> t; while(t--){ c++; int n, m; double med =0.0; cin >> n >> m; vector<int> v; for(int i = 0; i < n; i++){ int temp; cin >> temp; v.p...
ALGO
0.999926
4.21448
{ "github_metadata": { "branch": "main", "commit_count": 51, "repo_created_at": "2021-12-04T14:32:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6a446404771...
c31b5be2-192a-44bc-af95-2af6015e024a
Apress/beginning-cpp20
Exercises/NoModules/Chapter 09/Soln9_02.cpp
// Exercise 9-2 Working with std::string_view<> and std::span<> #include <iostream> #include <format> #include <string_view> #include <span> // The function prototype including defaults for parameters void show_data( std::span<const int> data, std::string_view title = "Data Values", size_t width = 10, size_t per...
TOOL
0.956368
6.783418
{ "github_metadata": { "branch": "main", "commit_count": 240, "repo_created_at": "2020-10-02T13:57:44.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 171, "forks": 74, "issues": 2, "pull_requests": 1 }, "file_meta": { "content_id": "c082c401...
6f7dc214-4efc-4624-96ed-6fe17cc9c93b
lukmanulhakim15/lukmanulhakim
UAS.Lukmanulhakim_22040037.cpp
/* ================================ NAMA : <NAME> NIM : 22040037 KELAS : 2B TEMA : KASIR APOTEK ================================ */ #include <iostream> #include <string> #include <algorithm> #include <windows.h> #include <iomanip> using namespace std; void cls() { system("cls"); } void gotoXY(int x, int y...
TOOL
0.986527
4.88055
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-06-28T13:37:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "caa81e4e6c9f...
be1e9f6e-4ca4-4674-b246-2024986987c7
aniketbiswas/Image-Processing-Workshop
Third Day/Canny2.cpp
#include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" //#include <Windows.h> #include <iostream> #include<math.h> using namespace std; using namespace cv; int main() { float i, j, x, y, a, k, z; Mat var1 = imread("testing.jpg", 0); namedWindow("window1", WINDOW_AUTOSIZE); namedWindow("window...
ALGO
0.976475
3.55396
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2016-12-26T10:28:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "481df06a1...
182d1609-8b31-4b8e-9c34-4dd23a4ab61c
NicoMoser/EarlyDays
projectEuler/problem4.cpp
/* A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest palindrome made from the product of two 3-digit numbers. */ #include <string> #include <iostream> #include <sstream> bool is_palindrome(const std::string& s) { st...
ALGO
0.999695
5.232004
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2015-11-06T03:51: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": "1fdf18ffb...
3fcca448-020b-4afe-b7a3-27f6da96ff98
omron-sinicx/homotopy-aware-MAPP
src/optimize_plans.cpp
#include "optimizer.cpp" #include <random> #include "braid.hpp" Braid calculate_braid(const std::vector<std::vector<Eigen::Vector2d>> &plan) { int number_of_agents = plan.size(), number_of_way_points = plan[0].size() - 1; Braid b; b.N = number_of_agents; std::vector<std::pair<double, int>> start_indexes(numbe...
ALGO
0.999639
4.666747
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2023-10-03T09:48:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6da66785c86...
4125a243-ec18-4bab-80d8-3499e95369d8
TAMREF/problem-solving-storage
AutoDownloaded Codes/sshstamref/2570/2570.cpp11.cpp
#include <bits/stdc++.h> using namespace std; const int MX = 210, NX=6002; short s, t=6001, K=3000; int N, M, ans, x, y; short bef[NX], L[MX][MX], R[MX][MX]; vector<short> edge[NX]; short lnum, rnum; bool vis[NX], tam[NX][NX], chess[MX][MX]; void input(){ for(scanf("%d%d",&N,&M);M--;){ scanf("%d%d",&x,&y); ...
ALGO
0.999946
3.259349
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2017-01-14T09:27:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a0c5ebc77...
b4c1d32c-0d71-4e60-953e-a7b2e9a00b7d
openhpc/ohpc
tests/apps/hpcg/src/CG.cpp
//@HEADER // *************************************************** // // HPCG: High Performance Conjugate Gradient Benchmark // // Contact: // <NAME> ( <EMAIL>) // <NAME> (<EMAIL>) // <NAME> (<EMAIL>) // // *************************************************** //@HEADER /*! @file CG.cpp HPCG routine */ #inclu...
ALGO
0.998428
5.631878
{ "github_metadata": { "branch": "3.x", "commit_count": 12766, "repo_created_at": "2015-09-28T18:20:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 917, "forks": 199, "issues": 9, "pull_requests": 2 }, "file_meta": { "content_id": "13b758...
16996fae-cc9f-49ad-8cef-9693fa4550b4
fhvirus/CodeArchive
TIOJ/2363-2.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for(int i = a; i < (b); ++i) #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; int main() { cin.tie(0)->sync_with_stdio(0); cin.exceptions(cin.failbit); int n,...
ALGO
0.999968
3.668394
{ "github_metadata": { "branch": "master", "commit_count": 59, "repo_created_at": "2021-04-25T08:33:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "66bd196bd...
4df5bc5d-d2e8-4125-8455-6b45d6f37d48
jassbanwaitz/-Coding-Ninjas-CP-course-2022
Dynamic Programming - 1/Boredom.cpp
/* Gary is bored and wants to play an interesting but tough game . So he figured out a new board game called "destroy the neighbours" . In this game there are N integers on a board. In one move, he can pick any integer x from the board and then all the integers with value x+1 or x-1 gets destroyed .This move will give ...
ALGO
0.999973
5.278899
{ "github_metadata": { "branch": "main", "commit_count": 251, "repo_created_at": "2022-02-27T08:53:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 37, "forks": 10, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "c7e09d07...
1198353e-c019-4424-ba69-1ffc5afc4236
devraghav14/DSA
AdditionalTopics/Basic Mathematics/Prime Numbers/SieveOfEratosthenes.cpp
// Leetcode Problem No : 204 - Count Primes(Medium) /* Given an integer n, return the number of prime numbers that are strictly less than n. Example 1: Input: n = 10 Output: 4 Explanation: There are 4 prime numbers less than 10, they are 2, 3, 5, 7. Example 2: Input: n = 0 Output: 0 Example 3: Input: n = 1 Outpu...
ALGO
0.999992
6.311153
{ "github_metadata": { "branch": "main", "commit_count": 131, "repo_created_at": "2025-02-18T05:32: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": "26c07193e3...
fa97d1a3-8e0d-4074-a323-c3c3868d2ec5
ishandutta2007/codeforces-z
zxqfl/normal/521/B.cpp
#include <bits/stdc++.h> #define jjs(i, s, x) for (int i = (s); i < (x); i++) #define jjl(i, x) jjs(i, 0, x) #define ji(x) jjl(i, x) #define jj(x) jjl(j, x) #define jk(x) jjl(k, x) #define jij(a, b) ji(a) jj(b) #define foreach(x, C) for (auto& x : (C)) #define ever ;; #define INF ((int) 1e9+10) #define LINF ((ll) 1e16...
ALGO
0.999942
3.830287
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16: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": "71c7426bc0e7...
ea832de6-93d0-4399-9af8-a37d1e36dc8e
Corwinian/Term.Cross
nrc/include/nrc.hpp
//------------------------------------------------------------------------- // NRC.HPP //------------------------------------------------------------------------- #ifndef _NRC_ #define _NRC_ #include <math.h> /* * f1dim * Функция используется другими функциями библиотеки. Вычисляет значение * функции в точке, отст...
ALGO
0.999959
4.947662
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2011-03-12T13:19:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bc5b2021f...
e36af355-f4b3-4775-b6f2-64e27613f29a
ishandutta2007/codeforces-o
orzdevinwang/normal/1036/F.cpp
#include<bits/stdc++.h> #define L(i, j, k) for(int i = j, i##E = k; i <= i##E; i++) #define R(i, j, k) for(int i = j, i##E = k; i >= i##E; i--) #define ll long long #define ull unsigned long long #define db double #define pii pair<int, int> #define mkp make_pair using namespace std; const int N = 1e6 + 7; bool Prime[N]...
ALGO
0.999326
4.603918
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:45: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": "2891b19d8c1f...
ed14e626-6e13-4bb3-b515-955fae1ee0ad
agurusa/interview_prep
trees_and_graphs/route_between_nodes.cpp
#include <iostream> #include <vector> #include <map> class Node{ public: Node(int d){data=d;} std::vector<Node*> children = {}; int data; friend bool operator == (const Node lhs, const Node rhs){ return(lhs.data == rhs.data); } }; class Graph{ public: Graph(){} std::vector<Node*> nodes= {}; }; bool route_be...
ALGO
0.999458
4.936876
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2018-01-25T18:33: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": "b544eb140...
f9db6217-25a4-4fd1-88f8-5e20a9544643
saloni-15/SDE-sheet-tuf
2_Arrays_II/1_RotateImage.cpp
//https://leetcode.com/problems/rotate-image/ /* 2. SPACE OPTIMIZED INPLACE SOLUTION : We can observe that the rotated matrix is the transpose of the reverse of given matrix. first reverse up to down, then transpose it 1 2 3 7 8 9 7 4 1 4 5 6 => 4 5 6 => 8 5 2 7 8 9 1 2 3 9 6 3 T.C : ...
ALGO
0.999984
7.257856
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-05-07T07:08:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6b94fcc6591a...
93554971-55e8-442c-ac09-9e01b2b08845
ngthvan1612/Codeforces
787A.cpp
///created: 5/Jun/2019 19:56:28 #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> ii; #define db(x) cerr << "debug: " << #x << " = " << x << '\n'; int ExEuclid(int a, int b, int& x, int &y) { if (b == 0) { x = 1; y = 0; return a; } int d = ExEuclid(b, a % b, x, y); ...
ALGO
0.999872
3.574774
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-02-01T06:14: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": "8d67266e6f...
d3054fd7-7f77-4107-b75a-6df0086143a8
AlexandreRouma/RyFi
vendor/dsp/clock_recovery/fd.h
#pragma once #include "../processor.h" #include "../loop/phase_control_loop.h" #include "../taps/windowed_sinc.h" #include "../multirate/polyphase_bank.h" #include "../math/step.h" namespace dsp::clock_recovery { class FD : public Processor<float, float> { using base_type = Processor<float, float> ; pu...
ALGO
0.996603
6.291611
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2024-07-23T03:03:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 31, "forks": 2, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "a8e7b6eb1...
3a42fcba-de7d-4e92-93fc-7af83d2d954b
choupi/puzzle
leetcode/p18.cpp
// https://leetcode.com/problems/4sum/ // 18. 4Sum class Solution { public: struct VectorHash { size_t operator()(const std::vector<int>& v) const { std::hash<int> hasher; size_t seed = 0; for (int i : v) { seed ^= hasher(i) + 0x9e3779b9 + (seed<<6) + (seed>>2); } ...
ALGO
0.999946
6.330275
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2013-10-15T04:43: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": "a0f31868d...
b37436f1-1512-4d37-9c6b-dd08d3f45cea
asierigle/Practica2
Tree/Project1/Tree.h
#ifndef __TREE_H__ #define __TREE_H__ #include <stdio.h> #include <assert.h> #include "p2List.h" #include "p2Stack.h" template <class TYPE> class TreeNode{ public: TYPE data; TreeNode* father; p2List<TYPE>* sons; protected: TreeNode<TYPE>* _Find(const TYPE& father) { if (father == data) { return this; }...
ALGO
0.953456
4.419727
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2015-04-25T23:31:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "64f9deb39...
fdcebc00-c987-4b4a-99db-f5c385310b4b
Class-17/AdvancedGuide
0x10.BasicDataStructures/0x15.周期.cpp
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(nullptr)->sync_with_stdio(false); int _ = 1, n; while (cin >> n and n) { cout << "Test case #" << _++ << '\n'; string s; cin >> s; vector<int> pi(n); for (int i = 1, j = 0; i < n; ++i) { while (j ...
ALGO
0.999773
3.809682
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-10-07T13:03: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": "60b9b63900bc...
0dd92161-80f3-46f4-ba1f-00cd8cb368d8
RevanthSB/DSA_in_cpp
queue.cpp
#include<iostream> using namespace std; class Queue { private: int front = -1; int rear = -1; int arr[10]; int size = 10; public: Queue() { for (int i = 0; i < size; i++) { arr[i] = 0; } } Queue(int arr[10]) { for (int i = 0; i < 10; i++) { enqueue(arr[i]); } } bool isfull() { if (rear == (size...
ALGO
0.993257
4.326577
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2023-09-01T12:48: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": "497beb42c49...
4e291414-ef35-4ea3-a39e-2d2afd26caa7
Vehicle-Telematics-Control-Unit/external-ECUs-gateway
docker-vsomeip-build/vsomeip/implementation/configuration/src/configuration_impl.cpp
// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #include <cctype> #include <fstream> ...
TOOL
0.927542
5.865284
{ "github_metadata": { "branch": "main", "commit_count": 39, "repo_created_at": "2023-03-28T10:54:39.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "16ff4cf2b58a...
3b4bfdcf-36c4-4926-a6e3-b9c52199e84b
Camithilwen/Code-Cloning-Analysis
src/llm-scripts/testing/Project_CodeNet_experimentation_dataset/data/p03270/s294241738.cpp
#include <bits/stdc++.h> #define mp make_pair #define X first #define Y second #define FOE(x, a) for(auto x : a) #define FOR(i, a, b) for(int i = a; i <= b; i++) #define FOD(i, a, b) for(int i = a; i >= b; i--) using namespace std; typedef long long ll; typedef pair <int, int> ii; const int N = 2010; const int MOD ...
ALGO
0.999825
4.097568
{ "github_metadata": { "branch": "main", "commit_count": 243, "repo_created_at": "2025-06-06T16:57:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "ffeb11f249...
18d005b3-20c1-4d63-9d0a-640eceefbbad
karimsammouri/MU-CSE-278
Lab03/sammouka_lab3.cpp
// Copyright 2020 <NAME> #include <fstream> #include <vector> #include <iostream> #include <string> #include <climits> int computeSum(std::vector<int> vector) { int sum = 0; for (auto num : vector) { sum += num; } return sum; } double computeAverage(std::vector<int> vector) { double sum...
TOOL
0.983306
6.5015
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2023-01-15T01:39: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": "d6cc716d82a...
ebdb23a5-4e4e-4685-8e30-7174142fe576
littleblus/cpp-learning
test_7_17/test.cpp
#include <stack> #include <vector> using namespace std; // 最小栈 //https://leetcode-cn.com/problems/min-stack/ class MinStack { public: MinStack() { _st = stack<int>(); _minst = stack<int>(); } void push(int val) { _st.push(val); if (val <= (_minst.empty() ? INT_MAX : _minst.top())) _minst.push(val); } ...
ALGO
0.999299
6.016724
{ "github_metadata": { "branch": "master", "commit_count": 288, "repo_created_at": "2023-10-21T15:29:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "33a354fc...
fed30f44-e2d0-4b85-903b-17c079de581b
mcapetz/CS32
HW_1/Map.cpp
// // Map.cpp // CS32-Proj2 // // Created by <NAME> on 1/21/22. // // Map.cpp #include "Map.h" #include <iostream> using namespace std; Map::Map() { } Map::~Map() { linkedList::Node* p = linkedList.dummy->next; while(p != linkedList.dummy) { linkedList::Node* n = p->next; delete p; ...
ALGO
0.987915
4.924697
{ "github_metadata": { "branch": "main", "commit_count": 190, "repo_created_at": "2022-01-08T05:24: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": "7f0cd06d13...
b01ac84f-fa43-4f11-826a-1accedd8e4c2
opencv/opencv
samples/cpp/distrans.cpp
#include <opencv2/core/utility.hpp> #include "opencv2/imgproc.hpp" #include "opencv2/imgcodecs.hpp" #include "opencv2/highgui.hpp" #include <stdio.h> using namespace std; using namespace cv; int maskSize0 = DIST_MASK_5; int voronoiType = -1; int edgeThresh = 100; int distType0 = DIST_L1; // The output and temporary...
ALGO
0.90752
4.944839
{ "github_metadata": { "branch": "4.x", "commit_count": 35401, "repo_created_at": "2012-07-19T09:40:17.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 83079, "forks": 56217, "issues": 2595, "pull_requests": 138 }, "file_meta": { "content_id"...
fed6e1a9-4c3f-4424-8833-697a9406c508
wisk/medusa
src/arch/arm/arm_helper.cpp
#include <string> #include "arm_helper.hpp" #include <medusa/bits.hpp> #include <medusa/extend.hpp> namespace arm { std::tuple<medusa::u32, bool> LSL_C(medusa::u32 Value, medusa::s32 Amount) { if (Amount <= 0) return std::make_tuple(Value, false); auto Result = Value << Amount; auto CarryOut = V...
TOOL
0.918694
6.001537
{ "github_metadata": { "branch": "dev", "commit_count": 1155, "repo_created_at": "2011-12-01T14:57:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1071, "forks": 90, "issues": 24, "pull_requests": 3 }, "file_meta": { "content_id": "4dacf...