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
8d89e256-bd3b-415d-badd-4e3ba1f0725b
NVIDIA/cuda-samples
Samples/5_Domain_Specific/Mandelbrot/Mandelbrot_gold.cpp
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of condi...
ALGO
0.992541
5.729929
{ "github_metadata": { "branch": "master", "commit_count": 376, "repo_created_at": "2018-03-27T17:36:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 7763, "forks": 2076, "issues": 55, "pull_requests": 29 }, "file_meta": { "content_id": "c...
5d81fdf8-4d18-48f0-9f14-55edbe4be684
Daksh-0/DSA
DoubleLL.cpp
#include<iostream> using namespace std; class Node{ public: int data; Node *prev; Node *next; Node(int d){ this->data= d; this->prev=NULL; this->next=NULL; } }; // Printing elements of the linked list void print(Node *head){ Node *temp= head; while(temp!=NULL...
ALGO
0.999807
5.145076
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-09-16T15:23: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": "1d3add89d0e2...
c4a57068-38cc-439d-9802-62f174ac38a7
wisdompeak/LeetCode
Tree/742.Closest-Leaf-in-a-Binary-Tree/742.Closest-Leaf-in-a-Binary-Tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { unordered_map<TreeNode*,int>Dist2Leaf; unordered_map<TreeNode*,int>ClosestLeaf; int dist=INT_MA...
ALGO
0.999996
5.599733
{ "github_metadata": { "branch": "master", "commit_count": 8912, "repo_created_at": "2017-03-01T10:30:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6018, "forks": 1314, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "4...
ec54d8f8-4cbc-4ad5-8fd7-7752f44b4f75
JuanPabloRN30/Competitive_Programming
UvaOnlineJudge/978.cpp
#include <iostream> #include <set> #include <queue> #include <stdio.h> using namespace std; int main() { int n,b,sg,sb,value,cont; int casos = 0; scanf("%d",&n); while( n-- ) { if( casos ) printf("\n"); casos++; scanf("%d%d%d",&b,&sg,&sb); multiset < int > green,blu...
ALGO
0.999215
3.44924
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2016-08-21T17:34: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": "dfc0eb1b53...
21e86131-2c87-43de-94bd-37b1436e4b19
uncle-lu/surf-the-internet
luogu/2573.cpp
#include <cstdio> #include <cstring> #include <algorithm> const int N = 1e5 + 10, M = 1e6 * 2 + 10; struct node { int v, next, val; }edge[M]; struct e { // 从1开始可以枚举到的所有边 int u, v, val; }E[M]; int n, m, cnt, num, ans, head[N], h[N], fa[N]; bool vis[N]; int find_father(int x){ return fa[x] == x ? x : fa[x] ...
ALGO
0.999988
3.734569
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2025-07-05T06:55:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "23b761270d66...
c49bd464-af68-4aec-94e4-93c13a2a44a4
hoangnv2810/Algorithm
ChiaVaTri/TestChiDeTri.cpp
#include<bits/stdc++.h> using namespace std; // Luy Thuy int mod = 1e9+7; int main(){ int t; cin >> t; while(t--){ long long n, k; cin >> n >> k; long long res = 1; while(k != 0){ if(k%2 == 1){ res = (res*n)%mod; } n = (n*n...
ALGO
0.999878
4.531191
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-09-28T11:24:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "61a63cc90909...
f2b295ae-261b-4b8a-be79-53e4139cf9ae
egeustunel/C-Double-Linked-List
assignment3.cpp
#include<cstdlib> #include <iostream> #include <fstream> #include <sstream> #include <vector> #include <algorithm> using namespace std; struct Goal{ string away; int minute; int matchID; Goal *prev = NULL; Goal *next = NULL; }; struct Footballer{ string name; string team; Goal *GoalHe...
TOOL
0.976704
4.187913
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-04-08T19:12: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": "098737513f...
c36be3a2-e82c-4132-9549-8e4c33809a80
YuanzhongLi/CompetitiveProgramming
Codeforces/div3/598/c.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i,s,n) for (int i = (int)s; i < (int)n; i++) #define ll long long #define pb push_back #define All(x) x.begin(), x.end() #define Range(x, i, j) x.begin() + i, x.begin() + j #define lbidx(x, y) lower_bound(x.begin(), x.end(), y) - x.begin() #define ubidx(x, y) u...
ALGO
0.999996
3.197047
{ "github_metadata": { "branch": "master", "commit_count": 206, "repo_created_at": "2020-03-23T13:46: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": "6eaadd1f...
3a29bd9c-018a-4020-b884-82651b870eb1
WorkingRobot/OodleUE
Engine/Source/Runtime/OodleDataCompression/Sdks/2.9.5/src/oodle2/core/newlz_shared.cpp
// Copyright Epic Games, Inc. All Rights Reserved. // This source file is licensed solely to users who have // accepted a valid Unreal Engine license agreement // (see e.g., https://www.unrealengine.com/eula), and use // of this source file is governed by such agreement. #include "newlz_shared.h" #include "newlz_spee...
ALGO
0.987479
5.1018
{ "github_metadata": { "branch": "main", "commit_count": 163, "repo_created_at": "2023-01-18T06:19:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 97, "forks": 19, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0d02ee6f...
47f0517e-f4a5-4e0a-9af5-6597a6ce6257
Ghurfa/DataStructuresAndAlgs
cpp/SinglyLinkedList/SinglyLinkedList/Source.cpp
#include <iostream> #include <memory> #include "SinglyLinkedList.h" using namespace std; int main() { int option = 0; SinglyLinkedList<int> list; cout << "Options: " << endl << "0. Add" << endl << "1. AddAt" << endl << "2. Remove Value" << endl << "3. Remove At Index" << endl << "4. Contains" << endl << ...
TOOL
0.941407
5.215126
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2020-07-06T23: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": "acfb7b100...
4aa6dfd9-7aab-43cd-b6cb-a93040abd935
ganyao114/SwiftHorizon
source/externals/libvapours/source/crypto/impl/crypto_bignum_operations.cpp
/* * Copyright (c) Atmosphère-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT *...
ALGO
0.996505
7.414577
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2023-08-15T09:58:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a8d0b0f17...
974be97e-e806-4797-984d-669c29941800
finger563/unreal-space-program
Plugins/JSBSimFlightDynamicsModel/Source/ThirdParty/JSBSim/Include/initialization/FGTrimmer.h
/* * FGTrimmer.h * Copyright (C) <NAME> 2010 <<EMAIL>> * * FGTrimmer.h 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, either version 2 of the License, or * (at your option) any later version. *...
ALGO
0.999804
6.499438
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-08-02T15:27:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "779d7c3200...
e3c4d02d-c3c0-4ae9-87ba-6846ae285bc7
zhu-he/ACM-Source
tc/BearCries.cpp
#line 7 "BearCries.cpp" #include <cstdlib> #include <cctype> #include <cstring> #include <cstdio> #include <cmath> #include <algorithm> #include <vector> #include <string> #include <iostream> #include <sstream> #include <map> #include <set> #include <queue> #include <stack> #include <fstream> #include <numeric> #includ...
ALGO
0.999972
3.57972
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2015-04-06T06:52: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": "af9e194dd...
287b6b4b-886a-44d2-99cd-e5089afdfc0a
Samrat-Bhardwaj/1-1
LinkedList/questions.cpp
#include<priority_queue> 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) {} }; // always write base case -> if there is 0 or 1 node in the whole linked list Li...
ALGO
0.999502
4.733575
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2022-07-09T08:24:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3989b012531...
94cc6669-85d2-4970-8c09-775e46967581
nmhienbn/Competitive-Programming
Mr.Hieu/21.1.2022/partition/partition.cpp
#include <bits/stdc++.h> #define fi(i, a, b) for(int i = (a), _b = (b); i <= _b; i++) #define fid(i, a, b) for(int i = (a), _b = (b); i >= _b; i--) #define gb(x, i) (((x) >> (i)) & 1) #define pii pair<int,int> #define pb push_back #define ll long long #define Irelia "partition" const int maxn = 50005; using namespace s...
ALGO
0.999722
3.466811
{ "github_metadata": { "branch": "main", "commit_count": 74, "repo_created_at": "2023-02-11T14:40:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "16bcc112612...
ed6632b6-abba-43ad-a1b9-91adaee88860
harumoren2507/my_practice
c_practice/bit_calculation.cpp
#include <iostream> using namespace std; int main () { int a, b; a = 0; b = 0; cin >> a >> b; cout << (a & b) << endl; cout << (a | b) << endl; cout << (a ^ b) << endl; return 0; } /* このプログラムでバグる理由を調べたい 以下のように出る。 : /usr/bin/ld: /tmp/cctjvMbT.o: warning: relocation against `_ZSt4cout' in read-only...
ALGO
0.99932
3.680284
{ "github_metadata": { "branch": "main", "commit_count": 51, "repo_created_at": "2024-07-22T10:21:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1d9dbc8ba7f...
77767bb6-66b8-419a-b6a0-79114a0805c7
Abhishek-Balaji/CarND-PID-Control-Project
src/PID.cpp
#include "PID.h" /** * TODO: Complete the PID class. You may add any additional desired functions. */ PID::PID() {} PID::~PID() {} void PID::Init(double Kp_, double Ki_, double Kd_) { /* * Initialize PID controller with the coefficients as the input values. * Note that the inputs to the function need differ...
ALGO
0.927226
6.170027
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2019-09-08T05:49:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6c519581e...
318be86c-2acd-4c80-8c0d-6b07683d5bd2
moinak878/SegTree
cses_StaticRangeSumQueries.cpp
#include<bits/stdc++.h> #define ll long long using namespace std; vector<ll> tree; ll sum(int node , int a , int b , int node_left , int node_right){ //cout <<" -->sum (" << node << "," << a<<","<<b<<","<<node_left<<","<<node_right<<")" << endl; if(a<=node_left && node_right<=b) return tree[node];...
ALGO
0.999953
4.386268
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2021-07-06T07:13: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": "dbd098a62b17...
d7977eed-f42f-42cf-8391-4683ba0eb721
LinNego/algorithm_of_exmaple
ch6/UVa122.cpp
//UVa122.cpp //Greatljc #include <cstdio> #include <string> #include <queue> #include <sstream> #include <iostream> using namespace std; struct Node { bool h; Node *left, *right; int value; Node(): h(0), left(nullptr), right(nullptr), \ value(value) {} }; Node *root; void test_input(int v, string s) { cout <<...
ALGO
0.999713
3.702038
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2020-01-10T08:01: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": "c7ff72879...
a211166e-935e-482b-b013-19d48d7fa96b
Vaibhav026/Competitive-Coding
A2oj Ladder/359D.cpp
#include <bits/stdc++.h> using namespace std; long int n; /* Template file for Online Algorithmic Competitions */ /* Typedefs */ /* Basic types */ typedef long long ll; typedef long double ld; typedef unsigned long long ull; /* STL containers */ typedef vector <int> vi; ...
ALGO
0.999953
3.459029
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2018-04-04T17:40: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": "f273e9474...
ab0f2f4f-2018-4697-83ae-1fce09104616
kamil-wojcieszak/sorting_algorithms
src/Array/Array.cpp
// // Created by kamil on 20.03.2023. // #include <string> #include <iostream> #include <fstream> #include <iterator> #include"Array.h" #include "../lib/Random/random.hpp" #include "Sorts/InsertionSort/InsertionSort.h" // get base random alias which is auto seeded and has static API and internal state using Random = ...
TOOL
0.972934
4.626616
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-03-20T09:02: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": "f33415c25f12...
12ae9af7-0ad7-47ae-8f9b-4eb246c3cf09
StarRocks/starrocks
be/src/storage/index/vector/tenann_index_reader.cpp
// Copyright 2021-present StarRocks, Inc. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required ...
ALGO
0.92689
6.71146
{ "github_metadata": { "branch": "main", "commit_count": 21361, "repo_created_at": "2021-09-04T02:29:35.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 10338, "forks": 2050, "issues": 499, "pull_requests": 376 }, "file_meta": { "content_id":...
0eca46da-4592-4417-a821-a3fb5d213cd7
krishna14kant/Data-Structures-
C++/Sieve_Of_Eratosthenes.cpp
#include <iostream> using namespace std; int main() { int n; cin >> n; int arr[n + 1] = {1}; for (int i = 0; i <= n; i++) arr[i] = 1; arr[1] = 0; arr[0] = 0; for (int i = 2; i * i <= n; i++) { if (arr[i] == 1) { for (int j = i * i; j <= n; j += i) { ...
ALGO
0.999959
4.365131
{ "github_metadata": { "branch": "master", "commit_count": 837, "repo_created_at": "2020-07-21T19:46:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 45, "forks": 472, "issues": 27, "pull_requests": 80 }, "file_meta": { "content_id": "330...
5b4069e0-fa9e-47b8-a826-74c88f998bff
ttzztztz/leetcodeAlgorithms
动态规划/Lintcode 257. Longest String Chai.cpp
class Solution { public: /** * @param words: the list of word. * @return: the length of the longest string chain. */ int longestStrChain(vector<string> &words) { for (const string& w : words) { const int len = w.size(); if (all.size() <= len) all.resize(len + 1); ...
ALGO
0.999976
5.489006
{ "github_metadata": { "branch": "master", "commit_count": 872, "repo_created_at": "2019-09-03T06:57:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "48b6cfb...
e495ba02-1f48-459a-806b-fb0212d350b9
itohdak/AtCoder
others/asakatsu/2020-08-09/E.cpp
#include <bits/stdc++.h> #include "/home/itohdak/AtCoder/000/print.hpp" using namespace std; #define ll long long #define ld long double #define REP(i,m,n) for(int i=(int)(m); i<(int)(n); i++) #define rep(i,n) REP(i,0,n) #define RREP(i,m,n) for(int i=(int)(m); i>=(int)(n); i--) #define rrep(i,n) RREP(i,n-1,0) #define a...
ALGO
0.999943
3.613131
{ "github_metadata": { "branch": "master", "commit_count": 172, "repo_created_at": "2018-05-20T09:26:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "c4680240...
5c0c58cb-3319-4df6-a843-d00bde1bd5f7
JorgeLuizFranco/CompetitiveProgramming
exer_cpp/URI_problems/estradasEscuras.cpp
#include<bits/stdc++.h> #define _ ios_base::sync_with_stdio(0); #define pb push_back #define fs first #define pq priority_queue #define sc second #define ub upper_bound #define print(x) for(int wx=0; wx<sz(x); wx++) cout<< x[wx]<< ' '; #define lb lower_bound #define ll long long #define str(x) to_string(x) #define sz(x...
ALGO
0.999985
3.691453
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-07-23T14:45: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": "70b59b9a72...
89267206-3f62-4b6b-a3d8-869e2452de1c
davidabril01/Proyects
Ingenieria Informatica Proyectos y Actividades/Algoritmos y Estructuras de Datos 1/listas/listas2.cpp
#include <iostream> using namespace std; class nodo { private: int dato; nodo *puntero; public: void setdato(int d) { dato = d; } int getdato() { return dato; } void setpuntero(nodo *p) { puntero = p; } nodo *getpuntero() { return puntero; } }; class listas { private: nodo *raiz; nodo...
ALGO
0.99865
3.79634
{ "github_metadata": { "branch": "main", "commit_count": 61, "repo_created_at": "2023-08-16T01:12: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": "7b8411ab835...
ac249095-75dd-4af9-acc7-71369fe00ae0
SethRobinson/proton
shared/ClanLib-2.0/Sources/API/Core/Math/line_segment.h
/* ** ClanLib SDK ** Copyright (c) 1997-2010 The ClanLib Team ** ** This software is provided 'as-is', without any express or implied ** warranty. In no event will the authors be held liable for any damages ** arising from the use of this software. ** ** Permission is granted to anyone to use this software for a...
ALGO
0.974833
6.773887
{ "github_metadata": { "branch": "master", "commit_count": 150, "repo_created_at": "2018-07-25T05:55:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 92, "forks": 16, "issues": 2, "pull_requests": 1 }, "file_meta": { "content_id": "a03e76...
0194d42d-8b30-4ccf-b88d-d92aec19c28d
dotnet/wpf
src/Microsoft.DotNet.Wpf/src/WpfGfx/core/geometry/BezierD.cpp
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. //+----------------------------------------------------------------------------- // // // $TAG ENGR // $Mod...
ALGO
0.984106
6.969741
{ "github_metadata": { "branch": "main", "commit_count": 6436, "repo_created_at": "2018-10-19T01:55:23.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 7391, "forks": 1216, "issues": 1307, "pull_requests": 190 }, "file_meta": { "content_id": ...
6772aa6d-c104-4594-93c1-a826f0c04513
eduardorasgado/CppZerotoAdvance2018
advanced/Genericidad/orderWithTemplate/Ordenar.h
#pragma once #include <iostream> #include <cmath> template <typename T1> void intercambio(T1& x, T1& y) { T1 aux; aux = x; x = y; y = aux; } template <typename T> void orderShellArray(T* list, int N, int operation) // operation 1 = up, 0 = down { // sorted:flag para saber si se ordenaron todos en ...
ALGO
0.99956
5.035707
{ "github_metadata": { "branch": "master", "commit_count": 365, "repo_created_at": "2018-09-02T20:40: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": "fef23338...
1f63ba9a-21f6-400a-a594-b09b2bf41003
dsc-sookmyung/2020-Algorithm-study
03-Stack/ninano/B-10828.cpp
//스택 #include <iostream> #include <string.h> #include <vector> using namespace std; vector<int> v; bool Empty() { return v.empty(); } void Push(int _data) { v.push_back(_data); } void Top() { if (!Empty()) { cout << v.back() << "\n"; } else { cout << "-1\n"; } } voi...
ALGO
0.998983
3.993616
{ "github_metadata": { "branch": "main", "commit_count": 111, "repo_created_at": "2020-10-04T11:31:23.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9cf2b82acd0...
0d63b002-1879-4b89-81e6-2f833379d1e9
CristianCazares/CompetitiveProgramming
2Graphs/Team/party.cpp
// Los Chentes // ┌─┐ // ┴─┴ // ಠ_ಠ #include <bits/stdc++.h> using namespace std; typedef long double ld; typedef long long int lli; typedef pair<lli, lli> pii; typedef vector<lli> vi; #define endl '\n' #define fi first #define se second #define pb push_back #define sz(s) lli(s.size()) #define all(s) begin(s), ...
ALGO
0.999807
3.612074
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2022-10-25T16:08: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": "c21203ece1c...
62873a0a-d383-4949-8c0e-46128d858c1e
realAYAYA/UnrealEngine-ToonLit
UnrealEngine/Engine/Plugins/Runtime/GeometryProcessing/Source/GeometryAlgorithms/Private/ThirdParty/GTEngine/Mathematics/GteIntrHalfspace3Ellipsoid3.h
// <NAME>, Geometric Tools, Redmond WA 98052 // Copyright (c) 1998-2019 // Distributed under the Boost Software License, Version 1.0. // http://www.boost.org/LICENSE_1_0.txt // http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt // File Version: 3.0.1 (2018/10/05) #pragma once #include <ThirdParty/GTEngine/Ma...
ALGO
0.995806
7.51966
{ "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": "a2c42d682f...
3c1903e9-a82c-43ac-a530-e5551fb45c5f
FalconUA/system-programming
l2/automata.h
#ifndef __FINITE_AUTOMATA_H__ #define __FINITE_AUTOMATA_H__ #include <map> #include <vector> #include <stack> #include <iostream> #include <fstream> #include <sstream> #include <boost/dynamic_bitset.hpp> #include "additional.h" namespace __check_operator_existance { struct no_eq {}; struct no_lt {}; struct no_pp {...
ALGO
0.988078
4.936371
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2016-12-21T07:01: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": "81ac0feba9...
9421de0a-6aca-4833-ab7e-521c255217c2
lsils/mockturtle
include/mockturtle/algorithms/node_resynthesis/xag_minmc.hpp
/* mockturtle: C++ logic network library * Copyright (C) 2018-2022 EPFL * * 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...
ALGO
0.991484
4.030406
{ "github_metadata": { "branch": "master", "commit_count": 828, "repo_created_at": "2018-04-25T12:15:49.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 240, "forks": 150, "issues": 9, "pull_requests": 2 }, "file_meta": { "content_id": "3de4a...
a855abe6-c412-49a1-ad17-b09764332c2a
amsraman/Competitive_Programming
15-295/F21/Contest 10/E.cpp
#include <bits/stdc++.h> using namespace std; int n, m, k, mt[100000], state[100000], id[27 * 27 * 27 * 27]; string p[100000], w[100000]; vector<int> g[100000], topo; bool cyc; int ltoi(char x) { if(x == '_') { return 0; } return (x - 'a' + 1); } int conv(string x) { int ret = 0; for(cha...
ALGO
0.999995
3.787827
{ "github_metadata": { "branch": "master", "commit_count": 413, "repo_created_at": "2019-03-04T14:45:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bba35cde...
1f68ff61-b3ae-4292-8e76-9ed4bea3d2d7
radiasoft/mlopal
ippl/src/FFT/fftpack_FFT.h
// // IPPL FFT // // Copyright (c) 2008-2018 // <NAME> Institut, Villigen PSI, Switzerland // All rights reserved. // // OPAL is licensed under GNU GPL version 3. // /* Prototypes for accessing Fortran 1D FFT routines from Netlib, and definitions for templated class FFTPACK, which acts as an FFT engine for the F...
ALGO
0.954382
6.793028
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-05-21T16:38:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0632938abd51a...
0943692c-b996-4264-9736-68fab848ce7a
Sameerkhan9412/DSA-learning
02_Searching/14_K-Diff_Pair_In_An_Array.cpp
class Solution { public: int binarySearch(vector<int> &nums,int start,int x){ int end=nums.size(); int mid=start+(end-start)/2; while(start<=end){ if(nums[mid]==x){ return mid; } else if(x>nums[mid]){ start=mid+1; ...
ALGO
0.99991
5.923923
{ "github_metadata": { "branch": "main", "commit_count": 48, "repo_created_at": "2024-07-23T04:29:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d931af2d1e4...
7bd54627-c66f-4236-b970-0d557c7546a4
badburrito24/COSC-2436
lab2/linkedList.h
#ifndef LINKED_LIST #define LINKED_LIST #include <string> #include <iostream> #include <fstream> using namespace std; template <typename T> struct node { T data; node<T>* next; }; template <typename T> class linkedList { private: node<T>* head; public: linkedList() { head = nullptr;}; bool isEmpty() {re...
ALGO
0.964988
4.153594
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-07-10T22:30: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": "a5418c0de12d...
4ea21a6c-31ea-4ba8-9056-9cd0d373a235
mmosky/acmCodes
csp/17-09-5.cpp
#include <cstdio> #include <algorithm> #include <cmath> #define lowbit(x) (x&(-x)) using namespace std; int n, m, num[100005]; long long f[100005]; int getint() { int x = 0; char c = getchar(); while(c < '0' || c > '9') c = getchar(); while(c <= '9' && c >= '0') x = x*10+c-48, c = getchar(); retur...
ALGO
0.999964
3.747043
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2018-02-18T15:52: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": "f80695edb...
41165215-381e-4fb0-8dae-ebdbe679a2d1
We1chJ/CP-CPP
CCC/searchingForStrings.cpp
#include "bits/stdc++.h" using namespace std; using ll = long long; const ll P = 29, M1 = 1e9+7, M2 = 1e9+9; int freq1[26], freq2[26]; string s1, s2; int main(){ cin.tie(0) -> sync_with_stdio(0); cin >> s1 >> s2; if(s1.length() > s2.length()){ cout << 0 << endl; return 0;} set<pair<ll, ll>> s; ...
ALGO
0.999988
4.56968
{ "github_metadata": { "branch": "main", "commit_count": 139, "repo_created_at": "2022-01-04T01:22: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": "5a8f940af9...
38edb86c-2be2-466d-921a-cb082ae598c1
UIT-Together-2022-Team-Nobita/Recursion-CPP
Bai095-Tien/Bai095-Tien.cpp
#include <iostream> #include <iomanip> using namespace std; void Input(int[], int&); int EvenValCount(int[], int); void Output(int[], int); int main() { cout << "Problem 095 - <NAME> - 22521474" << endl; int n = 0; while (n <= 0) { cout << "\nEnter n: "; cin >> n; } int* arr = new int[n]; Input(arr, n); ...
ALGO
0.983538
5.101412
{ "github_metadata": { "branch": "main", "commit_count": 87, "repo_created_at": "2023-04-12T04:59:17.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "35c76de615f7...
9af54ca8-0ab9-4941-8c43-c73d81c028c4
walkccc/LeetCode
solutions/656. Coin Path/656-2.cpp
class Solution { public: vector<int> cheapestJump(vector<int>& coins, int maxJump) { if (coins.back() == -1) return {}; const int n = coins.size(); // dp[i] := the minimum cost to jump from i to n - 1 vector<int> dp(n, INT_MAX); vector<int> next(n, -1); dp.back() = coins.back(); ...
ALGO
0.999993
5.756824
{ "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": "58639b8...
7e7513c5-9d51-413a-a272-38d3f907451e
ayushshukla92/algorithms
programming/HackerRank/sap/a.cpp
#include <iostream> #include <queue> #include <algorithm> #include <climits> #include <string> #include <cstdlib> #include <sstream> #include <cmath> #include <cctype> #include <iomanip> #include <cstdio> #include <list> #include <stack> #include <vector> #include <map> #include <unordered_map> #include <set> #include ...
ALGO
0.999823
4.067571
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2015-10-27T07:41: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": "baff125e4a...
5a20571d-a4a9-463b-b5f3-8338c1e41ee7
ilyademo/Final-project
Final project.cpp
#include <iostream> #include <map> #include <set> #include <sstream> #include <iomanip> #include <string> using namespace std; class Date { public: Date(){} Date(const int& y, const int& m, const int& d){ year = y; if (m < 1 || m > 12){ throw invalid_argument("Month value is invalid: " + to_string(m)); } ...
TOOL
0.986091
4.837018
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-04-06T21:17: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": "13c38710a76f...
bf11d024-2220-4da6-8e0b-5a1dfb9f6b91
Mu-L/TracerInteractiveUE4Plugins
Engine/Plugins/Experimental/GeometryProcessing/Source/GeometryAlgorithms/Public/MinVolumeBox3.h
// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "VectorTypes.h" #include "OrientedBoxTypes.h" #include "Templates/PimplPtr.h" template <typename RealType> struct TMinVolumeBox3Internal; /** * Calculate a Minimal-Volume Oriented Box for a set of 3D points. * This i...
ALGO
0.998901
4.90593
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2020-03-24T02:30:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 11, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "7a56643...
a9e088c1-a11d-48e6-9b2d-0fdc31a134a5
manojsatya/Numerical-Simulation-of-Fluids
ex05/src/FluidSimulator.cc
#include "FluidSimulator.hh" #include "Debug.hh" FluidSimulator::FluidSimulator( const FileReader & conf ):grid_(conf),solver_(conf), gx_{conf.getParameter<real>("GX")}, gy_{conf.getParameter<real>("GY")}, Re_{conf.getParameter<real>("Re")}, gamma_{conf.getParameter<real>("gamma")}, dt_{conf.getParameter<real>...
ALGO
0.997303
4.309451
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2016-02-16T13:43: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": "bf2ae8e77...
023fb1b4-d8b2-441d-b62e-4246cb008fb0
misawa-budg/AtCoder
Archive/Beginners/Beginner250/B.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int N, A, B; cin >> N >> A >> B; vector<vector<char>> grid(N * A, vector<char>(N * B)); for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { for (int k = 0; k < A; ...
ALGO
0.999329
3.720692
{ "github_metadata": { "branch": "main", "commit_count": 263, "repo_created_at": "2025-03-30T04:06:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7f64118e54...
5ea3469e-91b6-4ab3-8305-8b6aeaad1598
snonk/hairsim
assignment_code/common/helpers.cpp
#include "helpers.hpp" namespace GLOO { std::unique_ptr<NormalArray> CalculateNormals(const PositionArray& positions, const IndexArray& indices) { auto normals = make_unique<NormalArray>(positions.size(), glm::vec3(0.0f)); for (size_t i = 0; i < indices.size(); i += 3...
ALGO
0.998457
6.822969
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-01-12T15:57:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d4cb35851bb2...
696f6104-3fda-4a22-892f-15f92406a476
wu-qing-157/Aerial-Ace
Training/1002/L/1.cpp
#include <cstdint> const int tcs = 7; const int tc[tcs] = {2, 3, 5, 7, 11, 13, 17}; int64_t mul(int64_t x, int64_t y, int64_t p) { int64_t t = (x * y - (int64_t) ((long double) x / p * y + 1e-3) * p) % p; return t < 0 ? t + p : t; } int64_t add(int64_t x, int64_t y, int64_t p) { return (0ll + x + y) % p;...
ALGO
0.999305
4.445464
{ "github_metadata": { "branch": "master", "commit_count": 150, "repo_created_at": "2019-07-15T14:46:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "45c4d390...
ab58fa25-32a0-4747-a211-dc5facf4099c
Maniac198/Competitve-Programming
D_Exam_in_MAC.cpp
#include <bits/stdc++.h> using namespace std; #define yes {cout<<"YES"<<endl;} #define no {cout<<"NO"<<endl;} #define int long long #define endl '\n'; #define all(x) x.begin(),x.end() #define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (...
ALGO
0.999868
4.381592
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2023-02-28T11:19: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": "52a267d0b...
9855d577-97a2-44b6-a20c-f7de1267e701
FranciscoKnebel/comparadorAIG
src/aag-reader/aig.cpp
#include "aig.h" #include "util.h" AIGnode::AIGnode() { i0 = -1; i1 = -1; isInput = false; expression = ""; } AIGnode::AIGnode(int param_i0, int param_i1, bool param_isInput, string param_expression) { i0 = param_i0; i1 = param_i1; isInput = param_isInput; expression = param_expression; } AIGnode::AIGnode(co...
ALGO
0.999062
4.627225
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2018-01-20T23:40: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": "f7be05079...
d2ae43b7-1eec-4296-ab64-f80beb9a99e5
LeoMajorR/Placements
LeetCode/BSTDirn.cpp
#include <bits/stdc++.h> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {} }; bool find(TreeNode *root, int val, string &path) ...
ALGO
0.999982
5.518684
{ "github_metadata": { "branch": "master", "commit_count": 82, "repo_created_at": "2022-07-21T07:15: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": "0d4880580...
97dc23a7-18fc-46c7-8b42-07e9e06b6426
coutyou/ArduinoDemos
TwinkleTwinkleLittleStar/toneMelody.ino
/* 曲调 播放一首小曲 电路搭建: * LED连接13号引脚和GND * 矩阵按键连接2号引脚和+5V * 10kΩ电阻连接2号引脚和GND * 8号引脚连接8Ω扬声器 代码是公开的。 */ #include "pitches.h" int melody[]={ /* NOTE_A3,//.6 NOTE_B3,//.7 NOTE_C4,//1 NOTE_C4,//1 NOTE_B3,//.7 NOTE_C4,//1 NOTE_E4,//3 NOTE_B3,//.7 NOTE_...
TOOL
0.980923
4.770195
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2018-06-08T10:38: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": "2e17a4720...
dd40bba9-dc68-4952-afbf-d9d8793d76da
boingboomtschak/opengl-playground
boids-3d.cpp
// boids-3d.cpp : <NAME> #define _USE_MATH_DEFINES #include <glad.h> #define GLFW_INCLUDE_NONE #include <GLFW/glfw3.h> #include <time.h> #include <vector> #include "VecMat.h" #include "Camera.h" #include "Mesh.h" #include "Draw.h" #include "Misc.h" #include "GLXtras.h" #include "dMesh.h" #include "GeomUtils.h" using ...
TOOL
0.962643
4.205389
{ "github_metadata": { "branch": "main", "commit_count": 96, "repo_created_at": "2021-10-28T03:51: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": "1ce45d12938...
02b3fdcd-9e13-43cf-956e-b746faf1b8d4
ishandutta2007/codeforces-b
barichek/normal/1458/E.cpp
#pragma GCC optimize("Ofast", "unroll-loops") //#pragma GCC target("sse", "sse2", "sse3", "ssse3", "sse4", "avx") #ifdef __APPLE__ # include <iostream> # include <cmath> # include <algorithm> # include <stdio.h> # include <cstdint> # include <cstring> # include <string> # include <cstdlib> # include <vector> # includ...
ALGO
0.999934
3.766305
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-11T01:05:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e3858a03a201...
9d080fb8-758f-47db-af9b-964379be72d7
Prathamesh-Chavan-232/problem-solving
archive/gfg/02_rev_in_grp.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; class Solution { public: //Function to reverse every sub-array group of size k. void reverseInGroups(vector<long long> &arr, int n, int k) { int i = 0; int start = 0; int end = k - 1; while (i < 2) { ...
ALGO
0.999955
5.157372
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2023-04-30T11:32:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ae10e0447...
eed01663-6ff5-4dbd-9f37-8cfe38012f4d
DeniSSio123/C-_homework
heap.cpp
#include <iostream> #include <utility> #include <vector> using namespace std; class PriorityQueue{ public: explicit PriorityQueue(vector<int> v2); ~PriorityQueue(); void build_heap(); int pop(); int top(); void push(int value); unsigned int size() { return A.size(); } pr...
ALGO
0.999954
3.656252
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-06-22T20:53: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": "43ae6eb7f8...
c3efa49b-7ab8-4b19-aa06-ef961248edf8
yyc1029/Github
CSES/1083. MissingNumber.cpp
//MissingNumber #include <iostream> #include <vector> #include <algorithm> using namespace std; int findMax(vector<int>v){ int max = v[0]; for(int i = 1; i < v.size(); i++){ if(v[i] > max) max = v[i]; } return max; } int main(){ int n; cin >> n; vector<int>v; for(int i ...
ALGO
0.999839
3.293636
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2025-03-26T01:14: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": "5e60c789d4a...
69478d50-57c6-4129-acc5-72c0b35ce8d3
dongb94/algorithm
kakao/kakao_blind_2019/kakao_2.cpp
#include <string> #include <vector> using namespace std; bool check(string s) { int stack = 0; for (int i = 0; i < s.length(); i++) { if (s[i] == '(') stack++; else stack--; if (stack < 0) return false; } return true; } bool checkBlance(string s) { int stack = 0; for (int i = 0; i < s.length(); i++) { ...
ALGO
0.999862
5.174656
{ "github_metadata": { "branch": "master", "commit_count": 202, "repo_created_at": "2018-08-27T11:13: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": "ce55c247...
396dd0fe-ee6f-44ff-bcc8-8d9a520eff82
ProkopHapala/SimpleSimulationEngine
cpp/common/math/PotentialFlow.h
#ifndef PotentialFlow_h #define PotentialFlow_h /* References: - short overview lif-indced-drag http://aero.stanford.edu/reports/multop/multop.html TODO: - Eliptical span-wise distribution of lift Integral( I(x)*(R x dl)/|R|^2 ) = x*sqrt(L^2-x^2)/(x^2 + a^2) = sqrt(L-x) - arcTgh( ) https://www.wolframalp...
ALGO
0.999629
4.178164
{ "github_metadata": { "branch": "master", "commit_count": 1508, "repo_created_at": "2015-07-31T13:39:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 31, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2c09e3...
d0e4e248-a822-4c27-927f-bb95db3e101b
pawelropa/Solutions-For-Algorithmic-Challanges
998-Kalkulator2/997-Kalkulator/main.cpp
// // main.cpp // 997-Kalkulator // // Created by arafaux on 11-06-18. // Copyright 2011 Studen. All rights reserved. // #include <iostream> #include <cstdio> using namespace std; int main (int argc, const char * argv[]) { // insert code here... int x,y,wynik; char c; int tab[10] = {0}; whil...
ALGO
0.994867
3.638386
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2013-02-13T20:02:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d5ad4dc0cb...
b1db9971-58c0-43f6-8f50-e2f077c239af
Trgtuan10/Applied_Algorithms
CBUS.cpp
#include<bits/stdc++.h> using namespace std; const int MAX_N = 40; int n, k; int a[MAX_N][MAX_N]; int load; bool visited[MAX_N]; int cur; int res; int shortest; int travel[MAX_N]; void input() { cin >> n >> k; shortest = INT_MAX; for (int i = 0; i <= 2 * n; i++) { for (int j = 0; j <= 2 * n; j++)...
ALGO
0.999964
3.615566
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-09-28T13:49: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": "58a6ad9813b2...
aae5b2d7-ba99-4855-87cc-e18765069b4c
kidofcubes/aoc
scratchcards2.cpp
#include <bits/stdc++.h> using namespace std; // === Debug macro starts here === int recur_depth = 0; #ifdef DEBUG #define dbg(x) {++recur_depth; auto x_=x; --recur_depth; cerr<<string(recur_depth, '\t')<<"\e[91m"<<__func__<<":"<<__LINE__<<"\t"<<#x<<" = "<<x_<<"\e[39m"<<endl;} #else #define dbg(x) #endif template<typ...
ALGO
0.987425
3.592373
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2023-12-06T21:49: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": "50fbb99df8...
e10749c8-7c05-45be-adfc-4e991fdbe8f8
usdot-jpo-codehub/Pikalert-Vehicle-Data-Translator-
apps/simulate_probe/process.cc
/** * * @file process.cc * */ // Include files #include <math.h> #include <log/log.hh> #include <libconfig.h++> #include <stdio.h> #include <stdlib.h> #include <fstream> #include <boost/format.hpp> #include <boost/filesystem.hpp> #include "process.hh" #include "vdt4/vdt_climatology_file_reader.hh" #include "vdt4...
DATA
0.951259
5.545355
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2014-10-10T23:05:25.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 2, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "b5db5e0b2d...
569411dc-d59e-44f3-9b0d-619236a2ff7b
Rutwij-Patil/Leetcode
4_Median_of_Two_Sorted_Arrays.cpp
#include <iostream> #include <vector> using namespace std; int main(){ vector <int> a; vector <int> b; int num{0}; int n{0}; int med{0}; int num2{0}; int k{0}; cout<<"Enter size of first array"<<endl; cin >> num; for(int i = 0; i < num ; i++){ cin >> n ; a.push_...
ALGO
0.999979
3.841113
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2021-11-14T04:54:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a4a2ef92a4b0...
7e1007b5-e14f-4f95-acdb-bfe660d8749f
emuemuJP/AtCoder
ABC080/C.cpp
#include <iostream> #include <vector> #include <queue> #include <algorithm> #include <cmath> #include <bitset> #include <iomanip> #include <stack> #include <list> #include <map> #include <unordered_map> #include <chrono> #include <numeric> using namespace std; using ll = long long; const ll INF = (ll)1e18+1; const ll D...
ALGO
0.998964
3.926111
{ "github_metadata": { "branch": "master", "commit_count": 358, "repo_created_at": "2020-03-11T10:53: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": "bbf6e84e...
ecd109b2-898a-4aa8-a7c9-e33db1ace1ad
roxana1708/fundamental_algorithms
dijkstra_pct_control.cpp
#include <iostream> #include <fstream> #include <queue> #include <vector> using namespace std; ifstream f("grafpond.in"); struct node{ int nod; int cost; }; int n, m; vector<vector<node>> adj(10000); //lista de adiacenta int k, nod_ctrl[10000], src; //datele introduse de la tastatura int parent[10000]; //re...
ALGO
0.999903
4.265458
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-02-08T09:35: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": "f7775925b5d2...
1e385d99-10f7-4802-bdea-7fa121f53431
Lixipluv/Code-Cool-Things
BeecrowdSolutions/1256.cpp
#include <iostream> #include <vector> using namespace std; const int MAX = 100; struct Node { Node* next; int value; Node(int val) : value(val), next(nullptr) {} }; struct TDes { Node* inicio; Node* final; TDes() : inicio(nullptr), final(nullptr) {} }; void inicializa(TDes* vetor, int n) ...
ALGO
0.99973
4.85714
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2021-03-14T16: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": "f5316bc9fa9...
5defc15b-3869-4a77-be85-7cc51643504b
WeileiZeng/weilei_lib
bp_decoder.h
//<NAME>, April 8 , 2020 //copied from bp.c #include "dist.h" #include <itpp/itbase.h> #include <stdexcept> //for invalid argument const double INF_BP=10000; ///< infinity belief /**return weight of bvec * should use itpp::BERC::count_errors */ int summation(itpp::bvec u){ int result = 0; for ( int i=0; i<u.s...
ALGO
0.999835
3.401953
{ "github_metadata": { "branch": "master", "commit_count": 89, "repo_created_at": "2020-04-07T03:04:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "410c74dc6...
df7b730b-fb09-4feb-bb02-c4b69e191769
vNaonLu/leetcode-daily
src/q_851_900/q0860.cc
// Copyright 2023 <NAME> // // This file describes the solution of // Lemonade Change // // https://leetcode.com/problems/lemonade-change/ // // Question ID: 860 // Difficult : Easy // Solve Date : 2022/05/12 18:11 #include <iosfwd> #include <vector> // -- This header must be included after others -- #include "leetc...
ALGO
0.998069
6.151842
{ "github_metadata": { "branch": "main", "commit_count": 2477, "repo_created_at": "2021-09-06T15:30:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e9e98668a...
f86cf44e-87f1-4c1b-8d58-d0c6a42b2ef3
squaresLab/BatFix
results/transcoder/translations/java/REARRANGE_POSITIVE_AND_NEGATIVE_NUMBERS_PUBLISH.cpp
void rearrange ( int arr [ ] , int n ) { int i = - 1 , temp = 0 ; for ( int j = 0 ; j < n ; j ++ ) { if ( arr [ j ] < 0 ) { i ++ ; temp = arr [ i ] ; arr [ i ] = arr [ j ] ; arr [ j ] = temp ; } } int pos = i + 1 , neg = 0 ; while ( pos < n && neg < pos && arr [ neg ] < 0 )...
ALGO
0.999979
4.208481
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2023-05-21T15:21:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8b21964870da...
71f643fb-63db-485b-b738-5df4f6186a27
NguyenNhatUS/HCMUS-DSA
WEEK 7/binary_tree.cpp
#include<iostream> #include<queue> #include<vector> using namespace std; struct Node { int key; Node* left; Node* right; }; Node* createNode(int data) { Node* newNode = new Node; newNode->key = data; newNode->left = newNode->right = NULL; return newNode; } // Pre-order void preOrder(Node...
ALGO
0.999941
4.412227
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2025-05-08T06:44: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": "0b08c512f...
81ce548d-2a79-41df-b332-d7aaa43c8706
yueshinian/hybrid_a
src/path_planner/src/astar.cpp
#include "path_planner/astar.h" #include "path_planner/reeds_shepp_path.h" namespace path_plan { astar::astar():map_max_x(1000), map_max_y(1000), resolution_(0.1), origin_x_(-50), origin_y_(-50) { node_max_nums_ = map_max_x * map_max_y * headings; node3d_pool_.resize(node_max_nums_); for(int i = 0; i < no...
ALGO
0.998892
3.414204
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-09-01T15:08:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "00cfa4c98f26...
6b29003c-99c9-4e96-a5a4-f17d13f3621f
prabhaskumra/Data-Structures-Projects
Assign8/main.cpp
// <NAME> // Assignment #8 // CS 302 - 1004 // CS 302 // Dynamic Median Program // *********************************************************************** // Includes... #include <iostream> #include <sstream> #include <string> #include <cstdlib> #include <cmath> #include <chrono> #include "dynamicMedians.h" #inc...
ALGO
0.989864
4.568325
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2019-01-24T23:16:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4233b0809...
c0cd799d-f5b4-429e-be7c-a9687b61a677
Tigercore1/CoreyMcDonough-CSCI20-Fall2017
lab33/lab33.cpp
//Created By: <NAME> //Created On: 10/17/2017 //This app is a guessing game. It has the user input a number between 1-50 and compares it to a randomly generated number. The computer then outputs "Higher" or "Lower". The person must //then provide another guess. Before providing a response, the app outputs "5,4,3,2,1......
ALGO
0.967532
3.383912
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2017-08-21T18:57: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": "c53520b9b...
5043e31a-ab71-4cc2-9e6e-1f2bbe10a543
vrajpatel195/DSA_2022-23
week11_1.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; class Queue { private: int size; int *queue; int front,rear; public: Queue(int size){ this->size=size; queue = new int[size]; front = -1; rear = -1; } ...
ALGO
0.998583
4.011253
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-02-20T14:16: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": "9052de0a3fa1...
534a26d8-7557-47a2-9f83-1bb83edac926
piyush-24/Data-Structures-and-Algorithms
173-binary-search-tree-iterator/173-binary-search-tree-iterator.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.999941
5.892623
{ "github_metadata": { "branch": "main", "commit_count": 1258, "repo_created_at": "2022-01-10T20:12: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": "af68759bc...
c2605cf5-12b7-4963-b88b-a6549ac894e8
ccoliu/NTUST_OOP
C++Practice/CS3005301W06/TS0404/BankAccount.h
//Name:¼B®a¦¨ //Date: 2023/3/28 //Last Update: 2023/3/28 //Problem statement: Bank Account Demonstration // This is a class called BankAccount used to store account information. class BankAccount { private: int balance; // Record the balance of the account. static int total; // Record the total amount of money the b...
TOOL
0.918046
5.120836
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2023-06-14T05:56:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "397e20babaa...
e9a55a70-209d-4c5c-99e3-ea549d599d26
Mayankjoshi670/cpAlgo
ICPC/p1.cpp
#include<bits/stdc++.h> using namespace std; #define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL) #define vi vector<int> #define vvi vector<vector<int>> #define vpi vector<pair<int , int>> #define ll long long #define int long long int void findAns() { int n , k ; cin>> n >> k; vi arr(n) ; ...
ALGO
0.999636
4.218992
{ "github_metadata": { "branch": "master", "commit_count": 43, "repo_created_at": "2024-11-08T19:19:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "10402a40f...
9ea754a5-0a8c-4be8-b0f4-d7c3b5815f12
organicmaps/organicmaps
indexer/trie_builder.hpp
#pragma once #include "indexer/trie.hpp" #include "coding/byte_stream.hpp" #include "coding/varint.hpp" #include "base/buffer_vector.hpp" #include "base/checked_cast.hpp" #include "base/logging.hpp" #include <algorithm> #include <cstddef> #include <cstdint> #include <utility> #include <vector> // Trie format: // [1...
ALGO
0.990529
7.351312
{ "github_metadata": { "branch": "master", "commit_count": 42613, "repo_created_at": "2020-12-27T19:02:26.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 11487, "forks": 1128, "issues": 2796, "pull_requests": 182 }, "file_meta": { "content_i...
a733ece4-47de-44fb-a2ce-1708e6dc11e8
binary-ho/BaekjoonRecord
백준/Gold/16927. 배열 돌리기 2/배열 돌리기 2.cc
#include <iostream> #include <vector> #include <algorithm> using namespace std; int N, M, K, ans; int matrix[301][301], temp_matrix[301][301]; int rotate_arr[90001]; vector<pair<pair<int,int>, int>> rotate_vec; void rotate2(int r1, int c1, int r2, int c2, int T) { int mod; int idx = 0; for(int c = c1; c ...
ALGO
0.999962
4.023802
{ "github_metadata": { "branch": "main", "commit_count": 436, "repo_created_at": "2022-04-28T20:55: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": "a29784b20e...
8e49d420-0eb7-477d-a573-55a59f36c3ab
singhAman05/Codeforces-Problem
Skibidus and Sigma.cpp
// Problem: <NAME> // Contest: Codeforces - Codeforces Round 1003 (Div. 4) // URL: https://codeforces.com/contest/2065/problem/D // Memory Limit: 256 MB // Time Limit: 2000 ms // // Powered by CP Editor (https://cpeditor.org) #include "bits/stdc++.h" using namespace std; typedef long long ll; typedef vector<int> vi;...
ALGO
0.999951
4.12712
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2023-01-24T18:27: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": "d512931e677...
23428485-e01a-484d-876c-179e94b15793
xusiwei/leetcode
Algorithms/PermutationInString/permutationInString.cc
/* copyright xu(<EMAIL>), all right reserved. Permutation in String ====================== Given two strings s1 and s2, write a function to return true if s2 contains the permutation of s1. In other words, one of the first string's permutations is the substring of the second string. Example 1: Input:s1 = "ab" s2 = ...
ALGO
0.999931
6.065955
{ "github_metadata": { "branch": "master", "commit_count": 371, "repo_created_at": "2015-06-06T11:05:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b198c279...
75485f0b-1fef-4109-8312-7afcbd1505b0
rohit9798/LeetCode
647_PalindromicSubstrings.cpp
Given a string, your task is to count how many palindromic substrings in this string. The substrings with different start indexes or end indexes are counted as different substrings even they consist of same characters. Example 1: Input: "abc" Output: 3 Explanation: Three palindromic strings: "a", "b", "c". Exampl...
ALGO
0.999972
6.362386
{ "github_metadata": { "branch": "master", "commit_count": 335, "repo_created_at": "2020-02-28T16:40:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "98805eda...
695bd565-18bc-415a-8e59-bcba45ae74b0
nicolas-springer/programacionCompetitiva
codeforces/a144.cpp
#include <bits/stdc++.h> #define forr(i,a,b) for(int i=(a);i<(b);i++) #define forn(i,n) forr(i,0,n) #define dforn(i,n) for(int i=n-1;i>=0;i--) #define forall(it,v) for(auto it=v.begin(); it!=v.end(); it++) #define sz(c) ((int)c.size()) #define rsz resize #define pb push_back #define mp make_pair #define lb lower_bound ...
ALGO
0.99997
3.549541
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-04-28T03:17: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": "2f081f0965c2...
7025f5ff-9ebf-4346-89a6-9ebe1bc70d9e
fengyuquan/cpp-algorithms
play_with_algorithms/sort.cpp
#include "sort.h" void selection_sort(int* arr, int n) { for (int i = 0; i < n; i++) { int minIdx = i; // 寻找[i, n)区间里的最小值 for (int j = i + 1; j < n; j++) { if (arr[j] < arr[minIdx]) { minIdx = j; } } // 交换最小值到i索引 swap(arr, i, minIdx); } } void insertion_sort(int* arr, int n) { for (int i = 1...
ALGO
0.99998
5.188019
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2023-06-04T13:31: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": "42eee3d55f...
1b43119e-350b-40d9-8b76-406aa5c940f6
prebujo/Kattis_Solutions_INF237
problems/AMazing/Amazing.cpp
// // Created by preben on 24.01.18. // #include <array> #include "iostream" using namespace std; //lager feltvariabler av retning, og motsatt retning, og oppretter markert listen string direction[4] = {"up", "right", "down", "left"}; int opposite[4] = {2, 3, 0, 1}; bool marked[202][202]; //vet ikke hvor jeg begynner...
ALGO
0.999496
3.659579
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2018-01-19T09:33: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": "52057f7e1...
14aae918-86e5-432d-ae6f-32568488636a
HeRaNO/OI-ICPC-Codes
HSAHRBNUOJ/P11xx/P1186.cpp
#include <cstdio> #include <algorithm> #define MAXN 305 #define MAXM 5005 #define MAXT 51 using namespace std; struct link { int x, y, z; bool operator < (const link &a)const { return z < a.z; } }; link e[MAXM]; int n, m, T, v, k, p, x, y, z, w, f[MAXN], dp[MAXT], c[MAXT][MAXT]; bool ban[MAXT][MAXN][MAXN]; inl...
ALGO
0.999936
3.963485
{ "github_metadata": { "branch": "master", "commit_count": 246, "repo_created_at": "2018-12-31T09:57:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 24, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "38566d5...
e43d9929-a586-4426-bc37-281cd9e77826
ishandutta2007/codeforces-s
shadowatyy/normal/598/C.cpp
#include <bits/stdc++.h> #include <unistd.h> #define ll long long #define ull unsigned long long #define inf 1000000007 #define inf16 0x3f3f3f3f #define INF 1000000000000000007LL #define VI vector<int> #define VPII vector<pair<int, int> > #define VLL vector<ll> #define PII pair<int, int> #define PLL pair<ll, ll> #defin...
ALGO
0.999937
3.729241
{ "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": "a22d2a58285c...
d08c6606-785f-424e-b0c3-6e99b99be177
aayushverma1802/The-Lazy-Song
BrahMos/Longest_Common_Substring.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int solve(string &s1, string &s2, int i, int j, int &maxi, vector<vector<int>> &dp) { if (i < 0) { return 0; } if (j < 0) { return ...
ALGO
0.999993
5.807273
{ "github_metadata": { "branch": "main", "commit_count": 1126, "repo_created_at": "2022-09-05T15:28:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9812e8af1...
0807c325-0f4f-4102-a0ec-d06e13c63e46
PRADEEPERIYASAMY/cpp-codes
top_500/string/print all longest common sub sequences in lexographical order.cpp
#include <bits/stdc++.h> using namespace std; #define MAX 100 int lcsLen = 0; int dp[MAX][MAX]; int lcs(string str1,string str2,int len1,int len2,int i,int j){ int &ret = dp[i][j]; if(i == len1 || j == len2) return ret = 0; if(ret != -1) return ret; ret = 0; if(str1[i] == str2[j]) ret = 1+lcs(str1,...
ALGO
0.999988
5.015956
{ "github_metadata": { "branch": "main", "commit_count": 1122, "repo_created_at": "2020-12-24T11:15: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": "fb561002a...
b01e6b3c-ac13-497c-98af-f814184fd9c8
suankun/cpp_snippets
Basics/02.ArraysAndVectors/02.vectors.cpp
#include <iostream> #include <vector> using namespace std; int main() { // declaring and initializing vector vector <int> scores {10, 20, 30}; cout << "Scores before adding new elements: " << endl; cout << scores[0] << endl; cout << scores[1] << endl; cout << scores[2] << endl; // adding...
ALGO
0.977316
3.209315
{ "github_metadata": { "branch": "main", "commit_count": 1432, "repo_created_at": "2023-05-13T15:11:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "39c981687...
4b9bc21f-f506-42c9-9bf8-e17de0dae859
tinjyu/codeforces_code
src/1859/1859C.cpp
#include <iostream> using namespace std; int n; int stack[100005]; int per[100005], tmpper[100005]; int main() { int T; cin >> T; while (T--) { cin >> n; long long int ans = 0; for (int i = 1; i <= n * n; i++) { long long int cnt = -i; bool flag = ...
ALGO
0.999762
3.687077
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2023-09-17T16:14: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": "c8dc5e2e4...
836924be-f261-46c3-9580-b745434e282b
Priyanshu-C/COMPETETIVE-CODING-450
Searching and Sorting/SquareRootOfAnInteger.cpp
#include <bits/stdc++.h> using namespace std; #define gc getchar_unlocked #define FIN ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define fo(i,n) for(i=0;i<n;i++) #define fok(i,k,n) for(i=k;i<n;i++) #define Fo(i,k,n) for(i=k;k<n?i<n:i>n;k<n?i+=1:i-=1) #define ll long long #define si(x) scanf("%d",&x) #define sl(x...
ALGO
0.999744
3.347609
{ "github_metadata": { "branch": "main", "commit_count": 61, "repo_created_at": "2020-10-28T15:02: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": "62284bed1a4...
c12e5a4e-789b-4c29-8af8-f3122c2879d9
kandarpkakkad/30-Day-Challenge-CPP
Day17 - Binary Tree/day17_q1.cpp
#include<bits/stdc++.h> using namespace std; /* https://www.geeksforgeeks.org/insertion-in-a-binary-tree-in-level-order/ https://www.geeksforgeeks.org/deletion-binary-tree/ Input: 9 i 7 i 11 i 10 i 15 d 7 i 9 i 8 i 12 d 9 Output: 7 11 7 11 7 10 15 11 7 10 11 15 10 9 11 15 10 9 11 8 15 10 9 11 ...
ALGO
0.999964
4.716377
{ "github_metadata": { "branch": "master", "commit_count": 92, "repo_created_at": "2020-06-13T18:10:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 33, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9c13bb4e...
b384fe60-68ab-4f1c-9896-6c2d89802a41
matthaberbusch/manipulative-arm
behavior_algorithms/src/peg_hole_spiral_search.cpp
//<NAME> 2/13 //Simple state machine using switch case for linear search in peg-hole applications //requirements //State 0: Linear move in X until touch //State 1: Search for hole from force signatures //State 2: Linear move in X until touch again //State 3: Press lightly against surface to keep contact //TODO: Impleme...
ALGO
0.999368
4.916084
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2018-09-17T15:52:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b911bcee8...
574a90cf-d3ea-4288-8775-181896fb9552
fvictorio/uva_online_judge
10160_stations/old7/stations.cpp
#include <iostream> #include <vector> #include <algorithm> #include <set> #include <climits> #include <map> using namespace std; typedef unsigned long long ull; #define one_bit(x) (((ull) 1) << x) struct Aux { Aux() {} Aux(int n, int a) { node = n; no_adjs = a; } int node; int no_a...
ALGO
0.999791
4.409918
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2013-05-02T13:34:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "64b0055e9...
1703d878-048c-473d-8c51-6b8b27d0f45c
tassawer-hussain/Cplusplus-Tony-Gaddis-
CH # 5 - Problems/Chapter_05/Chapter_05/Problem_05-21.cpp
// 21. Random Number Guessing Game Enhancement /* Enhance the program that you wrote for Programming Challenge 20 so it keeps a count of the number of guesses that the user makes. When the user correctly guesses the random number, the program should display the number of guesses. */ #include <iostream> #include <c...
ALGO
0.952327
3.303864
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-11-03T22:46:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3c9415d730af...
7d7253d2-72f2-4098-b8cb-69af8b268f7f
abdullaabdullazade/rio-semifinal-submissions-2025
Amal_Hacıyev_Nasir oğlu_11.0_9_100BAL_RIO2025_Semifinal_S2.cpp
#include "bits/stdc++.h" #define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define ll long long #define pb push_back #define in insert #define F first #define S second #define vll vector<ll> #define all(v) v.begin(),v.end() #define rep(a, b, c) for (int(a) = (b); (a) < (c); (a)++)//i, 0, n #define endl ...
ALGO
0.999834
4.306814
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-02-24T15:39: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": "0400b524e0a3...