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
9f413d7c-ce9d-4f2f-8158-c2f840d81d4c
sGxOxDs/coding-cloud
大學(University)/Homework(課內作業)/一上/7/1083339-hw7-vector.cpp
#include <iostream> #include <string.h> using std::cin; using std::cout; using std::endl; using std::istream; using std::ostream; #include <fstream> using std::ifstream; using std::ofstream; using std::ios; #include <vector> using std::vector; const unsigned int numTestCases = 22; const unsigned int arraySize = 200;...
ALGO
0.9956
3.597414
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2020-08-30T16:53: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": "5736217da...
a54597c4-d797-44e5-9f98-fa919cb2e1b6
berwil-1/Segfault
train/include/minimal_mlp.hh
// minimal_mlp.hpp – single‑header MLP for 64‑input chess evaluation // Public domain / MIT‑0. Compile with any C++17 compiler. #pragma once #include <array> #include <cassert> #include <cmath> #include <cstddef> #include <fstream> #include <random> #include <vector> namespace minimal_mlp { /** * Single‑output mult...
DATA
0.996513
7.220784
{ "github_metadata": { "branch": "main", "commit_count": 57, "repo_created_at": "2025-05-23T14:47:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b102f8373df...
6f1aa2a7-c003-4ecf-90f0-a2b0fe63101f
callmedems/SFML_Menu
grafos.cpp
#include "Grafos.h" #include "fontManager.h" // Constructor Grafos::Grafos(int n) : nodeCount(n), adjList(n) { // Inicializar nodos con posiciones predefinidas std::vector<sf::Vector2f> positions = { {100, 100}, {200, 50}, {300, 100}, {150, 200}, {250, 200}, {350, 300}, {400, 150}, {450, 250}, ...
ALGO
0.901357
5.583269
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2024-12-01T19:56:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5f0db96292c...
b62f1385-3641-431d-aea3-4f6e0ea6a4b9
light5bolt/ball-balancing-bot
BallBalancingBot/PIDControllers.cpp
#include <Arduino.h> #include <math.h> #include "PIDControllers.h" extern bool enable_serial_output; // PID Constants #define kp .8 //.8 #define ki .2 //.2 #define kd .09 //.09 #define kv 0.05 //.05 #define kp_adj .4 //.4 #define ki_adj .25 //.25 #define kd_adj .2...
ALGO
0.997278
5.454768
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2025-06-29T22:39: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": "405d8e4546a...
7815b23f-776b-4f72-9bf5-c5419c98ced1
markitos002/Work-on-C
practicas/ejercicCpp/stack_c/stack_d1.cc
/******************************************************** * Stack * * A file implementing a simple stack class * ********************************************************/ #include <stdlib.h> #include <iostream.h> const int STACK_SIZE = 100; // Maximum size of a stack /*****************************************...
ALGO
0.949065
4.646001
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2021-06-07T19:49:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9584ccf3731...
c1088bd5-e7d2-4361-aeb5-5910e8ba51fc
ishandutta2007/codeforces-m
mofk/normal/1637/C.cpp
#include <bits/stdc++.h> using namespace std; int main(void) { ios_base::sync_with_stdio(false); cin.tie(NULL); int ntest; cin >> ntest; while (ntest--) { int n; cin >> n; vector<int> a(n); for (int i = 0; i < n; ++i) cin >> a[i]; long long sum = 0, sup = 0,...
ALGO
0.999562
4.021617
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-06T01:03: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": "d01224e7c604...
09112909-339f-4816-994b-6665870be307
MAZHARMIK/Interview_DS_Algo
Recursion/Find the Winner of the Circular Game.cpp
/* Scroll down to see JAVA code also */ /* MY YOUTUBE VIDEO ON THIS Qn : https://www.youtube.com/watch?v=lq3RMxKST-Y Company Tags : Goldman Sachs, Amazon Leetcode Link : https://leetcode.com/problems/find-the-winner-of-the-circular-game GFG Link : https://www.geek...
ALGO
0.999984
3.61462
{ "github_metadata": { "branch": "master", "commit_count": 5946, "repo_created_at": "2020-07-12T13:13:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2586, "forks": 1357, "issues": 7, "pull_requests": 37 }, "file_meta": { "content_id": "...
4e197414-1feb-4668-9703-cd381920e350
liuwenbo0/hust-networksecurity
rsa/BigInt.cc
#include "BigInt.hh" #include <algorithm> #include <stdexcept> #include <cmath> BigInt::BigInt() {} BigInt::BigInt(int num) { if (num == 0) { digits.push_back(0); } else { while (num != 0) { digits.push_back(num % 10); num /= 10; } } } BigInt::BigInt(const ...
ALGO
0.985395
6.342094
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-06-20T02:24: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": "2a73c0a42b1d...
600b107f-98dc-4047-bbc7-70dc72380357
javed2214/Segment-Trees
Even-Digit-Sum.cpp
// Even Digit Sum in a Range using Segment Tree // https://www.geeksforgeeks.org/queries-for-the-count-of-even-digit-sum-elements-in-the-given-range-using-segment-tree/ #include<bits/stdc++.h> using namespace std; int digitSum(int n){ int sum = 0, r; while(n != 0){ r = n % 10; sum = sum + r; n /= 10; } r...
ALGO
0.999898
5.343087
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2019-04-15T19:51:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "52073a493...
72f26e75-6d58-43a7-966b-65183d65eb02
Fidjanis/NAdo
algo/laboratory_work_8/laboratory_work_8/laboratory_work_8.cpp
#include <iostream> using namespace std; int n = 3; bool dfs(int i, int **arr, bool *col) { if (col[i]) { return 0; } col[i] = true; for (int j = 0; j < n; ++j) { if (arr[i][j]) { dfs(j, arr, col); } } } bool IsTree(int **arr) { int edges = 0; for (int i...
ALGO
0.999717
5.080561
{ "github_metadata": { "branch": "main", "commit_count": 81, "repo_created_at": "2023-09-29T12:23:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4fff341d115...
f62176b8-7c7d-441b-92a7-7de8167cdd6e
ChiyoYuki/template
sieve.cpp
vector<long long> sieve(long long n){ vector<char> isp(n + 1, 1); vector<long long> p(1, 2); long long i, j, r = sqrt(n); // isp[0]=0;isp[1]=0; for (i = 4; i <= n; i += 2) isp[i] = 0; for (i = 3; i <= r; i += 2){ if (isp[i] == 1){ p.push_back(i); j = n / i; ...
ALGO
0.999629
4.105161
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-10-25T13:10: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": "a70261a9eb3b...
aa756cef-68d7-4971-85ac-142eb2779007
alexfinger21/baldwin-wallace-problems
1979C.cpp
#include <bits/stdc++.h> using ll=long long; using namespace std; ll gcd(ll a, ll b) { while (a != 0) { ll temp = b % a; b = a; a = temp; } return a; } ll lcm(ll a, ll b) { return a * b / gcd(a, b); } int32_t main() { int t; cin >> t; while (t--) { int n...
ALGO
0.999986
4.373281
{ "github_metadata": { "branch": "main", "commit_count": 271, "repo_created_at": "2024-04-12T16:29: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": "2c6ede5340...
9d618c2e-d894-415d-9814-7b08b431a791
brandon-cormier/3D-Graphics
bounding-volume-hierarchy/src/point_AABBTree_squared_distance.cpp
#include "point_AABBTree_squared_distance.h" #include <queue> // std::priority_queue #include <functional> bool point_AABBTree_squared_distance( const Eigen::RowVector3d & query, const std::shared_ptr<AABBTree> & root, const double min_sqrd, const double max_sqrd, double & sqrd, std::shared_ptr...
ALGO
0.999302
5.639676
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-05-13T17:02:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eefbf97833...
2913eab2-d19c-468c-a7cd-411545d1ef2c
niyaznigmatullin/nncontests
2009/08/IOI 2009/Tour 1/z_4.cpp
#include <iostream> #include <stdio.h> #include <algorithm> #include <math.h> #include <vector> #include <string> #include <map> #include <queue> #include <set> #include <ctime> #define sz size() #define MP make_pair #define eps (1e-10) #define vi vector<int> using namespace std; typedef long long int64; const double P...
ALGO
0.99997
3.072517
{ "github_metadata": { "branch": "master", "commit_count": 149, "repo_created_at": "2015-06-05T12:48:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ad0421dd...
73fb4d4e-6574-4fc5-843c-441255ad01eb
CodePanda66/CSPostgraduate-408
DataStructure/Src/DS_0_Introduction/DS_0_0_love.cpp
// // Created by kim on 2020/6/17. // Copyright (c) <NAME> All rights reserved. // #include <stdio.h> /**实现模块**/ //下面四种函数的时间复杂度值得分析一二 //逐步递增型爱你 void LoveYou0(int n) { int i = 1; while (i <= n) { printf("I love you %d \n", i); i++; } printf("I love you more than %d\n", n); } //嵌套循环型爱...
ALGO
0.996172
3.111151
{ "github_metadata": { "branch": "master", "commit_count": 254, "repo_created_at": "2020-07-30T14:44:02.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5196, "forks": 715, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5116...
cf8a5c37-69b8-4587-bc49-7f7c848fb766
paulocezar/problem-solving
SPOJ/INCSEQ.cpp
/* * Problema: * Tecnica Utilizada: * * * Dificuldade: * Complexidade: * O( ) */ #include <map> #include <set> #include <list> #include <cmath> #include <queue> #include <ctime> #include <cfloat> #include <vector> #include <string> #include <cstdio> #include <climits> #include <cstdlib> #inc...
ALGO
0.999967
3.723642
{ "github_metadata": { "branch": "master", "commit_count": 108, "repo_created_at": "2015-04-23T17:19:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aa0b1440...
9cfef8d4-ca5c-4ee6-be1b-1f3458328b29
ValveSoftware/steam-audio
core/src/core/iir.cpp
// // Copyright 2017-2023 Valve Corporation. // // 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 o...
ALGO
0.99026
6.512004
{ "github_metadata": { "branch": "master", "commit_count": 167, "repo_created_at": "2017-01-26T23:24:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2540, "forks": 189, "issues": 70, "pull_requests": 7 }, "file_meta": { "content_id": "51b...
d1ca3e24-2ac8-4bbb-b11b-490667ec6b7b
beastwaleed/Nuces_3rd_Sem
DSA/A#03/Graphs/Basics.cpp
#include <iostream> #include <string> #include <vector> #include <queue> #include <stack> #include <climits> using namespace std; class Graph { private: int V; vector<vector<int>> matrix; // Adjacency Matrix public: Graph(int ver) { V = ver; matrix = vector<vector<int>>(V, vector<int>(V, 0...
ALGO
0.99995
5.77729
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2025-01-16T13:23:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7ff79cd9405...
a7d1c8eb-47b3-47e0-a74b-12b3a1af8d79
watashi/AlgoSolution
topcoder/algorithm/5/839.srm557/FoxAndMountainEasy.cc
#include <cassert> #include <cctype> #include <cmath> #include <cstdarg> #include <cstdio> #include <cstdlib> #include <cstring> #include <set> #include <map> #include <list> #include <queue> #include <stack> #include <vector> #include <string> #include <utility> #include <numeric> #include <sstream> #include <iostream...
ALGO
0.998971
4.262907
{ "github_metadata": { "branch": "master", "commit_count": 522, "repo_created_at": "2011-10-06T10:40:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 204, "forks": 61, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9d5d4...
4cb82129-2d4d-4f31-a4df-529ffdafb9e2
AyushC404/Basic-Cpp-and-OOP
Real basics/28_basics.cpp
#include <iostream> using namespace std; inline int product(int a, int b){//reduces time to run code by substituting x and y direcly in a*b return a*b;//inline shouldn't be used everywhere as it takes up space } int main(){ int x ; int y; cout<<"Enter the value of x and y:"<<endl; cin>>x>>y; ...
ALGO
0.999692
4.086663
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-04-28T23:26: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": "51b6deb4a3d4...
6b4a747b-4061-4920-86cd-d199e09416c5
ayaki-sugawara/atcoder
abc207/d.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<pair<double, double>> s(n); vector<pair<double, double>> t(n); for (int i=0; i<n; i++){ cin >> s[i].first >> s[i].second; } for (int i=0; i<n; i++){ cin >> t[i].first >> t[i].second; } pair<double, double> gs(0...
ALGO
0.999738
4.201818
{ "github_metadata": { "branch": "main", "commit_count": 138, "repo_created_at": "2021-11-24T14:31:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6d93a055a4...
b4bf8026-eb2b-408d-bab4-86b2ca1d0057
akhilkammila/leetcode-screenshotter
editorial_code/1000-1999/1376. Time Needed to Inform All Employees/cpp-0.cpp
class Solution { public: int maxTime = INT_MIN; void DFS(vector<int> adjList[], vector<int>& informTime, int curr, int time) { // Maximum time for an employee to get the news. maxTime = max(maxTime, time); for (int adjacent : adjList[curr]) { // Visit the subor...
ALGO
0.999978
5.991486
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2023-06-02T16:24:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 912, "forks": 294, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "f97ad86...
9ee77de2-0e90-41c6-8fa1-fd02a501b83d
merlinepedra/MILVUS-IA
internal/core/src/segcore/Reduce.cpp
// Copyright (C) 2019-2020 Zilliz. 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 // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable l...
DATA
0.996641
5.687843
{ "github_metadata": { "branch": "master", "commit_count": 16936, "repo_created_at": "2023-04-24T15:57: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": "ec2209...
b97fec72-9618-45ce-8e81-15efd4176463
nvtu/CompetitiveProgrammingLog
Practice/EduRound103/B.cpp
#include <bits/stdc++.h> using namespace std; const int MAX_ITEMS = int(1e2+3); int n, t; long long p[MAX_ITEMS], k; int main() { // freopen("test.txt", "r", stdin); cin >> t; while (t--) { cin >> n >> k; for (int i=0; i<n; i++) cin >> p[i]; long long ans = 0, sum = p[0]; ...
ALGO
0.999835
3.728015
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2021-01-26T03:01: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": "2af7beb41...
185b0623-c18b-4ffe-b137-3863c045c910
StolenMoments/algorithm-study
Trie.cpp
#include <iostream> using namespace std; class Node { public: char c; int use, finish; // 해당 노드 사용표시(초기화할 때 요긴하게 쓰임), 해당 알파벳이 단어의 끝인지 표시 Node* child[26]; // 알파벳 소문자는 26개 }; Node heap[10000]; int heapidx; void add(Node* node, char* str, int idx) { if (str[idx] == '\0') { node->finish = 1; return; } // 'a'는 ...
ALGO
0.999821
3.898912
{ "github_metadata": { "branch": "master", "commit_count": 99, "repo_created_at": "2018-08-13T15:40:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "82bfd09ab...
73ece661-dc26-43a6-b818-c5c40109736f
Gfans/ISPH_NVIDIA_CUDA_CONTEST
IncompressibleFluidsPcisphCUDA/src/ISPH_NVIDIA_CUDA_CONTEST/common/camera3d.cpp
/* FLUIDS v.3 - SPH Fluid Simulator for CPU and GPU Copyright (C) 2012. <NAME>, http://fluids3.com Fluids-ZLib license (* see part 1 below) 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 s...
TOOL
0.971865
5.741662
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2014-08-03T09:23:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 62, "forks": 14, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "48e0741...
c6fc7d48-407a-47cf-a02b-e6e7c2845338
Amathlog/PCG_CustomNodes
Source/PCG_CustomNodes/Private/Nodes/PCGConvexHull.cpp
#include "Nodes/PCGConvexHull.h" #include "PCGContext.h" #include "PCGModule.h" #include "Data/PCGPointData.h" #include "Algo/MinElement.h" #define LOCTEXT_NAMESPACE "PCGConvexHullSettings" FPCGElementPtr UPCGConvexHullSettings::CreateElement() const { return MakeShared<FPCGConvexHullElement>(); } bool FPCGCon...
ALGO
0.970231
6.749565
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-09T19:43:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "f393c2eda4b...
2d82e011-97f0-4e71-8c6e-a29581a187c3
mdmzfzl/CSES-Solutions
02_Sorting_and_Searching/1141-playlist.cpp
#include <bits/stdc++.h> using namespace std; #define fastio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define ll long long #define vi vector<int> #define vl vector<ll> #define pii pair<int, int> #define pll pair<ll, ll> #define pb push_back #define mp make_pair #define fi first #define se secon...
ALGO
0.999925
4.50389
{ "github_metadata": { "branch": "main", "commit_count": 61, "repo_created_at": "2023-09-20T14:18:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a3521c3b7e...
3edbe49c-5c85-417c-aead-ef314cd54e93
ishandutta2007/codeforces-x
xellos/normal/1408/B.cpp
// iostream is too mainstream #include <cstdio> // bitch please #include <iostream> #include <algorithm> #include <vector> #include <set> #include <map> #include <queue> #include <stack> #include <list> #include <chrono> #include <random> #include <cstdlib> #include <cmath> #include <ctime> #include <cstring> #include ...
ALGO
0.999939
3.563457
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:38: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": "769795683381...
e69de29c-decd-4632-8b08-f9d326a7dd34
PMS25/Facultate
Anul 1/Semestrul 1/Algoritmi si Structuri de Date - Miroiu Maria/Laborator/ASD10/A09_Schema_Lui_Horner.cpp
#include <iostream> #include <cmath> using namespace std; //Determinati, folosind schema lui Horner, catul si restul impartirii polinomului P la un polinom Q = X ─ t. void CitireDate(int *&V, int &n, int &t){ cout<<"Dati gradul polinomului: "; cin>>n; cout<<"Dati coeficientii (incepand de la cel mai semnificat...
ALGO
0.999518
4.189152
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2020-10-31T09:01:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c4888186a...
3e331680-dacd-4876-8fef-b87b3c879efb
ishandutta2007/codeforces-j
jtnydv25/normal/860/A.cpp
#include <bits/stdc++.h> using namespace std; const int N = 3005; int dp[N]; int pos[N]; inline bool test(char c){ return c != 'a' && c != 'e' && c != 'i' && c != 'o' && c != 'u'; } inline bool test(char c1, char c2, char c3){ return test(c1) && test(c2) && test(c3) && (c1 != c2 || c2 != c3); } int main(){ string s...
ALGO
0.99991
3.298777
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T05:42:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "036a66e6c1da...
1f92d781-8749-4be8-b718-fe84c50c0bab
warithr621/Comp-Programming
UniComps/UTPC/110824/F.cpp
/* <NAME> <NAME> <NAME> <NAME> <NAME> <NAME> <NAME> Son Chaeyoung <NAME> One in a million 눈부시게 사랑해 트와이스 !! */ %:include <bits/stdc++.h> using namespace std; %:define int long long typedef vector<int> vi; typedef pair<int, int> pii; %:define order(a) sort(a.begin(), a.end()) %:define rev(a) sort(a.rbegin(), a.rend()) %...
ALGO
0.999893
4.549991
{ "github_metadata": { "branch": "main", "commit_count": 141, "repo_created_at": "2021-06-30T17:22: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": "2b915b22e2...
726922f0-5438-4b31-a09c-b804b662a8b1
ming9275/ky2430132
Assignment 3/Savitch_8thEd_Chap3_Prob6/main.cpp
/* * File: main.cpp * Author: <NAME> * Created on January 18, 2014, 3:26 PM */ //System Libraries #include <iostream> #include <math.h> using namespace std; //Global Constants //Function Prototypes //Execution Begins Here! int main(int argc, char** argv) { //Declare Variables int a, b, c; float ...
ALGO
0.999035
3.546147
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2014-01-08T19:19: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": "25d54105f...
2be53d6c-b65c-44dc-804a-4414270e1fe0
cchung2020/Advent-of-Code-2023
Advent of Code 2023/day10b.cpp
#include <iostream> #include <print> #include <string> #include <vector> #include <map> #include <set> #include <algorithm> #include <numeric> #include <ranges> #include <sstream> #include <optional> using namespace std; using namespace views; using ranges::to; enum class Direction { Up, Right, Left, Down }; tup...
ALGO
0.999771
5.758145
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2023-12-01T06:12:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "61b73c35c...
a4c362a5-b19e-44ec-bd55-05c3941ff206
vislab-tecnico-lisboa/ekf_localization
src/bayesian_filtering/nonlinearanalyticconditionalgaussian3D.cpp
// $Id: NonLinearAnalyticConditionalGaussian3D.cpp 5823 2005-10-27 13:43:02Z TDeLaet $ // Copyright (C) 2006 <NAME> <first dot last at mech dot kuleuven dot be> // // 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 // t...
ALGO
0.992237
6.050091
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2016-04-27T08:44:01.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 25, "forks": 19, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "e28cc58e...
5464de57-5193-4892-932f-3605d0ff06c8
BaAdKu/UniStuff
SkipList/SkipListClass.cpp
#include "SkipListClass.h" #include <time.h> #include <stdlib.h> #include <iostream> #include <thread> SkipListClass::SkipListClass(int max) { srand(time(NULL)); MaxHeight = max; startStack = SkipListStack(MaxHeight, 0, true, false); endStack = SkipListStack(MaxHeight, 0, false, true); for (int j = 0; j < MaxHei...
ALGO
0.997009
3.657897
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2019-03-26T12: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": "cabb069e4...
e4b7485e-f0f8-44d5-9e97-916fe3240a2d
joeymaillette04/DS-Algo-Collection
bst-and-avl-tree/binary-search-tree.cpp
#include "binary-search-tree.h" #include <queue> #include <iostream> #include <algorithm> BinarySearchTree::Node::Node(DataType newval) { val = newval; left = nullptr; right = nullptr; } int BinarySearchTree::getNodeDepth(Node* n) const { if (n == nullptr) {return 0;} else if (n->left == nullptr...
ALGO
0.999245
4.271182
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-10-18T15:45: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": "09d10d82dd9f...
726a8946-f62b-4821-9c3e-5a48cc85258f
ro0mquy/rtificial
vinyl/Source/math/stdmath.cpp
#include "stdmath.h" float abs(float x) noexcept { #ifdef _MSC_VER __asm { fld x fabs fstp x } #elif __GNUC__ || __clang__ asm("fabs" : "+t" (x)); #endif return x; /* RT_ASM(fld dword ptr[x]); RT_ASM(fabs); RT_ASM(fstp dword ptr[x]); return x; // */ } float sqrt(float x) noexcept { #ifdef _MS...
ALGO
0.92715
5.03069
{ "github_metadata": { "branch": "master", "commit_count": 2688, "repo_created_at": "2013-08-17T13:12:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 62, "pull_requests": 0 }, "file_meta": { "content_id": "ba0cb7...
3e12a832-19e2-4ff7-9388-f0c3945c9171
reatcat/code-from-HUST
华中科技大学/报告/数据结构实验/图/队列.cpp
#include<stdio.h> typedef struct Queue{ int data; struct Queue * next; int front,rear; }Queue; //初始化队列 typedef struct QNode { int data; struct QNode *next; } QNode;//链队结点 QNode类型定义 typedef struct Queue { QNode *front, *rear; } Queue;//链队 Queue类型定义 void InitQueue(Queue * Q){ Q=(Queue*)mal...
ALGO
0.999946
3.573611
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2021-10-24T06:51:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "64fa27bc00ce...
0105eea6-56fd-48dc-8d3d-cd3ff29db6e4
Chinesezjc/Solved-Problems
AtCoder/ABC077D.cpp
//This Code was made by Chinese_zjc_. #include <iostream> #include <fstream> #include <iomanip> #include <algorithm> #include <vector> #include <bitset> #include <cmath> #include <queue> #include <stack> #include <list> #include <string> #include <cstring> #include <cstdio> #include <cstdlib> #include <cctype> #include...
ALGO
0.999869
3.329847
{ "github_metadata": { "branch": "master", "commit_count": 99, "repo_created_at": "2020-12-29T10:37: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": "c36843fe4...
50770d27-a2a4-47f5-b15b-74119d94063c
ainan-ahmed/UVA-Solved-Problems
UVA 11235 (Frequent values).cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define mkp make_pair #define pii pair<int,int> #define piii pair<int,pii> #define vi vector<int> #define PI acos(-1) #define a...
ALGO
0.999826
3.728541
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-05-03T15:09: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": "7232e3189e...
49e59ec8-aa42-4a14-b674-943b2005649c
Adhamet/Problem-Solving
uva/11503 Virtual Friends/11503.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; #define fst first #define scd second #define el '\n' vector<int> par, sz; void init(int size) { par = vector<int>(size), sz = vector<int>(size, 1); for (int i = 0; i < size; i++) par[i] = i; } int find(int x) { retur...
ALGO
0.99996
4.23326
{ "github_metadata": { "branch": "main", "commit_count": 798, "repo_created_at": "2022-01-29T00:47:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a6a6fab418...
9cf2180c-9430-4cc2-8a3b-b3e8bc48f389
jdhagood/attiny_2048
game.cpp
#include "game.h" #include <Arduino.h> void moveUp(board b) { for (byte x = 0; x < COLS; x++) { // First, shift all non-zero tiles upwards for (byte y = 1; y < ROWS; y++) { if (b[y][x] != 0) { byte newY = y; // Move the tile up as far as possible while (newY > 0 && b[newY - 1][x...
ALGO
0.998555
5.536474
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-10-21T15:04: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": "20f8894324...
3e711808-9ba6-40ac-a061-2ab771bb099c
sree2chin/codingPractice
binarySearchIterative.cpp
#include <iostream> #include <algorithm> using namespace std; int binarySearch(int A[], int N, int key) { int low = 0; int high = N - 1; /* To convert recursion to iterative, simple way to remember is to move the base if condition to while() in most cases*/ while(low <= high) { int mid...
ALGO
0.999964
4.205166
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2017-04-17T16:44:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b67f75d3a...
3dfb0b9f-e638-4009-b40c-ba9330206adb
sppostman/coding-questions
236-lowest-common-ancestor-of-a-binary-tree/lowest-common-ancestor-of-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 { public: int findCount(TreeNode* root, TreeNode* p, TreeNode* q, TreeNode* &lca) { if(!root) ...
ALGO
0.999991
6.634311
{ "github_metadata": { "branch": "main", "commit_count": 1127, "repo_created_at": "2023-05-04T12:37:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bafd7bd36...
24d42aab-28f0-4176-9614-5b602a115f01
aravinho/ricochet-robots
board.h
#ifndef BOARD_H #define BOARD_H #include "robots.h" #include <string> #include <vector> #include <map> #include <set> using namespace std; extern int BOARD_DIMENSION; // utils // inserts the given element into the given vector, in its sorted position // doesnt insert if already exists void insertInOrder(vector<i...
TOOL
0.990679
5.647447
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-10-07T18:49:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4699e1c3ef...
1fb8933e-ef8e-4eb3-bc40-d665834f5337
sebastianblari/embedded
attitudeIndicator/GetDifference.cpp
/* * GetDifference.cpp * * Created on: May 25, 2019 * Author: du */ #include "Mailbox.hpp" #include "GetDifference.hpp" #include "math.h" /*--------------------------------------------------*/ //constructor GetDifference::GetDifference() { m_u16InitialValue = 0u; } /*-----------------------------------...
ALGO
0.956446
5.621319
{ "github_metadata": { "branch": "master", "commit_count": 113, "repo_created_at": "2019-04-14T18:28:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 4 }, "file_meta": { "content_id": "3f233915...
eadc3dda-c389-411b-80c2-fe28f06ecc7a
jrsassen/repulsive-shells
deps/repulsion/src/Collision/BoundingVolumes/AABB.h
#pragma once #define CLASS AABB #define BASE BoundingVolumeBase<AMB_DIM,Real,Int,SReal> namespace Collision { // serialized_data is assumed to be an array of size Size(). Will never be allocated by class! Instead, it is meant to be mapped onto an array of type SReal by calling the member SetPointer. ...
ALGO
0.960918
6.945462
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-11-25T09:33:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 70, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "07e40c479b9...
64432c1c-1e41-4db1-875d-cfc42209fc3f
tmuttaqueen/MyCodes
Online Judge Code/codeforces/Educational Codeforces Round 39 (Rated for Div. 2)/946D.cpp
#include <bits/stdc++.h> //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tree_policy.hpp> using namespace std; //using namespace __gnu_pbds; const double pi = 3.141592653589793; #define xx first #define yy second #define mp make_pair #define intl long long #define ...
ALGO
0.999995
3.875577
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-01-27T09:25: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": "7252e44a6e...
63bf006e-0c78-4b35-88d7-7c843fb7d4cd
AlexLiuyuren/AIHomework
AIhomework1/AIhomework1/component.cpp
// // component.cpp // AIhomework1 // // Created by 刘驭壬 on 2017/10/9. // Copyright © 2017年 刘驭壬. All rights reserved. // #include "component.hpp" #include <iostream> #include <set> using namespace std; /* x1 x2 0 x3 0 0 0 0 0 九宫格如上图,由于只要确定了x1, x2, x3, 九宫格也就确定了,所以可以通过这三个值表达一个状态。 state数组中存放的是[0, x1, x2, x3...
ALGO
0.999792
4.506515
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-11-06T05:22:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a434610fa8...
b8fe1684-1cde-440d-acc9-627049c0f063
mihneabuz/mandelbrot-zoom
src/cpu_calculator.cpp
#include "cpu_calculator.hpp" inline int is_mandlebrot(const std::complex<double> c, int max_iter) { std::complex<double> z{0, 0}; auto i = 0; while (std::abs(z) <= 2 && i < max_iter) { z = z * z + c; i++; } return i; } inline void iter_to_color(const int iter, Uint8 *color, int max_iter) { float gradient...
ALGO
0.993202
5.187828
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2022-07-24T10:45: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": "249984ddc2f...
391b3cac-d2b0-4491-8577-1b0e8f85edb3
Shikhar-S/Analysis-of-Competitive-Codebase
Data/Contest1243/Standings5/29766278_64383740.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; #define mod 1000000007 #define pb(x) push_back(x); #define mp(x,y) make_pair(x,y) #define X first #define Y second typedef long long int ll; typedef pair<ll,ll> pp; #define debug(x) cout << #x << " :: "<< x <<"\n"; #define debug2(x,y) cout << #x << " ::...
ALGO
0.999987
4.049712
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2019-11-22T14:40: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": "a355b05b9...
3fce210a-c2ed-4c29-9379-6a662ea57c0b
arnabsheikh007/Programming-Contest
Codeforces/E - Tree Queries.cpp
#include<bits/stdc++.h> #define pb push_back #define eps 1e-9 #define ff first #define ss second #define pi acos(-1) #define mset(a,x) memset(a,(x),sizeof(a)) #define all(x) x.begin(),x.end() #define allr(x) ...
ALGO
0.999988
4.287831
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2020-03-28T17:27: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": "ca5351085e...
9e72c6b8-aea4-4a33-b7f9-71f655e35752
Shen-Jing/CompetitiveProgramming
LeetCode/LeetCode1-100/LeetCode45_Jump Game II.cpp
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <fstream> #include <functional> #include <initializer_list> #include <iostream> #include <list> #include <map> #include <memory> #include <numeric> #include <queue> #include <tuple> #include <type_traits> #include <uti...
ALGO
0.999989
5.042572
{ "github_metadata": { "branch": "master", "commit_count": 534, "repo_created_at": "2020-08-16T11:59:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d6038ea1...
476f131f-4b36-4ad2-9c97-f37ccef7e18f
HeTRei/Lab7
Task3.cpp
#include <iostream> #include <iomanip> int main() { std::setlocale(LC_ALL, "ua"); int n, m, a, b; srand(time(nullptr)); std::cout << "Введіть кількість рядків матриці: "; std::cin >> n; std::cout << "Введіть кількість стовпців матриці: "; std::cin >> m; if (std::cin.fail() || n != m) ...
ALGO
0.997675
3.435172
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2023-05-17T22:31:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "007fde0d2...
ed6d159d-8734-4804-af96-53a7cd549f6c
hocap9x/DSA_PTIT
DSA01014.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long int n, k, s, ans; void Try(int idx, int start, int sum) { if (sum > s || idx > k) return; for (int i = start; i <= n; i++) { int new_idx = idx + 1, new_sum = sum + i; if (new_idx == k) ...
ALGO
0.999963
4.222226
{ "github_metadata": { "branch": "main", "commit_count": 419, "repo_created_at": "2022-03-29T15:47:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fef249dce0...
8a2f7aee-741e-4a63-b996-373f40245664
SichYuriy/ParallelProgramming_KPI
Lab4/Lab4/main.cpp
#include "MatrixVectorIO.h" #include <iostream> #include <windows.h> #include <process.h> #include <stdio.h> using namespace std; void inputDataFromKeyBoard(); void fillDataWithOneVal(); void initializeVectorsAndMAtrices(int size); // Func1 // d = MAX(B + C) + MIN(A + B * (MA*ME)) int d; Vector *A, *B, *C; SquareMa...
ALGO
0.999017
3.24549
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2016-09-15T17:38:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "80b9d83003...
11d5db45-e1d7-49ca-b6cb-2a3d10bf72c1
trinhvo915/GIAOTRINHOOPC-
CODE_C++/Vector3D/main.cpp
#include<iostream> using namespace std; typedef struct { float x; float y; float z; } VECTOR3D; VECTOR3D setVector(float x, float y, float z) { VECTOR3D VT; VT.x = x; VT.y = y; VT.z = z; return VT; } VECTOR3D operator + (VECTOR3D A, VECTOR3D B) { VECTOR3D vt3D; vt3D.x = A.x + B.x; vt3D.y = A.y +...
TOOL
0.992041
3.155256
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2018-09-14T03:37:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4b364722d4...
0eef5af8-c820-48f4-bc8a-ccff6842919d
takashin9/AtCoder
ABC/abc302/d.cpp
#include <bits/stdc++.h> using namespace std; #if __has_include(<atcoder/all>) #include <atcoder/all> using namespace atcoder; #endif using ll = long long; int main() { ll n, m, d; cin >> n >> m >> d; vector<ll> a(n), b(m); for (auto &x : a) cin >> x; for (auto &x : b) cin >> x; sort...
ALGO
0.99997
3.909606
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2023-02-25T01:00: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": "e6b6022d5fe...
412b33b6-b35d-4f32-b50c-668c428dbea8
aarontravass/Project-Euler-Solutions
35.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define ll long long int #define ld long double #define ull unsigned long long int #define forn(i,n)for(ll i=0;i<(n);i++) #define forn_rev(i,n)for(ll i=(n)-1;i>=0;i--) #define for1n(i,n) for(ll i=1;i<=(n);i++) #define...
ALGO
0.999496
4.442728
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-05-31T14:08: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": "7ff017d243...
8b3deec0-d309-4a1d-a28e-2117810b42d5
ishandutta2007/codeforces-d
djq_fpc/normal/1344/E.cpp
#include <iostream> #include <algorithm> #include<cmath> #include<cstring> #include<cstdio> #include<cstdlib> #include<vector> #include<iomanip> #include<ctime> #include<set> #include<map> #include<queue> #include<stack> #include<bitset> #define sqr(x) ((x)*(x)) #define fz1(i,n) for ((i)=1;(i)<=(n);(i)++) #define fd1(i...
ALGO
0.999969
3.342309
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:31:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "459e44d7e560...
ddf5b763-8e8f-4cf9-ab85-be858051c8bf
iamshm/myCppPractice
450qstns/03string/73.cpp
//Longest Common Prefix //https://www.geeksforgeeks.org/longest-common-prefix-using-word-by-word-matching/ //https://www.geeksforgeeks.org/longest-common-prefix-using-binary-search/ #include <bits/stdc++.h> using namespace std; #define fastio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define endl...
ALGO
0.999899
3.920917
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2021-02-03T18:57:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "07dd286702f...
3c353c6e-c7ce-4620-9727-55bd80af2331
diegomazala/ilamp
src/lamp.h
#ifndef _LAMP_H_ #define _LAMP_H_ #include <Eigen/Dense> #include <random> #include <sstream> template <typename decimal_t> class Lamp { public: Lamp() {} ~Lamp() {} bool save_matrix_to_file(const std::string& filename) { std::ofstream file(filename); if (!file.is_open()) return false; file << std...
TOOL
0.961689
5.326636
{ "github_metadata": { "branch": "master", "commit_count": 111, "repo_created_at": "2017-12-12T17:10:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7528b2c0...
0706779a-d6bd-4029-b044-a29683396e18
noel-la-borde/csc_142
Week_9/Hard_Assignment_9.cpp
#include <iostream> #include <string> using namespace std; // enum class with the 4 values specified enum class CharacterClass { Warrior, Mage, Archer, Rogue }; // Structure Character struct Character { std::string name; CharacterClass type; int health; float strength; }; std::...
TOOL
0.912962
3.74649
{ "github_metadata": { "branch": "main", "commit_count": 70, "repo_created_at": "2025-01-26T07:23: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": "77f6546c1ab...
02232027-2b0f-4815-9e3e-03440cf404fe
RosettaCommons/rosetta
source/src/core/scoring/func/SoedingFunc.cc
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*- // vi: set ts=2 noet: // // (c) Copyright Rosetta Commons Member Institutions. // (c) This file is part of the Rosetta software suite and is made available under license. // (c) The Rosetta software is developed by the co...
TOOL
0.953934
5.829104
{ "github_metadata": { "branch": "main", "commit_count": 11737, "repo_created_at": "2023-11-17T16:42:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 296, "forks": 100, "issues": 27, "pull_requests": 9 }, "file_meta": { "content_id": "c885...
9ee42883-b49b-495c-a138-0ed34acd3379
Blaga-Cristian/Personal-Projects
Competitive programming - solutions/All Problems (pbInfo, Infoarena, Codeforces, Kilonova...)/Flight Discount (fast)/main.cpp
#include <bits/stdc++.h> #define F first #define S second #define ll long long #define fast_in_out ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL); using namespace std; const int N = 2509; const ll Inf = LLONG_MAX; typedef vector<int> VI; typedef vector<VI> VVI; typedef pair<int, int> PI; typedef vector<P...
ALGO
0.999878
4.040745
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-10-23T19:43: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": "660768f200d3...
8b1a343e-e6a5-45a6-a867-ceea15ac57c8
FuyukiVila/FOR-ICPC
jiudge/2023-04-25/C.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; bool a[505][505]; bool vis[505][505]; int num = 0; string res; bool hadfind = false; struct node { int first; int second; bool operator<(const node &b) const { return first + second > b.first + b.second; } bool operator>(...
ALGO
0.999896
3.638813
{ "github_metadata": { "branch": "main", "commit_count": 212, "repo_created_at": "2023-04-18T14:06:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c7497212a9...
62dd2f3a-edf6-4222-8881-2b998bbda20a
marlonwc3/cp-codes
Uva/Uva12485==Perfect Choir.cpp
#include <bits/stdc++.h> #define _ printf("\n"); #define sc1(a) scanf("%d", &a) #define sc2(a,b) scanf("%d %d", &a, &b) #define sc3(a,b,c) scanf("%d %d %d", &a, &b, &c) #define sc4(a,b,c,d) scanf("%d %d %d %d", &a, &b, &c, &d) #define iz(b) if(b==0) { break; } #define pb(a) push_back(a) #define inf 0x3f3f3f3f #define m...
ALGO
0.999852
3.270963
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2015-01-02T17:57:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "154a4158b...
de2e71cc-8e39-4c72-a0f8-c9632380d4dd
Winszheng/leetcode
level 基础/tree/[103]二叉树的锯齿形层序遍历/103.二叉树的锯齿形层序遍历_1.cpp
/* * @lc app=leetcode.cn id=103 lang=cpp * * [103] 二叉树的锯齿形层序遍历 */ // @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), left(nullpt...
ALGO
0.999975
6.332749
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2021-03-27T15:47:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2ba7c2ae3eb...
3e050553-0e2b-447f-a0ea-4567b858ef1c
arangodb/arangodb
3rdParty/boost/1.78.0/libs/bimap/example/mighty_bimap.cpp
// Boost.Bimap // // Copyright (c) 2006-2007 <NAME> // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // VC++ 8.0 warns on usage of certain Standard Library and API functions that // can be cause buffer overr...
TOOL
0.943177
5.600045
{ "github_metadata": { "branch": "devel", "commit_count": 51986, "repo_created_at": "2011-10-26T06:42:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13878, "forks": 857, "issues": 743, "pull_requests": 38 }, "file_meta": { "content_id": ...
b06f80c6-b7cf-4557-9cfd-a5d801c30c85
SKYSCRAPERS1999/ACM-Templates
DataStructure/Mo.cpp
const int maxn = 5e4 + 11; int N, M, S, n, col[maxn]; int blk[maxn]; LL cnt[maxn], ans1[maxn], ans2[maxn]; struct D{ int l, r, id; bool operator < (const D& rhs) const{ return blk[l] < blk[rhs.l] || (blk[l] == blk[rhs.l] && r < rhs.r); } } q[maxn]; inline void upd(LL &sum, int c, int x){ sum -= ...
ALGO
0.999878
3.969776
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2018-10-10T12:38:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fb6cd29a93...
d3a607af-cdd6-4b58-8733-14f6f315416b
Chandansr01/DSA-practice
linkedList/reverse_list.cpp
#include<iostream> using namespace std; class Node{ public: Node *next; int data; Node(int d){ this->next =NULL; this->data = d; } }; void insertNode(Node* head, int d){ Node *temp = new Node(d); Node *temp1 = head; while(temp1->next!=NULL){ temp1 = temp1->nex...
ALGO
0.999821
4.49103
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2023-06-20T06:12:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9bbece211...
1133b889-d2fb-43be-9305-75ace4c27a99
gdjwixgdj/dsacode
ASSIGNMENT5(TBT).cpp
#include <iostream> using namespace std; class Node { public: int data; Node* left; Node* right; bool lThread; bool rThread; Node(int val) { data = val; left = right = NULL; lThread = rThread = false; } }; class PreorderTBT { private: Node* root; public: P...
ALGO
0.999596
6.576911
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2025-05-02T16:51: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": "a93e8a28889...
7a9eb818-44d6-4155-89b7-6460e135e6dd
KhelassiHub/Project-Euler
Problem 34/Digit factorials.cpp
#include <iostream> #include <string> /* 145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145. Find the sum of all numbers which are equal to the sum of the factorial of their digits. Note: As 1! = 1 and 2! = 2 are not sums they are not included. */ using namespace std; int main() { unsigned int sum = 0...
ALGO
0.999681
5.621488
{ "github_metadata": { "branch": "master", "commit_count": 61, "repo_created_at": "2019-11-25T23:17: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": "8ad01342a...
c878135f-cb92-48bb-8fda-69190a132910
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/CodeLlama/top0-100/minimum-number-of-flips-to-convert-binary-matrix-to-zero-matrix-Solution.minFlips/177900_+Info.cpp
xmlDocPtr soap_xmlParseMemory(const void *buf, size_t buf_size) { xmlParserCtxtPtr ctxt = NULL; xmlDocPtr ret; /* xmlInitParser(); */ */ ctxt = xmlCreateMemoryParserCtxt(buf, buf_size); if (ctxt) { ctxt->sax->ignorableWhitespace = soap_ignorableWhitespace; ctxt->sax-...
ALGO
0.997707
4.353156
{ "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": "129a6a56c1d9...
b3a45687-23a5-4a94-9045-a75e33060a58
srzmldl/ACM-ICPC
AsZTraining/20150702/E_ldl.cpp
#include <bits/stdc++.h> #define MAXN 33 using namespace std; const int lim = 1123456; int pri[lim], vis[lim]; long long ans[MAXN][MAXN]; int gcd(int u, int v) { if (!u || !v) return u + v; return gcd(v, u % v); } int main() { freopen("elegant.in", "r", stdin); freopen("elegant.out", "w", stdout); ...
ALGO
0.99993
3.304185
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2015-09-22T11:59:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "46ecf8e23...
1ed68ea7-3480-4d15-bbe2-2f945d55ce99
zysgsb/water
imca test.cpp
#define _CRT_SECURE_NO_WARNINGS 1 #include<stdio.h> #include<iostream> #include<assert.h> using namespace std; #define A1 2 //左矩阵的行和列 #define B1 2 #define A2 2//右矩阵的行和列 #define B2 2 void ABC(double arr1[][A1], double arr2[][B2], double arr3[][B2], int b1, int a2, int a1, int b2) { assert(a1 == b2); int i = 0...
ALGO
0.999906
3.109601
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-10-02T12: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": "85320845194b...
adb61d33-171f-4e63-9e6b-1b5ec84ddc33
kllmagn-park/algohelp
2 модуль/main_4.cpp
#include <iostream> #include <sstream> #include <cassert> using namespace std; template <class T> struct comparator { int operator()(const T& val1, const T& val2) { if (val1 < val2) return 1; else if (val1 > val2) return -1; return 0; } }; template <class T, class TComp = comparator<T...
ALGO
0.999977
4.422433
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2022-01-01T22:48:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ff2dfb447cd...
5a889f37-56f9-4cf5-8f71-1279e04900f5
swarupSikder/phitron_v2
AL-w2/path_manipulation.cpp
// author: <NAME> // judge: ... // problem: ... #include <bits/stdc++.h> using namespace std; vector<int> adj_list[1005]; bool vis[1005]; int level[1005]; int parent[1005]; void bfs(int src) { queue<int> q; q.push(src); q.push(1); vis[src] = true; level[src] = 0; // parent[src] = -1; ...
ALGO
0.999995
4.808228
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2024-12-18T02:14:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "892f316a97a...
daf40301-5c8c-4eaa-99ee-3989feb3bb39
w753621/CYCU-Code
OS/程式作業一/ThreadProgramming2.cpp
// 資工三甲 10520119 黃博泓 #include <string> #include <vector> #include <fstream> #include <iostream> #include <time.h> #include <thread> using namespace std; struct CutNumber { vector<int> aCut_number; }; // CutNumber() void BubbleSort( vector<int> & read_number ) { for( int i = 0; read_number.size() > i + 1; i++ ) ...
ALGO
0.999159
3.719865
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2018-12-03T10:53:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0c4bfa986...
2313e405-44e3-4b5e-bb0c-88f2daf7a69c
q-vector/denise
denise/cluster.h
// // cluster.h // // Copyright (C) 2005-2015 <NAME> // // This file is part of libdenise. // // libdenise 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 op...
ALGO
0.997967
6.484719
{ "github_metadata": { "branch": "master", "commit_count": 163, "repo_created_at": "2015-04-21T15:44: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": "6af7a4c8...
6ba820da-005f-4a73-b142-c45a80940a9b
dev-hsyang/animation-theory
Curve Interpolation/CurveInter/main.cpp
// // main.cpp // CurveInter // // Created by <NAME> on 2021/03/24. // Modified by <NAME> on 2021/4/14. #include <iostream> #include <JGL/JGL.hpp> #include <JGL/JGL_Window.hpp> #include <JGL/JGL_Widget.hpp> #include <JGL/JGL_Options.hpp> #include <JGL/JGL_Toolbar.hpp> #include <JGL/JGL_Aligner.hpp> using namespac...
ALGO
0.99365
5.71192
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-07-10T19:08:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7bc40c8ca05c...
f180d84b-780f-462e-915f-d5f196ce48fa
Yash-Chaudhari01/DSA_450
Intersection Point in Y Shaped Linked Lists.cpp
/* Linked List Node struct Node { int data; struct Node *next; Node(int x) { data = x; next = NULL; } }; */ //Function to find intersection point in Y shaped Linked Lists. int intersectPoint(Node* head1, Node* head2) { // Your Code Here // Calculate the size of the two linked lists ...
ALGO
0.999972
5.121936
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2024-03-10T07:44: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": "f6eaaafdafb...
fc005b32-5e43-4c8c-8c6f-cb92cab19942
ArielBerkovich/Pirate_Packing
GA/Encoding/PermutationCreature.h
#ifndef PERMUTATIONENCODING_H #define PERMUTATIONENCODING_H #include <vector> #include <unordered_map> #include "../../includes/structs.h" #include "../GA_Random.h" #include "../Configuration.h" class PermutationCreature { public: PermutationCreature(Configuration* config, Random& randomEngine = Random::defaul...
ALGO
0.992103
5.317892
{ "github_metadata": { "branch": "master", "commit_count": 235, "repo_created_at": "2019-03-12T09:37:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d21d4672...
c69e2a4a-602b-470c-b710-cbd9dc236993
rluuan/programming-competitive
neps/sol.cpp
#include <bits/stdc++.h> using namespace std; #define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL); typedef long long ll; int tree[4 * 100000], coins[100000], lz[4 * 100000]; inline void add(const int x) { tree[x] = tree[x << 1] + tree[x << 1 | 1]; } inline void push(const int x, const int l, const int r...
ALGO
0.99984
4.190646
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2018-05-21T23:55:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa803036f...
21fcb818-6887-4ac9-a2f0-ab51c5c8a1cc
brighamandersen/cs142
L2M - Pizza Magic/Main Lab 2B (Pizza Magic).cpp
/* <NAME>, Section 3, <EMAIL> Description: Makes calculations for a pizza restaurant (financial and logistical) */ #include <iostream> #include <cmath> using namespace std; int main() { const int GUESTS_PER_LARGE = 9; const int GUESTS_PER_MEDIUM = 5; const int GUESTS_PER_SMALL = 2; const double DIAME...
ALGO
0.994624
5.757075
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-05-02T17:27: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": "a6b83eb1ef...
800d6226-2dd9-4746-89a6-7b481a566e93
SharafMohamed/NetworKit
networkit/cpp/linkprediction/CommonNeighborsIndex.h
/* * CommonNeighborsIndex.h * * Created on: 06.12.2014 * Author: <NAME> (<EMAIL>) */ #ifndef COMMONNEIGHBORSINDEX_H_ #define COMMONNEIGHBORSINDEX_H_ #include "LinkPredictor.h" namespace NetworKit { /** * @ingroup linkprediction * * The CommonNeighborsIndex calculates the number of common * neighbors ...
ALGO
0.982278
6.932412
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-04-22T02:38:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3bc71668b4...
2bc7af04-dc77-4f4d-84d1-fd305be8208a
ppplinday/vgg16-by-ARM-Compute-Library
arm_compute/core/Helpers.h
/* * Copyright (c) 2016, 2017 ARM Limited. * * SPDX-License-Identifier: MIT * * 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 * r...
TOOL
0.997402
4.899238
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2017-06-22T09:38:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 32, "forks": 14, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "9f5c6fe...
ebec29d2-ed12-4546-aa00-b86031b65b5e
RavinderChoudhary/Practice
Generic_Tree_using_level_order_traversal.cpp
#include <bits/stdc++.h> using namespace std; template<typename T> class Node { public: T val; vector<Node<T>*> children; Node(T data){ this -> val = data; } }; Node<int>* takeInput(){ int data,n; cout<<"Enter the value of root"<<endl; cin>>data; queue<Node<int>* > q; Node...
ALGO
0.999812
4.597634
{ "github_metadata": { "branch": "main", "commit_count": 56, "repo_created_at": "2020-12-26T07:10: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": "ba6b73c7a59...
60aacbc1-b9a5-4131-ab75-f9e87b15b7dd
JikoUnderscore/NoThanksGame
module2022/src/main.cpp
#include <iostream> #include <vector> #include <algorithm> #include <random> #include <cassert> #include <array> #include <functional> #include <format> #define FMT_HEADER_ONLY #include "fmt/core.h" #include "fmt/ranges.h". #define let const auto #define not ! #define Input std::cin using std::vector; using std::ar...
ALGO
0.995194
4.424246
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2022-05-13T11:39: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": "ec0f79ce28...
29f424bc-e186-4f34-8940-3ba411bb3534
BentleyBlanks/PAT
1002/1002/main.cpp
#include <iostream> #include <algorithm> #include <functional> #include <vector> class term { public: term() :coefficient(0.0f), exponent(0) {} term(float coefficient, int exponent) :coefficient(coefficient), exponent(exponent) {} void print() { printf("[C:%.1f E:%d]", coefficient, exponent); ...
ALGO
0.999007
3.988935
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-07-21T17:55: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": "03a2cc1272...
9c86444b-2e31-4c99-967a-22466266df9c
floresjmjr/cplusplus
exercises/classes.cpp
#include <iostream> using namespace std; //Person Example class Person { string firstName; string lastName; public: Person(); // Person(string first, string last); Person(string first, string second); void setFullName(string f, string l); void getFullName(); } jorge; //This automatically triggers the de...
TOOL
0.955524
4.979696
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2021-12-21T22:36:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2e63e9e26fe...
6831f2e9-f355-47a6-87fc-18fc42b1a0ac
ishandutta2007/codeforces-o
orz/normal/859/G.cpp
//#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <algorithm> #include <vector> #include <string> #define ll long long #define ld long double using namespace std; int main() { //freopen("c.in", "r", stdin); //freopen("c.out", "w", stdout); ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); ll...
ALGO
0.999933
3.831143
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:45:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3f3ead482299...
1e0716b3-aa8e-454a-b459-a33e1f62ee3d
MrOcumare/Algoritm_2018_TP
DZ/MOD1/2_task/2_1.cpp
/*Дан отсортированный массив целых чисел A[0..n-1] и массив целых чисел B[0..m-1]. Для каждого элемента массива B[i] найдите минимальный индекс k минимального элемента массива A, равного или превосходящего B[i]: A[k] >= B[i]. Если такого элемента нет, выведите n. Время работы поиска k для каждого элемента B[i]: O(l...
ALGO
0.99997
4.631987
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-09-29T06:19: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": "ded5689d71...
7decc623-c6cf-48da-94ac-2dfd9347d181
gagatikebaby/CP
C++/swaps.cpp
#include<iostream> void swapr(int &a, int &b); void swapp(int *p, int *q); void swapv(int a,int b); int main() { using namespace std; int wallet1 = 300; int wallet2 = 350; cout << "wallet1 = $"<<wallet1; cout << "wallet2 = $"<<wallet2 << endl; cout<<"using reference to swap contents:\n"; s...
ALGO
0.997534
4.589087
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2022-11-05T09:05: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": "2a95a2deca8...
28e7bcb7-20a5-4f48-89e7-3b295a81d0d5
bala4krish/Probe-lams
BFS_Rotting_Oranges.cpp
// Rotting oranges using breadth first search. // Given a grid, each cell has an integer representing, // 0 - Empty cell // 1 - fresh orange // 2 - rotten orange // Every minute, a fresh orange that is adjacent 4 directionally to a rotten orange becomes rotten. // Return the total number ...
ALGO
0.999844
5.936406
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2020-12-01T22:17:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e306fb560b8...
41e60a1d-19e8-4f00-b56d-bed2cd4f3615
tejasMadrewar/CPP_practice
leetCode/May30_DayChallenge/Week5/EditDistance.cpp
#include <bits/stdc++.h> using namespace std; #define PRINT \ cout << "PASS\n"; \ else cout << "FAIL\n"; // Given two words word1 and word2, find the minimum number of operations required to convert word1 to word2. // // You have the following 3 operations permitted on a word: // // Insert a characte...
ALGO
0.999985
5.398208
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-05-04T14:07:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6a0a2e2524...
35e91caa-2ceb-41ba-856d-413a3ff33d19
FLlGHT/Algorithms
cpp-solutions/src/main/c++/slidingwindow/LongestSubarrayOf1sAfterDeletingOneElement.h
// // Created by <NAME> on 26.04.2023. // #ifndef C_ALGORITHMS_LONGESTSUBARRAYOF1SAFTERDELETINGONEELEMENT_H #define C_ALGORITHMS_LONGESTSUBARRAYOF1SAFTERDELETINGONEELEMENT_H #include <iostream> using namespace std; /** * 1493. Longest Subarray of 1's After Deleting One Element * * Given a binary array nums, you ...
ALGO
0.999768
6.144527
{ "github_metadata": { "branch": "master", "commit_count": 153, "repo_created_at": "2022-09-26T07:09:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "92c0aec1...
9ca03af7-3b5c-40df-b995-f85bee814199
EdenGri/Cpp-Memory-Leaks
include/Graph.h
#ifndef GRAPH_H_ #define GRAPH_H_ #include <set> #include <vector> #include "../include/Tree.h" class Graph { public: // Creates graph with the given adjacency matrix Graph(std::vector<std::vector<int>> matrix); // Adds the given infected node index to the infected list void infectNode(int nodeInd); ...
ALGO
0.911842
4.541055
{ "github_metadata": { "branch": "main", "commit_count": 73, "repo_created_at": "2020-10-31T18:42:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "66952499584...
8aaf1374-b916-49bc-ad02-3b9cd0aaf660
ishandutta2007/codeforces-m
mango_lassi/normal/1214/D.cpp
#include <iostream> using namespace std; const int N = 1e6; bool blocked[N]; bool dfs(int y, int x, int h, int w) { if (x == w-1 && y == h-1) return true; int i = y*w + x; if (y >= h || x >= w || blocked[i]) return false; if (i > 0) blocked[i] = true; if (dfs(y, x+1, h, w)) return true; if (dfs(y+1, x, h, w)) ...
ALGO
0.999777
3.718831
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-06T01:03: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": "352aa0e32e62...