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
3c39351f-4cfc-49ab-9f7b-d15860ad44cf
ProgramacionCompetitivaUFPS/soluciones
Soluciones Otras plataformas/atcoder/contest dp/f.cpp
/******************************************************************** * Ejercicio: Grid 1 * * Url: https://atcoder.jp/contests/dp/tasks/dp_h * * Lenguaje: c++ * * Autor: <NAME> ...
ALGO
0.999998
4.666303
{ "github_metadata": { "branch": "master", "commit_count": 168, "repo_created_at": "2015-09-22T23:58:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 7, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "6fe30bf0e...
b49f557d-9283-4b4d-b47f-d1777b473fc1
stan-dev/math
stan/math/prim/fun/matrix_exp_multiply.hpp
#ifndef STAN_MATH_PRIM_FUN_MATRIX_EXP_MULTIPLY_HPP #define STAN_MATH_PRIM_FUN_MATRIX_EXP_MULTIPLY_HPP #include <stan/math/prim/meta.hpp> #include <stan/math/prim/err.hpp> #include <stan/math/prim/fun/matrix_exp_action_handler.hpp> namespace stan { namespace math { /** * Return product of exp(A) and B, where A is a ...
ALGO
0.998106
5.877055
{ "github_metadata": { "branch": "develop", "commit_count": 28933, "repo_created_at": "2015-07-01T18:40:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 785, "forks": 195, "issues": 298, "pull_requests": 19 }, "file_meta": { "content_id": ...
5812e24b-06ce-4d98-843a-22d607a0502f
yuuki1036/atcoder
abc062/c/main.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; int main(){ ll H, W, halfH, halfW, Sa, Sb, Sc, Sd, Se, Hrem, Wrem, Smax, Smin; cin >> H >> W; ll ans = 1e9; for(int Ha = 1; Ha<H; ++Ha){ Sa = Ha*W; Hrem = H-Ha; if(Hrem > 1){ Sb = Hrem/2*W; Sc = (Hrem-Hrem/2)*W; Sm...
ALGO
0.999963
3.741074
{ "github_metadata": { "branch": "master", "commit_count": 137, "repo_created_at": "2020-08-26T10:36: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": "b8b73dda...
fb47ca75-6da9-4f17-91c5-5c67f361fd4e
daaashley/useful-stuff
cpp/quick_sort.cpp
#include <iostream> #include <iomanip> #include <map> #include <string> #include <limits> #include <sstream> #include <random> #include <chrono> int partition(std::vector<int> &arr, int left, int right) { int i = left; int j = right - 1; int pivot = arr[right]; while (i < j) { while (i < r...
ALGO
0.999415
5.749592
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-10-26T18:53: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": "7d6c6aafb194...
6c3677dc-10a3-416f-839a-66d792baa884
bozhidara-atanasova/cpp_OOP
Seminars/TestPreparation/Tasks1Solution/task4.cpp
#include <iostream> #pragma warning(disable:4996) class Student { private: char* name; float grade; public: Student(const char* n = "", float g = 2.00) { name = new char[strlen(n) + 1]; strcpy(name, n); grade = g; } Student(const Student& other) { name = new c...
TOOL
0.929718
5.055369
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2025-03-29T06:54:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f348204f0e2...
8909a577-a61d-4a15-99aa-9a860683433c
vmosyaykin/mech-math
sem_3/Class_Matrix/matrix.cpp
// ===================================== // Matrix Class test // (C) rdmr, 2k6 // Unautorized Duplication Appreciated! // ===================================== // =========================== // Matrix class implementation // =========================== #include "matrix.h" double TMatrix::Det() { if (W != H) throw ...
ALGO
0.99872
4.362406
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2016-07-19T08:49: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": "52958be9b...
3ba59d44-5597-49a0-a78a-08a8bc172e3d
tankche1/ACM-NOI
Fudan/0926/2.cpp
# include<stdio.h> # include<string.h> # include<algorithm> using namespace std; const int maxn=10010; const int mod=37; unsigned long long hash1[maxn],hash2[maxn]; int n,m; char w[maxn],s[maxn]; int first[maxn],nex[maxn<<1],edge=0,v[maxn<<1]; bool ok; void add_edge(int a,int b){ nex[edge]=first[a];v[edge]=b;first...
ALGO
0.999979
3.663159
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-07-30T06:16:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3a6259fcb7...
328da3de-0830-4ce8-9c10-e0f6816d2580
Zalak1208/Snake_Game
snake.cpp
#include "snake.h" #include <iostream> using namespace std; Snake::Snake(int i, int j, int speed) { this->pos = new int *[1]; this->pos[0] = new int[2]; this->pos[0][0] = i; this->pos[0][1] = j; this->speed = speed; dir = 0; size = 1; grow(); grow(); cout << "Snake created at ...
ALGO
0.951462
4.945523
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2025-02-10T11:19: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": "8f51f9a90f1...
c56d1981-052e-48f4-85e2-4c64cc6c0a68
bishalprasad321/DSA-Code
Binary Tree/14_leftView_traversal.cpp
#include<bits/stdc++.h> using namespace std; /* Binary Tree Representation [ 12 -> root node | / \ | 5 15 -> parent node | / \ / \ [ 7 17 8 45 -> child node (leaf node) left View Traversal will print = 12->5->7 */ class Node { public: int data; Node* left; ...
ALGO
0.999984
5.407313
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2021-11-27T06:43:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b598fa86d...
c4faf21b-e766-4436-8dfa-cd483f43830a
nolan0801/Competitive-Programming
Codeforces/Div2/391/A.cpp
// link problem: https://codeforces.com/contest/757/problem/A // vidut_206_CNH #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> p32; typedef pair<ll, ll> p64; typedef pair<double, double> pdd; typedef vector<ll> v64; typedef vector<int> v32; typedef vect...
ALGO
0.99895
3.457046
{ "github_metadata": { "branch": "main", "commit_count": 144, "repo_created_at": "2021-12-21T06:10:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d05e312511...
0ede1d80-02ef-4a61-8c3f-f341206bd5c4
RomanGao/cppDesignPattern
行为模式/strategy.cpp
/* 策略模式 */ #include<iostream> using namespace std; //抽象类 class AbstractStrategy { public: //战斗 virtual void fight(bool isfar=false) =0; virtual ~AbstractStrategy(){} }; //子类--一档 class YiDang:public AbstractStrategy { public: //战斗 void fight(bool isfar) override { cout<<"use yi dang: ";...
ALGO
0.914019
5.577884
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2024-05-18T12:40: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": "8d69417c482...
7e425493-7f40-4fba-95fa-5bc7cec1d195
ishandutta2007/codeforces-i
ivan100sic/normal/1476/E.cpp
// Retired? #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long unsigned long ull; typedef double long ld; int n, m, k; string p[100005]; map<string, int> idx; basic_string<int> e[100005], sol; int state[100005]; void dfs(int x) { state[x] = 1; for (int y : e[x]) { if (state[y] =...
ALGO
0.999994
3.696286
{ "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": "90e4bf0bf39f...
57d3be45-8020-4687-a2b2-3b682730b72f
realAYAYA/UnrealEngine-ToonLit
UnrealEngine/Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/Collision/PBDCollisionContainerSolverJacobi.h
// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "Chaos/CollisionResolutionTypes.h" #include "Chaos/Collision/CollisionApplyType.h" #include "Chaos/Collision/PBDCollisionSolverJacobi.h" #include "Chaos/Collision/PBDCollisionSolverSettings.h" #include "Chaos/Evolution/SolverConstraintContainer.h...
ALGO
0.999591
3.601365
{ "github_metadata": { "branch": "5.4", "commit_count": 164, "repo_created_at": "2023-03-14T06:10:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 66, "forks": 9, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "e976d19695...
830e2871-fb8f-4b32-8d91-df0e77e09326
kaikailuo/MyFirst-NeuralNetwork-Cpp
NeuralNetwork/code/NeuralNetwork.cpp
#define _CRT_SECURE_NO_WARNINGS #include"NeuralNetwork.h" // 随机生成 [-1,1] 区间的初始权重 inline float random_weight() { return ((float)rand() / RAND_MAX) * 2 - 1; } // 学习率更新策略(指数衰减) inline void get_new_lr(float& lr, int epoch, float decay_rate = 0.01f) { lr *= exp(-decay_rate * epoch); } // 使用给定权重初始化网络 NeutralNetwor...
ALGO
0.999135
4.522393
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-06-05T07:18: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": "0549a77a3ee4...
e664aab0-5e4b-4333-8abf-e881c75f89bc
Mulab11/cntt2016-hw1
TC-SRM-586-div1-1000/HalfSummer11.cpp
#line 2 "StringWeight.cpp" #include<vector> #include<list> #include<map> #include<set> #include<deque> #include<stack> #include<bitset> #include<algorithm> #include<functional> #include<numeric> #include<utility> #include<sstream> #include<iostream> #include<iomanip> #include<cstdio> #include<cmath> #include<cstdlib> #...
ALGO
0.999905
3.286355
{ "github_metadata": { "branch": "master", "commit_count": 4450, "repo_created_at": "2016-09-28T13:04:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 31, "forks": 28, "issues": 0, "pull_requests": 8 }, "file_meta": { "content_id": "45d45...
ccec2ee1-a398-42e3-97c9-9f4fec3435a8
xSeanliux/CompetitiveProgramming
TIOJ/1420/1420.cpp
#include <iostream> #include <map> #include <numeric> #define int long long int using namespace std; const int maxN = 5e4 + 10; struct DSU{ int N, cc, dsu[maxN]; DSU(){} DSU(int n){ N = cc = n; iota(dsu, dsu + N, 0); } void Flat(int x){ if(x == dsu[x]) return; Flat(...
ALGO
0.9998
4.602199
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2018-11-18T06:45: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": "73c0924cf...
2789888f-cbac-4508-934f-814e8fe69e54
AkshayKohad/Data-Structures-and-Algorithms-GFG
Binary Heap/Kth largest element in a stream.cpp
// APPROACH -> 1 class Solution { public: //Function to print kth largest element for each element in the stream. void kthLargest(int arr[], int n, int k) { // your code here priority_queue<int,vector<int>,greater<int>>pq(arr,arr+k); int i=0; while(i<k-1) { ...
ALGO
0.999965
5.001439
{ "github_metadata": { "branch": "main", "commit_count": 254, "repo_created_at": "2021-04-28T19:28:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d9abac9ef1...
35fb66c2-c511-403f-b845-050a5fa60aac
anishgupta675/FINAL450
Searching_Sorting/Subset_Sums/main.cpp
#include<bits/stdc++.h> #define int long long int using namespace std; void dfile() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif ios_base::sync_with_stdio(false); cin.tie(NULL); } void solve(int *a, int st, int end, vector<int> &v1) { int s = 0...
ALGO
0.999959
4.096598
{ "github_metadata": { "branch": "master", "commit_count": 510, "repo_created_at": "2022-03-07T11:58: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": "39d80cc1...
684c8c29-3491-40ec-8bf3-937fd6c6a829
akhikolla/testpackages
fuzzedpackages/rtkore/inst/projects/StatModels/include/STK_GaussianModel.h
/*--------------------------------------------------------------------*/ /* Copyright (C) 2004-2016 <NAME>, Université Lille 1, Inria This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; ei...
ALGO
0.994015
6.596403
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2021-01-15T17:42:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d6ef6a2504...
8cbdc5c2-83f7-408b-aa89-e74e8d87aea8
fs-cvut-pia/terrain-petrsokol
PIA_terrain/path/Path.h
#ifndef PATH_P #define PATH_P #include <set> #include "../structures/TerrainMap.h" #include "../structures/Point.h" // Abstract class which needs to be extended to contain the actual path finding algorithm class Path { public: // Constructor Path(TerrainMap& m, std::string name_in, Point start_in, Point fi...
ALGO
0.988413
3.917112
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-11-14T08:11:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "436a9b2287d49...
6c0e7d6f-e95f-4dc1-99b3-4b1d523715bb
vxp3503/CPP
DP/Permutation_coefficient.cpp
#include <iostream> using namespace std; // Less Complexity Method; int P(int n, int k) { int v = 1; for (int i = 0; i < k; i++) { v *= (n - i); } return v; } int Perm(int n, int k) { int p[n + 1][k + 1]; for (int i = 0; i <= n; i++) { for (int j = 0; j <= min(i, k); j++...
ALGO
0.999888
5.009367
{ "github_metadata": { "branch": "main", "commit_count": 110, "repo_created_at": "2020-11-16T15:11:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ecb71902c6...
5a320bdb-9438-4906-84c0-a54586f8bec5
Dadopur/Kattis-solutions
src/uxuhul.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); vector<vector<int>> FLIP_OUTCOMES = { vector<int>{0b001, 0b010, 0b100}, // 0b000 vector<int>{0b000, 0b011, 0b101}, // 0b001 ...
ALGO
0.999629
3.948081
{ "github_metadata": { "branch": "master", "commit_count": 82, "repo_created_at": "2024-01-18T12:49: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": "c1aa3e598...
55efca48-e5c5-4f8c-9438-df1aa7017677
dipak1221/CPP_Ubuntu_files
CPPlearning/ll1.cpp
#include <bits/stdc++.h> using namespace std; struct node { int data; struct node *next; }; struct node *head = NULL; node *insert() { node *l = NULL; node **n = &l; int data; do { cout << "Enter data \n"; cin >> data; *n = new node; (*n)->data = data; ...
ALGO
0.997771
4.069926
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-08-09T16:57: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": "c241d485cc...
37620342-603b-4b6c-bbbb-1f32e2ad9b3e
mohitvdx/Programs
codeforces/math/B_Stone_Age_Problem.cpp
// <NAME> "mohitvdx" // problem: #include <bits/stdc++.h> #define int long long using namespace std; const int MOD = 1e9 + 7; const int INF = LLONG_MAX >> 1; signed main(){ ios::sync_with_stdio(false); cin.tie(NULL); // fast IO // int t; // cin>>t; // while(t--){ int n; cin>>n; int...
ALGO
0.999554
4.219681
{ "github_metadata": { "branch": "main", "commit_count": 61, "repo_created_at": "2024-10-17T13:40:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e82b518b586...
2c0e17b7-293a-43ab-8571-b000d3bafb8c
iThinkersTeam/twilio
server/flask/lib/python2.7/site-packages/pystan/stan/lib/stan_math_2.15.0/stan/math/prim/scal/prob/pareto_cdf.hpp
#ifndef STAN_MATH_PRIM_SCAL_PROB_PARETO_CDF_HPP #define STAN_MATH_PRIM_SCAL_PROB_PARETO_CDF_HPP #include <stan/math/prim/scal/meta/is_constant_struct.hpp> #include <stan/math/prim/scal/meta/partials_return_type.hpp> #include <stan/math/prim/scal/meta/OperandsAndPartials.hpp> #include <stan/math/prim/scal/meta/scalar_s...
ALGO
0.997726
7.256674
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-06-22T05:54: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": "c3768a496a...
cfcdf4cc-bce3-454b-89ef-8f43e12b5f47
sh-sho1kat/CODEFORCES
Codeforces Round 943 (Div. 3)/C_Assembly_via_Remainders.cpp
#include <bits/stdc++.h> using namespace std; // 2024-05-02 20:59:59 #define fastio ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL) #define mod 1000000007 #define inf (1LL << 62) #define all(x) x.begin(), x.end() #define eb emplace_back #define ff first #define ss second #define yes cout << "YES" << nl...
ALGO
0.999796
3.908071
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-10-04T16:16: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": "0b368fdadcfb...
32e12f63-7fb5-40b7-bc20-b2711e6d7eac
spinillac11/Intro-HPC
S2C2-10-04-2025-Err_Num2/ej_series.cpp
#include <iostream> #include <cmath> typedef float REAL; // FLoat tiene e7 cifras representativas // Function declaration REAL sumN1 (int N); REAL sumN2 (int N); REAL sumN3 (int N); int main(void){ int Nmax = 1000; std::cout.precision(7); std::cout.setf(std::ios::scientific); for(int N = 1; N <=...
ALGO
0.997498
3.850806
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2025-04-09T03: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": "6fe95238f...
299b7535-2b57-404b-a35f-504f686e47ea
lenny-robotics/lenny-tools
source/tools/include/lenny/tools/Trajectory.h
#pragma once #include <lenny/tools/Definitions.h> #include <map> #include <optional> namespace lenny::tools { template <typename T> class Trajectory { public: Trajectory() = default; ~Trajectory() = default; /** * Helpers */ void clear() { entries.clear(); } void addEntry...
TOOL
0.989835
7.729387
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2022-11-14T17:04:15.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "169034cc83...
123bebcb-5ccf-4b76-8312-660d984aa297
Samnus/million
programa millon.cpp
#include <iostream> #include <fstream> #include <vector> #include <algorithm> #include <random> #include <chrono> #include <iterator> const int NUM_NUMBERS = 1000000; const int MIN_RANGE = -10000000; const int MAX_RANGE = 10000000; int generateRandomNumber() { static std::random_device rd; static std::mt19937...
TOOL
0.908211
4.988635
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-02-18T19:56: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": "f9132f563870...
0556ae1d-01ff-4a22-a302-53b24c139bc7
google/filament
third_party/draco/src/draco/compression/attributes/normal_compression_utils.h
// Copyright 2016 The Draco Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
TOOL
0.979719
5.857806
{ "github_metadata": { "branch": "main", "commit_count": 7301, "repo_created_at": "2018-08-03T17:26:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 18658, "forks": 1993, "issues": 155, "pull_requests": 23 }, "file_meta": { "content_id": "...
67fa285d-22ef-4005-9470-21085eece9d3
Hitesh1309/DAA-Lab-Submissions
Lab-5/Q2.cpp
#include <bits/stdc++.h> using namespace std; void swap(int* a, int* b) //function to swap to numbers by reference { int t=*a; *a=*b; *b=t; } void partition(int arr[],int low,int high); //function to make windows recursively void quickvariant(int arr[],int n); //function which does quicksort by calling...
ALGO
0.99997
5.269071
{ "github_metadata": { "branch": "main", "commit_count": 48, "repo_created_at": "2022-03-08T14:49:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "78f04214e91...
3fcc7f56-2731-457c-a590-304411fc33b3
uxth/leetcode
cpp/680.valid-palindrome-ii.cpp
/* * @lc app=leetcode id=680 lang=cpp * * [680] Valid Palindrome II * * https://leetcode.com/problems/valid-palindrome-ii/description/ * * algorithms * Easy (39.37%) * Likes: 7849 * Dislikes: 402 * Total Accepted: 658.1K * Total Submissions: 1.7M * Testcase Example: '"aba"' * * Given a string s, r...
ALGO
0.999813
6.569842
{ "github_metadata": { "branch": "main", "commit_count": 202, "repo_created_at": "2023-08-31T18:12:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d2fce6311b...
7d10cb48-99c6-4454-81ed-17638b2da093
transbot/ThinkingInCPPChinese
ThinkingInCpp中文版代码/C11/ToastOMatic.cpp
//: C11:ToastOMatic.cpp {RunByHand} // 作者:<NAME> & <NAME> // (c) 1995-2004 MindView, Inc. All Rights Reserved. // 有关源代码的使用许可,请参阅代码包附带的License.txt文件, // 该代码包可从www.MindView.net或中文版译者主页bookzhou.com下载。 // 演示线程协作中的问题 //{L} ZThread #include <iostream> #include <cstdlib> #include <ctime> #include "zthread/Thread.h" #include ...
ALGO
0.930217
5.751894
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2024-09-27T09:49:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "66491f3417d...
505131ec-6920-46a0-b0fd-7d31a86f7b0c
seong9180/codetree-TILs
240910/길이가 무한대인 수평선 트랙/horizontal-track-with-infinite-length.cpp
#include <iostream> #include <set> using namespace std; int N, T, a, b; set<pair<int,int>> oset; set<pair<int,int>>::iterator iter, copyIter, preIter, nextIter; float time1, time2; int main() { cin.tie(0); ios::sync_with_stdio(0); cin >> N >> T; // Input for(int i=0; i<N; i++){ cin >>...
ALGO
0.999979
3.807836
{ "github_metadata": { "branch": "main", "commit_count": 1967, "repo_created_at": "2024-04-10T10:02: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": "d74b42868...
ca945caf-8e09-4871-9a15-f55aede346c9
Silverhorse7/Problem-Solving-Training
codeforces/1514/A.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; ///**************************** M a c r o ****************************/// #define fi(i,n) for(int x = 0 ; x<n;x++) //to write 2d arrays faster ,generally arrays use #define ll long long #define Speedo ios_base::sync_with_stdio(...
ALGO
0.999448
4.254225
{ "github_metadata": { "branch": "master", "commit_count": 565, "repo_created_at": "2022-05-04T17:49:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f3a4c762...
d0d98cb9-a4a9-4818-981c-3c68b7439ac6
yz1019117968/FSE-24-UniTrans
cleaned_data/transcoder_evaluation_gfg/cpp/FIND_THE_ELEMENT_THAT_APPEARS_ONCE.cpp
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // #include <iostream> #include <cstdlib> #include <string> #include <vector> #include <fstream> #include <iomanip> #include...
ALGO
0.999557
5.587679
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-04-06T11:00:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dfdf7e17618...
b9811b9f-7abe-4b20-a111-8ef3a339ae7f
asgards1990/learningCPP
min stack/main.cpp
#include <iostream> //Using list will cause memory limit excess... #include <deque> #include <vector> #include "MinStack.h" using namespace std; int findMin(vector<int> &num) { int l(num.size()); if (l==1) { // cout << "only 1 element left" << num[0] << endl; return num...
ALGO
0.999941
5.266737
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2014-05-12T15:11: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": "11c543cd4...
08156cc0-34cf-415c-a3f8-c45d8a19263f
windystrife/UnrealEngine_NVIDIAGameWorks
Engine/Source/ThirdParty/PhysX/APEX_1.4/common/include/ApexFind.h
/* * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation * and any modifications thereto. Any use, reproduction, disclosure or * distribution of this so...
ALGO
0.995371
6.123257
{ "github_metadata": { "branch": "4.18-GameWorks", "commit_count": 14, "repo_created_at": "2018-03-06T15:44:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 284, "forks": 176, "issues": 4, "pull_requests": 2 }, "file_meta": { "content_id"...
0a80f2ab-25a9-4f43-bbd2-5853282f1f55
raziahmadansari/CP2_CIPHERSCHOOLS
assignment1/32-find-median-from-data-stream.cpp
// https://leetcode.com/problems/find-median-from-data-stream/ class MedianFinder { public: /** initialize your data structure here. */ priority_queue<double>s; priority_queue<double,vector<double>,greater<double>>g; int c; double ans; MedianFinder() { c=0; ans=0; } ...
ALGO
0.999982
6.11749
{ "github_metadata": { "branch": "master", "commit_count": 78, "repo_created_at": "2020-08-11T06:24: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": "83b5b124c...
5a04c6c1-fb68-42e5-848d-c96d786b947e
alisw/AliRoot
STARLIGHT/starlight/src/randomgenerator.cpp
/////////////////////////////////////////////////////////////////////////// // // Copyright 2010 // // This file is part of starlight. // // starlight 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 Found...
TOOL
0.928914
4.39334
{ "github_metadata": { "branch": "master", "commit_count": 74535, "repo_created_at": "2016-03-07T09:20:12.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 57, "forks": 256, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "aea1...
e879fac8-1612-417b-af85-b6eb618ae04a
Yinual/Network-Design
mst_Kruskal's.cpp
#include <iostream> #include <vector> #include <algorithm> #include <numeric> // For iota using namespace std; struct Edge { int src, dest; int weight; // operator< for sorting edges by weight bool operator<(const Edge& other) const { return weight < other.weight; } }; struct DSU { ...
ALGO
0.999991
5.846454
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2025-06-11T10:40:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5763ecbc2b9...
2774346c-8dc1-4d94-bb8e-d371d9c74fd3
ariosty/project_euler
p0082/solution.cc
#include <fstream> #include <iostream> #include <algorithm> using namespace std; int main() { ifstream in("matrix.txt"); int data[80][80]; for (int i = 0; i < 80; ++i) for (int j = 0; j < 80; ++j) // note that all ',' have been replaced by ' ' in >> data[i][j]; int resul...
ALGO
0.999945
3.271796
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2015-09-30T21:36: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": "5e7d406ad...
91369950-b161-45b7-9370-e73bebfb9cf5
walkccc/LeetCode
solutions/1181. Before and After Puzzle/1181.cpp
class Solution { public: vector<string> beforeAndAfterPuzzles(vector<string>& phrases) { set<string> ans; unordered_map<string, set<string>> firstWordToLasts; unordered_map<string, set<string>> lastWordToFirsts; for (const string& phrase : phrases) { const int firstSpaceIndex = phrase.find(' '...
ALGO
0.99959
6.082
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2019-02-23T15:46:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1254, "forks": 437, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0861411...
193a53f9-81f8-4eca-be50-3cc8cf18f37f
imulan/procon
atcoder/abc160/d.cpp
// clang-format off #include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i,n) for(int i=0;i<(int)(n);++i) #define all(x) (x).begin(),(x).end() #define pb push_back #define fi first #define se second #define dbg(x) cout<<#x" = "<<((x))<<endl template<class T,class U> ostream& operator<<(ostrea...
ALGO
0.999952
3.76849
{ "github_metadata": { "branch": "master", "commit_count": 2571, "repo_created_at": "2015-11-25T03:18:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 27, "pull_requests": 0 }, "file_meta": { "content_id": "a9a89a...
f8d29790-b62b-47c3-9c21-63df8c899970
aabouman/SimpleQuad
src/imu_vicon_feather/test/imu_vicon_test.cpp
#include <iostream> #include <ArduinoEigenDense.h> #include "../src/kalman/kalman.hpp" using namespace Eigen; template <int num_rows, int num_cols> void print_matrix(const Matrix<float, num_rows, num_cols> &X) { int i, j; for (i = 0; i < num_rows; i++) { printf("| "); for (j = 0; j < nu...
ALGO
0.919332
5.91152
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2022-02-24T18:46: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": "3f1e55c98...
9e1d2de2-a01a-4b10-999a-5689ec849c14
msm19682003/PSC
Week 17/Day 5/C_Colorful_Table.cpp
#include <bits/stdc++.h> #define fast \ ios::sync_with_stdio(false); \ cin.tie(nullptr); #define ll long long int #define sp ' ' #define py cout << "YES" << '\n'; #define pn cout << "NO" << '\n'; #define nl '\n' #define pb push_back using namespace std; void solve() { ll n, k; cin >...
ALGO
0.999774
3.921382
{ "github_metadata": { "branch": "main", "commit_count": 145, "repo_created_at": "2024-10-27T16:25:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b847816ef2...
eb4b8efb-4b36-4b0f-ae60-8b51b26784e9
zlwu92/gHyPart_TACO
cpu_works/Mt-KaHyPar-SDet/mt-kahypar/partition/refinement/fm/strategies/gain_cache_strategy.h
/******************************************************************************* * MIT License * * This file is part of Mt-KaHyPar. * * Copyright (C) 2020 <NAME> <<EMAIL>> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the ...
ALGO
0.997974
7.247368
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2024-12-27T02:41:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f2c8d14411...
d5800cb1-5cdb-48ef-8019-5f9bbc6ba25e
superj6/CPcode
c++ sol/POI/POI 16-Streets.cpp
/* First compress to scc since every node in a single scc functions the same so you can solve problem on a dag. Now you have to go both forward and backward in topological order of the dag and keep track of how many nodes don't have a parent. The only way a node can reach all nodes below it in topological order is if...
ALGO
0.999949
3.703846
{ "github_metadata": { "branch": "master", "commit_count": 441, "repo_created_at": "2019-09-09T05:55:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 129, "forks": 37, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8ea47...
60f22bbb-d01c-49c5-8e6d-4c5b767e9d92
Tarun097/CppVSWSL
Oct2024/old/shortestPathInUndirectedGraph.cpp
#include<iostream> #include<vector> #include<queue> #include<climits> using namespace std; /* Undirected graph - unit distance between each node 0----1-----2-- /---7--\ \ | \ / \ ---3--4--5--- 6 ----------8 */ void bfs(int src, int n, vector<vector<int>>& adjList, vector<int>& ...
ALGO
0.999741
4.864261
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-01-02T02:47: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": "a1654a7820f...
dab4ed73-9a5b-44b7-ae52-1bc6ceafa937
adamjackson2357/qomic_original
QOMiC_poisson_through_substates_multiv_adaptive/Data_simulation/Data_simul.cc
/* This file is part of QOMiC. * Copyright (c) <NAME> (<EMAIL>) * 2013 * * QOMiC 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 late...
ALGO
0.963384
4.184062
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-09-22T13:37: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": "1a9291d6c0...
4f86bcba-84e6-4c57-837f-c2a4a43febdf
ymoskovits/CS211
scoreTheRace.cpp
/******************************* * Name: <NAME> * Description: Takes input in the form of a string representing the order in which members of a team finish a race. * For example: ABBAAB represents the case when 3 runners on team A came in 1st, 4th, and 5th place. * The team's score is the average of its members' finish...
ALGO
0.997731
3.675661
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-02-27T16:51: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": "a93ba1f94e...
26190e88-d66c-4f0a-a75e-5a71d74db805
Hoikoro/procon
AtCoder/ARC/078D.cpp
#include <bits/stdc++.h> using namespace std; //make_tuple emplace_back next_permutation push_back make_pair second first setprecision #if MYDEBUG #include "lib/cp_debug.h" #else #define DBG(...) ; #endif using LL = long long; constexpr LL LINF=334ll<<53; constexpr int INF=15<<26; constexpr LL MOD=1E9+7; struct Pro...
ALGO
0.999965
3.878565
{ "github_metadata": { "branch": "master", "commit_count": 53, "repo_created_at": "2017-06-18T08:31: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": "96d5d2b49...
8f98d347-e625-4f2e-9c57-95f42a16cc36
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/Gemma/top0-100/find-shortest-path-with-k-hops-Solution.shortestPathWithHops/177833_DoS_Overflow.cpp
static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; char password[SPICE_MAX_PASSWORD_LENGTH]; time_t ltime; time(&ltime); RSA_private_decrypt(link->tiTicketing.rsa_size, link->tiTicketing.encrypted_ticket.encrypted_data, ...
ALGO
0.995644
4.457869
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-03-22T14:39: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": "a74c19957cbf...
22540302-b854-4452-a2dc-01cf0f2ed0d2
jrocnuck/MFC-MUTE
v0.0.7/MFC_MUTECORE_SOURCE/MUTE/crypto/cbc.cpp
// cbc.cpp - written and placed in the public domain by <NAME> #include "pch.h" #include "cbc.h" NAMESPACE_BEGIN(CryptoPP) CBCRawEncryptor::CBCRawEncryptor(const BlockTransformation &cipher, const byte *IV, BufferedTransformation *outQueue) : CipherMode(cipher, IV), FilterWithBufferedInput(0, S, 0, outQueue) { } v...
TOOL
0.920707
7.58115
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-05-05T02:30:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "165b06f5d2...
938276de-7dcc-4c20-8150-3c2085bebf05
resilient-swarms/ASVLite
c_legacy/dependency/VTK-9.1.0/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/filter/ParticleDensityNearestGridPoint.h
//============================================================================ // Copyright (c) Kitware, Inc. // All rights reserved. // See LICENSE.txt for details. // // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURP...
DATA
0.912438
7.077117
{ "github_metadata": { "branch": "master", "commit_count": 807, "repo_created_at": "2018-11-13T16:27:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 26, "forks": 10, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "797198b...
ac8f8889-3734-40b3-9d87-a5b53a3e56f4
Suhail7985/DSA
CPP/week3question/question1.cpp
// #include <iostream> // #include <unordered_map> // #include <algorithm> // class SinglyLinkedListNode { // public: // int data; // SinglyLinkedListNode* next; // SinglyLinkedListNode(int value) { // data = value; // next = nullptr; // } // }; // // Function to count frequencies of ...
ALGO
0.999972
5.347982
{ "github_metadata": { "branch": "main", "commit_count": 81, "repo_created_at": "2025-01-15T03:02: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": "f5bcdbd89dd...
7e23ce00-ea7c-49bb-b9a9-5c144ea5832f
thegamer1907/Code_Analysis
contest/1542581517.cpp
#include <bits/stdc++.h> #define FOR(i, a, b) for (int i = (a); i <= (b); i++) #define FORD(i, a, b) for (int i = (a); i >= (b); i--) #define pb push_back #define mp make_pair #define F first #define S second #define maxc 1000000007 #define maxn 200005 #define Task "" using namespace std; int h,m,s,t1,t2,dem...
ALGO
0.999924
3.280395
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2019-05-24T10:35:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fb8a39e42...
1dd7100d-dfc6-4f21-9ca0-fee48dc9f1bb
kaldi-asr/kaldi
src/nnet2bin/nnet-train-transitions.cc
// nnet2bin/nnet-train-transitions.cc // Copyright 2012 Johns Hopkins University (author: <NAME>) // See ../../COPYING for clarification regarding multiple authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obt...
DATA
0.975068
7.159438
{ "github_metadata": { "branch": "master", "commit_count": 9405, "repo_created_at": "2015-04-20T17:23:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 14986, "forks": 5368, "issues": 189, "pull_requests": 63 }, "file_meta": { "content_id":...
d30607fc-b1b2-413b-9058-36871b8423b2
arnavarora1710/Competitive_Programming
Codeforces/1917B.cpp
// https://codeforces.com/problemset/problem/1917/B #pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2,fma") #pragma GCC optimization("unroll-loops") #include <bits/stdc++.h> using namespace std; #define int long long #define MULTI_TEST (1) int n; string a; map<char, int> m; void solve() { cin >> n >> a;...
ALGO
0.999956
4.709052
{ "github_metadata": { "branch": "main", "commit_count": 513, "repo_created_at": "2023-11-05T09:57: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": "e2d50c9a44...
72a00c3a-62a1-4c97-887a-232ec53d5b78
mcvlab/leetcode
src/leetcode/cpp/q0097.cpp
/* #面试刷题# 第130期 #LeetCode# Q0097 交织字符串 难度:高 给定s1,s2,s3,找出s3是否由s1和s2的交错形成。 范例1: Example 1: Input: s1 = "aabcc", s2 = "dbbca", s3 = "aadbbcbcac" Output: true Example 2: Input: s1 = "aabcc", s2 = "dbbca", s3 = "aadbbbaccc" Output: false */ #include "leetcode.h" namespace q0097 { template<typename T> bool run_testca...
ALGO
0.99842
6.26222
{ "github_metadata": { "branch": "master", "commit_count": 227, "repo_created_at": "2019-12-13T06:56:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "17abeee3e...
60df0fda-df58-4226-ba3f-7497027b059f
shafiulmondol/link-list
delete_element-any-position.cpp
#include<iostream> using namespace std; class list{ public: int data; list *next; }; list *head=0; void createList(){ list *newnode,*temp; int choice=1; while (choice) { newnode=new list(); cout<<"Enter the node data: "; cin>>newnode->data; newnode->next=0; if(he...
ALGO
0.980321
4.289769
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2025-04-16T01:34: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": "cae6a0882a6b...
6749a558-6ed1-43f1-a968-57b2b3de4303
jhwei/Multi-view_Stereo
src/calibration.h
#include<opencv2/core.hpp> #include<iostream> using namespace cv; using namespace std; double computeReprojectionErrors(const vector<vector<Point3f> >& objectPoints, const vector<vector<Point2f> >& imagePoints, const vector<Mat>& rvecs, const vector<Mat>& tvecs, const Mat& cameraMatrix, const Mat& distCoeffs, v...
TOOL
0.968813
6.214694
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-02-01T07:18:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2540f42d87...
f57a557d-ab99-4e4c-860e-3ec7c27553df
kashishvaish/LeetCodeSolutions
DailyTemperatures.cpp
class Solution { public: vector<int> dailyTemperatures(vector<int>& temperatures) { // Time Complexity: O(n) // Space Complexity: O(n) int n = temperatures.size(); vector<int> result(n, 0); stack<int> stk; for(int i = n-1; i >= 0; i--) { while(!stk.empty()...
ALGO
0.999987
6.632702
{ "github_metadata": { "branch": "main", "commit_count": 373, "repo_created_at": "2022-08-04T14:45: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": "1ffed42b29...
44e08296-891a-47af-87a4-a70c7d86c514
Puneethnaik/TimusJudgeSolutions
1079.cpp
/*template created by */ #include <bits/stdc++.h> #define SI set<int> #define VI vector<int> #define ull unsigned long long #define inint(a) scanf("%d",&a) #define input(a) cin>>a #define ll long long #define f first #define s second #define len(s) s.length() #define FOR(i, a, b) for(i = a ; i < b ; i++) using namespac...
ALGO
0.999916
3.552899
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-10-24T15:59: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": "fc9b3a48a2...
8a598e9e-3823-4db4-8e8b-a2eb005b7206
littlecaca/algorithms
daily/july/minimum-time-to-visit-disappearing-nodes.cpp
#include <unordered_set> #include <climits> #include <functional> #include <queue> #include <map> #include <unordered_map> #include <iostream> #include <vector> #include <cmath> #include <algorithm> using namespace std; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<vvi> vvvi; typedef pair<int, int> p...
ALGO
0.999925
4.588386
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2024-04-24T09:13: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": "9b15e2c8c...
3d81d534-8225-46ce-a891-8305a28e93ab
Justinshao33/competitive_programming
done/AtCoder/F_Absolute_Minima.cpp
#pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx,popcnt,sse4,abm") #include<bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define pb push_back #define all(a) (a).begin(), (a).end() #define rep(X, a, b) for(int X = a; X < b; ++X) #define pii pair<int, int> #define...
ALGO
0.999386
4.406849
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2025-07-01T18:14: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": "ddf00277afc...
d28b0bfe-17a7-4a7a-9827-e09059d5a3e4
gaurav147-star/DSA-learning
Sorting/bubbleSort.cpp
#include <iostream> using namespace std; void swap(int *x, int *y) { int temp = *x; *x = *y; *y = temp; } void bubbleSort(int arr[], int n) { for (int i = 0; i < n - 1; i++) { for (int j = 0; j < n - i - 1; j++) { if (arr[j] > arr[j + 1]) { s...
ALGO
0.999885
5.363524
{ "github_metadata": { "branch": "main", "commit_count": 71, "repo_created_at": "2021-09-12T19:12: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": "07bdaf9835f...
7fa4857d-855c-4c74-9e5e-a3b9410b63ab
Junhyeok99/Algorithm
Beakjoon/1929.cpp
// // Created by junhyeok on 2022/03/23 // // https://www.acmicpc.net/problem/1929 #include <iostream> #include <set> #include <cstdio> #include <cmath> using namespace std; int main() { int a, b; // set 2 as prime number set<int> prime = {2}; cin >> a >> b; // check odd number has prime for...
ALGO
0.999939
4.047404
{ "github_metadata": { "branch": "main", "commit_count": 63, "repo_created_at": "2020-07-08T14:28:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dd6f4267f34...
1e69773d-528a-4baf-9a63-a3b500bc39de
dgreid/platform2
webserver/webservd/config_test.cc
// Copyright 2015 The Chromium OS Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "webservd/config.h" #include <base/files/file_util.h> #include <base/files/scoped_temp_dir.h> #include <base/strings/string_util.h> #include ...
TEST
0.905279
7.747506
{ "github_metadata": { "branch": "master", "commit_count": 32547, "repo_created_at": "2016-11-03T16:16:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 1, "pull_requests": 2 }, "file_meta": { "content_id": "c087c7...
415d9697-7ac9-483a-a423-0b3b5344bbed
TortueGit/CodingGame
Practice/C++/Defibrillators/defibrillators.cpp
#include <iostream> #include <string> #include <vector> #include <cmath> #include <algorithm> #include <sstream> using namespace std; /** * Auto-generated code below aims at helping you parse * the standard input according to the problem statement. **/ class LocationPoint { public: double latitude; double longitud...
ALGO
0.999009
4.185823
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2018-04-30T14:05: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": "79e039ecc...
a0684284-10e3-4188-a2ad-aca761c9a4e7
KwonSunwon/al-Khwarizmi_study
EomJangheon/DFS/1167_G2.cpp
/* https://www.acmicpc.net/problem/1167 제목: 트리의 지름 분류: 깊이 우선 탐색 난이도: 골드 2 최초 접근 풀이: 각 노드마다 edge에 대한 정보를 양방향으로 넣어준다(node, edge)로 그리고 모든 노드를 탐색하며 가장 긴 거리를 찾는다. ->시간초과 두번째 접근 풀이: cache를 만들어 dp방식으로 푼다. 100001*100001 배열은 너무 크다.. 메모리 초과 그러면 백터로 경로표시? ->오버헤드가 너무 크다. 세번째 접근: 입출력의 문제인가? scanf printf 보다 빠른게 있긴하나, 골드 4문제에서 1초에...
ALGO
0.99985
3.91239
{ "github_metadata": { "branch": "main", "commit_count": 108, "repo_created_at": "2022-12-21T06:35: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": "8adce244a7...
6976e4d8-f473-4ced-9430-e5e25c36a9b0
Neos-codes/DataStructures
Labs/lab7/mapDH.cpp
#include "mapDH.h" using namespace std; //usaremos la funcion good_hash implementada en mapg.cpp como "Primer hash" int good_hash_(string str,int tam){ int a = 0; for(int i = 0; i < str.length(); i++) a +=(int)str[i]*(i+1); //a cada letra del string, la multiplica por su posicion return ...
ALGO
0.982577
3.849689
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2020-11-05T18:48: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": "ef69dbdd27f9...
c709fa47-61e5-499e-8275-7fadf2a5e20e
FungluiKoo/CodeForceSolutions
1323A.cpp
#include <iostream> int main(){ std::ios_base::sync_with_stdio(false); std::cin.tie(NULL); short t, n, a; std::cin >> t; for(short i=0; i<t; i++){ std::cin >> n; bool odd_found = false, even_found=false; short idx, checkpoint; for(short j=1; j<=n; j++){ s...
ALGO
0.999175
3.211936
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-05-19T22:09:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0f5b352d3d...
eac8763d-8017-4d83-8a67-3bf4c6ba09bd
vivekup3424/Coding_Problems
leetcode/cpp/232.cpp
#include <bits/stdc++.h> using namespace std; class MyQueue { public: stack<int> s1, s2; MyQueue() { ; } void push(int x) { s1.push(x); } int pop() { while (s1.empty() == false) { s2.push(s1.top()); s1.pop(); } ...
ALGO
0.996232
4.408107
{ "github_metadata": { "branch": "main", "commit_count": 810, "repo_created_at": "2023-08-15T09:48:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "34ea5bdf9d...
24b6b075-27d1-4ba8-8120-8c551ddfb126
zebra6/polecat
top_170/12_int_to_roman.cpp
/* Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. */ #include <stdlib.h> #include <stdio.h> #include <string> using std::string; void convert_to_roman( int val ); /****************************************************************************** ***...
ALGO
0.998554
4.673155
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2014-09-27T18:09: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": "8f8faca1f...
a6d0246a-f3ca-4c3e-b259-c77047cf3cb8
91month/Data-structure
算法三-简单排序.cpp
//算法8.1 直接插入排序 #include <iostream> #include<stdlib.h> #include<stdio.h> using namespace std; #define MAXSIZE 20 //顺序表的最大长度 typedef struct { int key; //排序关键字 char *otherinfo; //其他数据项,可无 }ElemType; //顺序表的存储结构 typedef struct { ElemType *r; //存储空间的基地址 int length; ...
ALGO
0.999905
3.925418
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-01-25T11: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": "3905687113...
56fe5d90-f7a8-4cb6-8459-109c6c328e51
MinovskySociety/GUNDAM
include/gundam/tool/topological/path/is_path.h
#ifndef _GUNDAM_IS_PATH_H #define _GUNDAM_IS_PATH_H #include "gundam/type_getter/vertex_handle.h" namespace GUNDAM { // ####################### // ## can be optmized ## // ####################### // // if the input graph is a path, return the // the two end vertexes ([src_handle, dst_handle] if bidirectional ...
ALGO
0.994701
5.597279
{ "github_metadata": { "branch": "main", "commit_count": 802, "repo_created_at": "2021-01-21T20:47:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1be7ed0f297...
baeb3846-7524-4d01-ae60-d523e7d0b7b9
theVeryPulse/CPP
cpp08/ex01/Span.hpp
#pragma once #ifndef SPAN_HPP #define SPAN_HPP #include <vector> #include <algorithm> #include <stdexcept> #include <cstddef> #include <climits> #include <cmath> class Span { public: //--------------- Types: Classes, Enums, and Aliases (using) --------------- //----------------- Constructors, Assignments, D...
ALGO
0.963219
6.849661
{ "github_metadata": { "branch": "main", "commit_count": 241, "repo_created_at": "2024-03-18T02:56: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": "510b965812...
ec2427ac-d555-4b99-9f50-7d0cb40229d3
Wx1ng/AlgorithmFoundation
Instance3_3_board_split.cpp
#include <iostream> #include <cstring> #include <algorithm> #include <iomanip> using namespace std; int s[9][9]; //每个格子的分数 int sum[9][9]; //(1,1)到(i,j)的矩形分数之和 int res[15][9][9][9][9]; //fun的记录表 int calSum(int x1, int y1, int x2, int y2){ return sum[x2][y2] - sum[x1 - 1][y2] - sum[x2][y1 - 1] + sum[x1 - 1][y1 - 1]; }...
ALGO
0.99975
3.3545
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2017-05-29T11:17:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8401c2b44...
56e57749-4204-4d39-b8af-96fc78500ca4
thecodingwizard/competitive-programming
UVA/UVa 11048 - Automatic Correction of Misspellings.cpp
#include <iostream> #include <string> #include <utility> #include <sstream> #include <algorithm> #include <stack> #include <vector> #include <queue> #include <map> #include <set> #include <bitset> #include <cmath> #include <cstring> #include <iomanip> #include <fstream> #include <cassert> #include <unordered_set> #incl...
ALGO
0.999753
3.584586
{ "github_metadata": { "branch": "master", "commit_count": 946, "repo_created_at": "2018-11-29T17:03:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 83, "forks": 22, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "57df65...
de1fac85-264b-43f5-a30d-f30b4cd9c7df
Benjaminyuan/OS
thread/src/print_2.cpp
#include <pthread.h> #include <sys/types.h> #include <sys/sem.h> #include <signal.h> #include <unistd.h> #include <iostream> #include <stdio.h> #include <fcntl.h> using namespace std; static int a=0; static int b = 0; static int last_get = 1; void P(int semid, int index) { struct sembuf sem; sem.sem_num = index...
ALGO
0.992912
4.016096
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2019-12-03T10:30:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "7b4e1d1b5...
0ecc6f72-fec7-4e19-b06a-2218d91c6fcd
Tahsin716/OnlineJudge
LightOJ/1337 - The Crystal Maze/sol.cpp
#include <bits/stdc++.h> using namespace std; int visited[505][505], ans[505*505]; char grid[505][505]; int M, N, Q; //Quite similar to Guilty Prince problem //run dfs on all possible directions void dfs(int row, int column, int count) { if (row < 0 or column < 0 or row >= N or column >= M or visited[row][column] o...
ALGO
0.999756
4.136489
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2018-03-31T19:25:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2e4afe399...
b7172a2e-c912-4d3e-8a07-6d402268a158
godely/Problems
Spoj/PRHYME.cpp
#include <cstdio> #include <algorithm> #include <cstring> #include <utility> #include <vector> #include <queue> #include <stack> #include <map> #include <iostream> #include <set> #include <cmath> #include <cassert> #include <ctime> #include <string> using namespace std; #define db(x) cout << #x " == " << x << endl //...
ALGO
0.999919
3.274745
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2013-09-18T02:43:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "108a77340f...
aab34d81-dbc1-49d6-9cf8-c955411b3355
Ahmed-Saayed/Compititve-Programming
Codeforces/1904D2-Set To Max (Hard Version).cpp
#include <bits/stdc++.h> #define ll long long #define tt int tc;cin>>tc;while(tc--){ #define all(v) (v).begin(),(v).end() #define nn cout<<"\n" using namespace std; void Ahmed_Sayed(){ ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); } int seg[(ll)1e6]; void bul(int node,int l,int r,int x[]){ if(l==r){ ...
ALGO
0.99999
3.463331
{ "github_metadata": { "branch": "master", "commit_count": 409, "repo_created_at": "2024-10-02T12:19:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a7ef2b1c...
a736ffd3-09a9-4d09-9b77-f0c9981cfe72
vaibhav1865/Leetcode-During-Placement-2022
95.unique-binary-search-trees-ii.cpp
/* * @lc app=leetcode id=95 lang=cpp * * [95] Unique Binary Search Trees II */ // @lc code=start /** * 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)...
ALGO
0.999986
6.945665
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-08-24T12:05: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": "c470504b3f0...
6cdd7fe1-1e25-411b-b24a-e3764ee93eea
babayaga-13/Competitive-Programming
CODEFORCES/div.2/B_Getting_Zero.cpp
#include <bits/stdc++.h> #define ll long long #define endl "\n" #define yes cout << "YES" << endl #define no cout << "NO" << endl #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; template <typename T> using pbds = tree<T, null_type, less<T...
ALGO
0.999979
4.249362
{ "github_metadata": { "branch": "main", "commit_count": 207, "repo_created_at": "2024-09-13T09:17: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": "630695b207...
161eb286-b308-426d-b5ae-f282d0204fb7
strath-ace/smart-astro
src/Astrodynamics/dearth_semianalytical.cpp
/* 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/. */ /* -------Copyright (C) 2018 University of Strathclyde and Authors------- --------- Author: <NAME> (GitHub: Serrof)...
ALGO
0.999575
6.236681
{ "github_metadata": { "branch": "opensource_release", "commit_count": 68, "repo_created_at": "2018-02-21T18:48:47.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 1, "issues": 3, "pull_requests": 2 }, "file_meta": { "content_id":...
576401d6-9126-4aa3-833b-30354c254d20
bj-jiwrajka/Strivers-SDE-Sheet-Challenge
0021-merge-two-sorted-lists/0021-merge-two-sorted-lists.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* mergeTwoLis...
ALGO
0.999966
5.768279
{ "github_metadata": { "branch": "main", "commit_count": 182, "repo_created_at": "2023-06-10T07:09: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": "b511c44627...
6729474f-85c6-4cab-bb5e-d6c07213efa0
af-orozcog/miscellaneous
CPalgo/segmentTree/474F.cpp
// Is love even real? #include<bits/stdc++.h> using namespace std; #define pb push_back #define ff first #define ss second #define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); } void err(istream_iterator<string> i...
ALGO
0.999946
4.167129
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2022-08-08T02:35: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": "3d44035cbe...
9636248a-11ed-41fe-a3ba-7b480f994d23
jatinkartik/programming
DSA/5. Array/5_26_majority.cpp
#include <bits/stdc++.h> using namespace std; int majorityElement(int arr[], int n) { int count = 1; int res = 0; for (int i = 1; i < n; i++) { if (arr[res] == arr[i]) { count++; } else { count--; } if (count == 0) {...
ALGO
0.999953
5.088154
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-08-22T17:02: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": "d7d0cc5a6da3...
9428fda0-0d11-4f17-ae28-66f428ab7e9c
aurimasbachanovicius/viko
ModularProgramming/TrecSav/antra_uzd.cpp
#include <iostream> using namespace std; int main() { int n = 0; cout << "Iveskite N: ", cin >> n; int mas[n]; for (int i = 0; i < n; i++) { cout << "Skaicius: ", cin >> mas[i]; } int min = INT32_MAX, max = INT32_MIN; for (int i = 0; i < n; i++) { if (mas[i] < min) { mi...
ALGO
0.999612
3.543627
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2018-10-22T15:30: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": "11ac91b2b...
70cc831a-aed8-46a6-b95a-c867b769431a
gaoyakun/atom3d
src/geometry/PolygonBody.cpp
#include <limits> #include "Line.h" #include "Plane_ext.h" #include "PolygonBody.h" //#include "../Qhull/source/include/cpp/qhull.h" //#include "../Qhull/source/include/cpp/QhullFacetList.h" //#include "../Qhull/source/include/cpp/QhullVertexSet.h" #include "dbghlp/logger.h" //======================================...
ALGO
0.924352
5.116529
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2016-04-15T14:46:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "12e632b72...
a0d550e2-8755-441c-898d-f4ce4db2f3d0
NekoMio/ACMcode
Codes/HZOI/2018-4-4/buy.cpp
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; inline int read() { int x=0,f=1;char ch=getchar(); while (ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();} while (ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();} return x*f; } const int MAXN = 15; int c[MAXN], n, m, k, cnt; int ...
ALGO
0.999991
4.065073
{ "github_metadata": { "branch": "master", "commit_count": 122, "repo_created_at": "2017-07-14T23:35:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c4b75117...
febb61ac-e06c-4be5-b5c3-361b365e1828
hahnlab/CAFE5
src/cafexp.cpp
#include <map> #include <random> #include <algorithm> #include <fstream> #ifdef _OPENMP #include <omp.h> #endif #include <getopt.h> #include "execute.h" #include "simulator.h" #include "user_data.h" #include "root_equilibrium_distribution.h" #include "core.h" #include "easylogging++.h" using namespace std; inp...
ALGO
0.997899
5.909248
{ "github_metadata": { "branch": "master", "commit_count": 621, "repo_created_at": "2018-09-06T13:03:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 134, "forks": 25, "issues": 6, "pull_requests": 0 }, "file_meta": { "content_id": "e108c2...
49845338-bc65-41b9-8fe5-8dc6f7ba8686
liyunghao/My-LeetCode
Problems/0092/solution.cpp
/* * Author: liyunghao<<EMAIL>> * Problem Link: https://leetcode.com/problems/reverse-linked-list-ii/ * Runtime: 5ms * language: C++ */ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), ...
ALGO
0.999999
5.751485
{ "github_metadata": { "branch": "master", "commit_count": 93, "repo_created_at": "2022-05-17T07:02:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7ef096ad4...
32201cfe-66fd-4440-81fb-fd32a2618a6e
heeseokjung/boj
boj_2629.cpp
#include <cstdio> #include <vector> using namespace std; int N, M; bool cache[31][15001]; void dp(int pos, int weight, vector<int>& v) { if(pos == N) { cache[pos][weight] = true; return; } if(cache[pos][weight]) { return; } cache[pos][weight] = true; dp(pos + 1, weight ...
ALGO
0.999961
3.364784
{ "github_metadata": { "branch": "master", "commit_count": 484, "repo_created_at": "2019-03-22T18:34: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": "904ded7d...
d40f6a7a-010f-4022-ae6e-8c49537a72f3
ishandutta2007/codeforces-h
hank55663/normal/975/E.cpp
#include<bits/stdc++.h> #define pdd pair<long double,long double> #define pb push_back #define mp make_pair #define pii pair<int,int> #define LL long long #define y second #define x first #define pi acos(-1) #define pi2 (2*pi) using namespace std; pdd operator+(const pdd &a,const pdd &b){ return {a.x+b.x,a.y+b.y}; } p...
ALGO
0.999928
3.686188
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T02:01:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "be7b30160b29...
17e09fa9-5eab-42af-8e9d-662293287a61
ShenYueling56/SweepRobot
Examples/detection/main_direction_detecton.cpp
// // Created by shenyl on 2020/10/29. // #include "detection/main_direction_detector.h" #include <fstream> #include <unistd.h> using namespace std; void LoadImages(const string &strSequence, vector<string> &vstrImageFilenamesLeft, vector<string> &vstrImageFilenamesRight, vector<double> &vTimestamps); vo...
DATA
0.928357
4.307174
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-03-03T05:55:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5da6d19959a0...
cacfc770-7a44-4fcd-af1a-85f047c28867
mbenneticha/C-plus-plus
00Introductory/Find_Min_Max/minmax.cpp
/***************************************** * Program: minmax.cpp * Author:<NAME> * Date: 7/7/15 * Description: This is an interactive program that asks the user how many * integer values they want to enter. Then the program asks the user to * enter the specified amount of integers. Finally, the program will print...
ALGO
0.985828
4.374518
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-08-30T14:57: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": "4c867b7665...
04660936-0686-4d68-8520-1d01092a4108
andylee-ca/CCPS613-Algorithms
lab3/lab3.cpp
// <NAME> - 500163559 // CCPS 616 - Lab 3 #include <iostream> #include <math.h> #include <chrono> #include <fstream> #include <random> #include <cstring> #include <sstream> #include <string> #include <climits> using namespace std; using namespace std::chrono; void printMatrix(int **arr, int size) { cout << "*** ...
ALGO
0.999884
4.353786
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-05-10T21:45: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": "197c85494a4b...