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
5fc5a19b-c577-4b64-869c-c7cf724482a3
ishandutta2007/codeforces-s
sooke/normal/1237/F.cpp
#include <bits/stdc++.h> inline int read() { char c; int x; for (c = getchar(); !isdigit(c); c = getchar()); for (x = 0; isdigit(c); c = getchar()) { x = x * 10 + c - '0'; } return x; } const int mod = 998244353; inline int add(int x, int y) { return x + y >= mod ? x + y - mod : x + y; } inline int sub(i...
ALGO
0.999925
4.944283
{ "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": "dc294fbc4075...
021129df-2bfe-474a-b7be-847c22760437
regular-life/ADA-Coding-Assignments
ADA_Lab_2/C.cpp
#include <bits/stdc++.h> #pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") using namespace std; using ll = long long; using ld = long double; #define hehe ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define print(arr,n) for(int i = 0 ; i < n ; i++){cout << ar...
ALGO
0.999866
4.041826
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-02-03T11:44: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": "c9a2c6fe789d...
f386f888-d043-41cb-bb62-d6c9f99ccda2
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/Mixtral/top0-100/minimum-cost-to-reach-destination-in-time-Solution.minCost/177852_DoS_Overflow.cpp
parse_object(JsonLexContext *lex, JsonSemAction *sem) { /* * an object is a possibly empty sequence of object fields, separated by * commas and surrounded by curly braces. */ json_struct_action ostart = sem->object_start; json_struct_action oend = sem->object_end; JsonTokenType tok; if (ostart != ...
ALGO
0.988506
4.948992
{ "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": "6cfc7fe19bc5...
cf3911b1-80b8-4e83-a443-8b83ad157c52
OpenFOAM/OpenFOAM-dev
src/finiteVolume/cfdTools/general/correctPhi/CorrectPhi.H
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Copyright (C) 2015-2023 OpenFOAM Foundation \\...
TOOL
0.91874
6.134327
{ "github_metadata": { "branch": "master", "commit_count": 8589, "repo_created_at": "2014-12-10T15:47:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1770, "forks": 642, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "9d...
d80a2ac2-8135-4c9c-81b0-f1e8d25c7ac9
ruoyewu/Linking
app/src/main/cpp/native-lib.cpp
#include <jni.h> #include <string> #include <vector> using namespace std; const int UP = 1; const int DOWN = -1; const int LEFT = 2; const int RIGHT = -2; vector<vector<int> > mPaths; int** mNum; int* mStartP; int* mEndP; int mFrom; int mEnd; int mWidth; int mHeight; void go(int, vector<int>, int, int, int, int); voi...
ALGO
0.999397
4.086987
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-05-19T02:21:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3b3c4a7968...
00a3b022-d310-4ef4-abf2-e6cf15c1bf40
az7792/Competitive-Programming-Code
Codeforces/1859/C_Another_Permutation_Problem.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define endl '\n' #define all(x) (x).begin(), (x).end() #define eb emplace_back const ll MAX = 2e5 + 10; const ll MOD = 998244353; typedef pair<int, int> pii; typedef pair<ll, ll> pll; void solve() { ll n, ans = 0; cin >> n; for (int i = 0; ...
ALGO
0.999813
4.635886
{ "github_metadata": { "branch": "master", "commit_count": 79, "repo_created_at": "2024-03-09T13:46: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": "5cb705d04...
efd76d6e-40e5-40a1-bc7b-b3eca11c6032
tanvib00/duotrigordle-solver
OpenMPI_1/wordleSolver.cpp
#include <set> #include <string> #include <iostream> #include <fstream> #include <iterator> // #include <chrono> #include <vector> #include "mpi.h" #include <stdlib.h> using namespace std; #define NUM_TRIALS 10 // #define DESIRED_DATASET_SIZE 500000 #define DESIRED_DATASET_SIZE 5757 #define MAX_GUESSES 50 #define N...
ALGO
0.998479
4.138817
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2022-03-23T18:44:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d587de70c92...
656b5eec-1a50-4ee2-8d98-99ee642d4881
yanbcxf/cpp
MyToolKit/igraph-0.7.1-msvc/src/bliss_eqrefhash.hh
/* Copyright (C) 2003-2006 <NAME> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without eve...
ALGO
0.921342
5.42626
{ "github_metadata": { "branch": "master", "commit_count": 245, "repo_created_at": "2019-02-25T00:41:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0b92ca12...
3ed05358-3488-436c-a614-5a84a6bec2f7
ishandutta2007/codeforces-a
alpha_q/normal/691/E.cpp
#include <bits/stdc++.h> using namespace std; #define DIM 105 typedef long long ll; const int MOD = 1e9 + 7; const int N = 110; struct matrix { vector < vector <long long> > m; int r, c; matrix (int x, int y) : r(x), c(y) { m.resize(x); for(int i = 0; i < x; i++) m[i].resize(y); } ...
ALGO
0.999965
4.781946
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "12b21dadb28e...
afec66d2-210c-4250-abc6-23b3c6010a58
sonapraneeth-a/competitive-programming_submissions
platforms/binarysearch/practice/easy/904__making-list-values-equal/solutions.cpp
// clang-format off /** * COPYRIGHT NOTICE * * Copyright (c) 2021. <NAME> <<EMAIL>> * * This file is part of binarysearch practice(submit) in competitive programming. * * This file cannot be copied and/or distributed without the express * permission of the copyright owner. * */ /** * FILE DESCRIPTION * * ...
ALGO
0.999986
5.642257
{ "github_metadata": { "branch": "main", "commit_count": 51, "repo_created_at": "2021-09-10T05:38:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f8d0bb3c7f5...
28e6f128-0007-4677-887e-e5dba3271bf5
raincross7/code-similarity
codes/train_code/problem075/problem075_426.cpp
#include <vector> #include <stack> #include <queue> #include <list> #include <bitset> #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <algorithm> #include <numeric> #include <iostream> #include <iomanip> #include <string> #include <chrono> #include <random> #include <cmath> #inc...
ALGO
0.99985
3.409228
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07: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": "003ddba7f428...
18cf3a1c-51a1-434b-b32f-3f8320a143df
FastForming/LFNL
Data Structures Experiment/02_2.cpp
//设以不带头结点的循环链表表示队列,并且只设一个指针指向队尾结点,但不设头指针。编写相应的入队和出队程序 #include<iostream> #include<vector> using namespace std; class CircularQueue{ private: struct Node{ int data; Node* next; Node(int value):data(value),next(NULL) {} }; Node* rear; public: CircularQueue():rear(NULL) {} ~Ci...
ALGO
0.999237
3.793673
{ "github_metadata": { "branch": "main", "commit_count": 64, "repo_created_at": "2023-12-05T01:51:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "363bd450924...
0f526c7d-f5bc-49f3-854b-6e25471ada38
ronee12/Code-Library
My_code/code library/SHAHINVAICODE/STL/queue.cpp
#include <stdio.h> #include <queue> // use this to avoid specifying "std::" everywhere using namespace std; int main() { // just do this, write queue<the type you want, // in this case, integer> and the queue name queue<int> q; // try inserting 7 different integers, not ordered q.push(3); q.push(1); q.push...
ALGO
0.983832
3.513773
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-10-19T14:08: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": "b01a48f094...
684a9dc3-3a74-406f-8305-9a44e29889ea
Yonghui56/ComponentialMultiphase
UserModules/FemHeatTransport/HeatTransportJacobianLocalAssembler.h
/** * Copyright (c) 2012, OpenGeoSys Community (http://www.opengeosys.com) * Distributed under a Modified BSD License. * See accompanying file LICENSE.txt or * http://www.opengeosys.com/LICENSE.txt * * * \file HeatTransportJacobianLocalAssembler.h * * Created on 2012-10-23 ...
ALGO
0.980266
6.334772
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2015-09-21T09:42:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c1ca0232d...
f4e6410a-9931-4f3f-87ea-b7047be15c8d
sudhanshu2504/CrackYourPlacement
LinkedList/AddTwoNumbers.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* addTwoNumbe...
ALGO
0.999936
6.165709
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2024-07-19T07:49:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fac52d6d66c...
863cfdc8-5978-4199-b8a9-a825e60502a5
Aaditya-Kumar-Mittal/Striver-DSA-Course
Stacks/CPP_Stack_Prefix_To_Postfix_Conversion.cpp
#include <bits/stdc++.h> using namespace std; /* Function to check if a character is an operand (A-Z, a-z, 0-9). Operands are characters or digits that will be pushed onto the stack. Returns true if the character is an operand, false otherwise. */ bool isOperand(char ch) { return (ch >= 'A' && ch <= 'Z')...
ALGO
0.999777
6.831514
{ "github_metadata": { "branch": "master", "commit_count": 308, "repo_created_at": "2023-12-18T18:09: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": "53deb8ce...
3a643ae1-3d10-4bf0-8d98-63c1e2431465
f1nality/tp_2013_09_asd_kildishev
2_1/src/ads8.cpp
//============================================================================ // Name : ads8.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include <ios...
ALGO
0.999827
4.594407
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2014-05-22T10:29:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "376f0b0f9...
80b88350-5c3d-48df-9076-1559a4e7ba91
xian-wen/pat
Advanced/PAT_A1001 A+B_format.cpp
/* 1001. A+B Format (20) 时间限制:400ms 内存限制:64MB 代码长度限制:16KB Description: Calculate a + b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less than four digits). Input: Each input file contains one test case. Each case contains a pair of i...
ALGO
0.999936
4.124039
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2018-05-29T09:46: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": "8297ced39...
427e80f3-889a-49ed-bf54-d573433f3d3d
Juan-Garcia16/Estructuras-de-Datos
TreeBinarySearch/TreeBSNicolle.cpp
#include <stdio.h> #include <stdlib.h> struct treeNode { int key; struct treeNode *parent; struct treeNode *leftChild; struct treeNode *rightChild; }; void inOrderTreeWalk(struct treeNode *x) { if (x != NULL) { inOrderTreeWalk(x->leftChild); printf("%d ", x->key); inOrderTr...
ALGO
0.999997
3.727252
{ "github_metadata": { "branch": "main", "commit_count": 88, "repo_created_at": "2025-02-04T21:32: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": "f71493b2c4e...
6f38625c-3344-48a8-9d04-f18b91bc1cd2
nathansttt/hog2
generic/EDAStar.h
/* * EDAStar.h * hog2 * * Created by <NAME> on 6/6/19 * */ #ifndef EDASTAR_H #define EDASTAR_H #include <iostream> #include <functional> #include "SearchEnvironment.h" #include <unordered_map> #include "FPUtil.h" #include "vectorCache.h" typedef std::unordered_map<uint64_t, double> NodeHashTable; template...
ALGO
0.999703
5.610555
{ "github_metadata": { "branch": "PDB-refactor", "commit_count": 2251, "repo_created_at": "2015-08-19T21:02:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 117, "forks": 62, "issues": 9, "pull_requests": 1 }, "file_meta": { "content_id":...
e081bd97-be2c-49ee-9fa0-2eb2d382b2e0
iRASPA/RASPA3
src/raspakit/cbmc/interactions_external_field.cpp
module; #ifdef USE_LEGACY_HEADERS #include <algorithm> #include <cmath> #include <cstddef> #include <future> #include <iostream> #include <numbers> #include <optional> #include <span> #include <thread> #include <type_traits> #include <vector> #endif module cbmc_interactions_external_field; #ifndef USE_LEGACY_HEADERS...
ALGO
0.971355
7.191512
{ "github_metadata": { "branch": "main", "commit_count": 164, "repo_created_at": "2022-01-31T08:43:35.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 64, "forks": 15, "issues": 15, "pull_requests": 0 }, "file_meta": { "content_id": "14ea5369...
b5898395-5b06-44c9-9516-39fb0aa6ffc0
mahdizahin/CD
final.cpp
#include <iostream> #include <string> using namespace std; int main() { string expression; // Prompt the user for input cout << "Enter an expression: "; getline(cin, expression); // Find the position of the '=' symbol size_t equalPos = expression.find('='); if (equalPos == string::npos) ...
ALGO
0.999146
5.15708
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-10-30T10:03:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9870650562d3...
89d7d3ee-dff4-4137-b15b-6e5c54b2ab6b
autowarefoundation/autoware_core
common/autoware_trajectory/include/autoware/trajectory/interpolator/detail/stairstep_common_impl.hpp
// Copyright 2024 TIER IV, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
ALGO
0.98953
7.664822
{ "github_metadata": { "branch": "main", "commit_count": 414, "repo_created_at": "2021-11-19T03:03:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 94, "forks": 87, "issues": 24, "pull_requests": 24 }, "file_meta": { "content_id": "f06d39d...
ce150dae-0fd8-44a0-a128-d13e289926e1
DeepPathak18/C-_Practical
Prac_5-3.cpp
#include<iostream> using namespace std; class Coordinate { int x,y; public: Coordinate(int x,int y) { this->x=x; this->y=y; } Coordinate operator+(const Coordinate &c) { Coordinate point(0,0); point.x=x+c.x; point.y=y+c.y; return point; } ...
ALGO
0.973698
4.477868
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2025-04-07T12:56:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6a730861d...
b83949cb-a759-4d49-b768-1531e47663b6
qkrtjdrbs/algorithm
1987.cpp
#include <iostream> #include <algorithm> using namespace std; int r, c, ans = 0; int dx[] = {0, 0, -1, 1}; int dy[] = {-1, 1, 0, 0}; bool check[26]; char b[20][20]; void go(int x, int y, int cnt) { ans = max(ans, cnt); for (int k = 0; k < 4; k++) { int nx = x + dx[k]; int ny = y + dy[k]; ...
ALGO
0.999695
3.919021
{ "github_metadata": { "branch": "master", "commit_count": 180, "repo_created_at": "2020-07-17T10:50: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": "1abdb483...
2d922cf9-9f40-417f-9fed-d2ec09cce803
Kodsport/swedish-olympiad-2018
skolkval/flyttkartonger/submissions/accepted/nils_bs.cpp
#include <bits/stdc++.h> using namespace std; int n; vector<int> A; bool test(int d){ vector<int> B; for(int c1 = 0; c1 < n; c1++){ B.push_back(A[c1]); } B[0] += d; for(int c1 = 0; c1 < n-1; c1++){ if(B[c1] < B[c1+1])return 0; int b = (B[c1]-B[c1+1])/2; B[c1]-=b; ...
ALGO
0.999989
4.074883
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2017-12-03T21:24:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7cd9ff1c10...
b148bc21-9fd4-4c6d-be65-2c8029d8b2c4
alvinnardo/licode
leetcode/661.cpp
#include "../template/head.h" #include <bits/stdc++.h> vector<vector<int>> imageSmoother(vector<vector<int>> img) { // 思路:模拟 // 时间 O(mn),空间 O(1) vector<vector<int>> nine_vec{{-1, -1}, {-1, 0}, {-1, 1}, {0, -1}, {0, 0}, {0, 1}, {1, -1}, {1, 0}, {1, 1}}; int m = img.s...
ALGO
0.999816
5.83712
{ "github_metadata": { "branch": "master", "commit_count": 737, "repo_created_at": "2019-10-09T05:42: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": "3abf3974...
ee9d5c10-d44f-42d9-8f43-88cc6c493cae
lnishan/Competitive-Programming_Solutions
Codeforces/Gym/100438C.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <cmath> #include <algorithm> #include <utility> using namespace std; typedef unsigned long long ull; const int C = 16; const ull MOD = 10000 * 10000 * 10 + 7; const ull INV2 = 10000 * 10000 * 5 + 4; const int PW = 52; int c; ull p[C]; int pw[C]; ull ...
ALGO
0.999824
4.116715
{ "github_metadata": { "branch": "master", "commit_count": 81, "repo_created_at": "2015-03-20T05:48:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ba3509a9...
2e63c6c8-cd5a-42e4-9787-e8e3a53a503b
danyalmendigali/competitiveProgramming
Codeforces/987A.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <set> #define all(a) a.begin() , a.end() #define optimus_prime cin.tie(0); cout.tie(0) #define endl "\n" #define vll vector<long long> #define vi vector<int> #define FOR(i, a, b) for(int i = a; i < b; i++) #define sz size() #define ...
ALGO
0.998386
3.823844
{ "github_metadata": { "branch": "main", "commit_count": 1207, "repo_created_at": "2022-12-10T15:47:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ae642af1d...
8049961a-eab0-4726-b40a-cad9160e4488
areZeta/Estructura-de-datos
ListaSimple.cpp
//<NAME> 201877898 //<NAME> 201826858 //<NAME> 201867879 //el proposito de este programa consiste principalmente en aplicar el //concepto de memoria dinamica relacionandola con listas ligadas //comprender el manejo de nodos esto con la finalidad de aprender a utilizar // y diferenciar punteros, referencias a nod...
ALGO
0.979472
3.805897
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-08-17T02:02: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": "457327ec53cf...
43356007-cf9a-45ce-b80b-5ff52ef71d86
ishandutta2007/codeforces-t
turmax/normal/1272/F.cpp
#include <bits/stdc++.h> using namespace std; //#define int long long const int maxn=205;const int maxn1=205; int dp[maxn1][maxn1][maxn];char pr[maxn1][maxn1][maxn];array<int,3> pr1[maxn1][maxn1][maxn]; int32_t main() { string s,t;cin>>s>>t; int n=s.size();int m=t.size(); s.push_back('$');t.push_back('$');...
ALGO
0.999803
3.657417
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:27:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e193341b864b...
7a1d67ae-70d8-4d22-afcb-a1e384a21733
pioneerAlpha/CP_Beginner_B1
Class 19 - solve class 9/G.cpp
#include<bits/stdc++.h> #define ll long long #define N ((int)1e5 + 5) #define MOD ((int)1e9 + 7) #define MAX ((int)1e9 + 7) #define MAXL ((ll)1e18 + 7) #define MAXP ((int)1e3 + 7) #define thr 1e-8 #define pi acos(-1) /// pi = acos ( -1 ) #define fastio ios_base::sync_with_stdio(false),cin.tie(NULL) using namespace s...
ALGO
0.999962
3.988276
{ "github_metadata": { "branch": "master", "commit_count": 207, "repo_created_at": "2020-06-19T08:18:44.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 7, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6ec0b9864...
3f44b781-c0ca-471a-afa6-bbbafea51c9d
Teemperor/cms-externals
Rivet/include/Rivet/Projections/FastJets.hh
// -*- C++ -*- #ifndef RIVET_FastJets_HH #define RIVET_FastJets_HH #include "Rivet/Jet.hh" #include "Rivet/Particle.hh" #include "Rivet/Projection.hh" #include "Rivet/Projections/JetAlg.hh" #include "Rivet/Projections/FinalState.hh" #include "Rivet/Tools/RivetFastJet.hh" #include "fastjet/SISConePlugin.hh" #include "...
ALGO
0.926639
7.250825
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-12-19T08:52: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": "4182a5bc00...
96a684f1-c753-4c89-8e85-b2449db1cff3
rurban/openfpm_pdata_1.1.0
src/Vector/vector_dist_multiphase_functions.hpp
/* * vector_dist_multiphase_functions.hpp * * Created on: Oct 14, 2016 * Author: i-bird */ #ifndef SRC_VECTOR_VECTOR_DIST_MULTIPHASE_FUNCTIONS_HPP_ #define SRC_VECTOR_VECTOR_DIST_MULTIPHASE_FUNCTIONS_HPP_ #include "NN/CellList/CellListM.hpp" #include "NN/VerletList/VerletListM.hpp" template<typename Vecto...
TOOL
0.92279
5.988587
{ "github_metadata": { "branch": "master", "commit_count": 1442, "repo_created_at": "2018-08-09T20:34: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": "44dec37...
208f5891-7749-432a-b015-bc2c82490c35
hbthanh5802/CTDL-GT
DAT_TEN.cpp
#include<bits/stdc++.h> using namespace std; int a[100] = {0}; vector <string> myVector; bool check(string ans){ for(int i = 0; i < myVector.size(); i++){ if(ans == myVector[i]) return false; } return true; } void xuat(int a[], int k){ for(int i = 1; i <= k; i++){ cout << myVector[a[i]...
ALGO
0.999932
3.947556
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-07-01T03:45: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": "54a56de489a7...
33d0da7e-c109-42a2-b5be-efcfef82102d
lzy960601/Google_Coding_Competitions
KickStart/2022/2022D/B.cpp
/***************************************** Author: lizi Email: <EMAIL> Date: 2022-07-10 File: B.cpp *****************************************/ #pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx") #include<bits/stdc++.h> using namespace std; const double eps = 1e-10; const do...
ALGO
0.999974
3.732455
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2019-03-25T02:17:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 134, "forks": 10, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d06373...
e4e74f11-0b7d-4a6e-ac41-4901e92655ce
berkayzuhre/Shortest_Ladder
main.cpp
#include <iostream> #include <sstream> #include <fstream> #include <queue> #include "Grid.h" struct Compare { bool operator()(Edge const & p1, Edge const & p2) { // return "true" if "p1" is ordered before "p2", for example: return p1.ladder_lenght > p2.ladder_lenght; } }; int main(int argc, char* argv[]) { /...
ALGO
0.999821
3.686797
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-03-17T17:59: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": "4ded54c8d5...
38ec4351-5a52-4179-8e1a-e4d80936a991
Mandar1503/leetcode-problems
integer-to-english-words/integer-to-english-words.cpp
class Solution { public: string one(int num) { switch(num) { case 1: return "One"; case 2: return "Two"; case 3: return "Three"; case 4: return "Four"; case 5: return "Five"; case 6: return "Six"; case 7: return...
ALGO
0.994772
5.052426
{ "github_metadata": { "branch": "main", "commit_count": 956, "repo_created_at": "2021-12-26T00: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": "4b633a7359...
8a2d6363-dc0f-42a2-87f4-673395cd0576
Sia819/cpp-Study
명품 c++ Programming/chapter06program01/main.cpp
/* 6장 실습문제1 난의도5 add() 함수를 호출하는 main() 함수는 다음과 같다. ----------------------------------------------------- int main() { int a[] = {1,2,3,4,5}; int b[] = {6,7,8,9,10}; int c = add(a, 5); // 배열 a의 정수를 모두 더한 값 리턴 int d = add(a, 5, b); // 배열 a와 b의 정수를 모두 더한 값 리턴 cout << c << endl; // 15출력 cout << d << endl; // 55출력 } -...
TOOL
0.979363
5.652118
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2022-03-23T00:23: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": "ff25370c80b...
97ce2e1c-c8d8-4158-969e-9001ebe0585c
deepakasu67/leetcode
Old Leetcode/12. Add Two Numbers.cpp
#include<iostream> #include"LinkedList.h" using namespace std; class Solution { public: ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) { ListNode* resultHead = nullptr; ListNode* end = nullptr; int carry = 0; int result = 0; while(l1 || l2) { res...
ALGO
0.999904
5.519697
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2021-12-20T05:40: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": "c2813e57b84...
209778f0-ac13-497a-bea1-c2bb83d38b78
RentoYabuki06/atcoder
bunyabetsu-150/00_ExhaustiveEnumeration/015_AverageLength.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <numeric> #include <iomanip> using namespace std; int N; int X[9]; int Y[9]; long double ft_distance(int x1, int y1, int x2, int y2) { long double ans = sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2)); return ans; } int main() { cin >> ...
ALGO
0.999674
4.325582
{ "github_metadata": { "branch": "main", "commit_count": 192, "repo_created_at": "2024-03-31T03:08: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": "4b9bdd8d54...
c6ef88dc-c715-480a-9588-5d0b44a38577
henry-ch/asynchronous
libs/asynchronous/doc/examples/example_cutoff_sort.cpp
#include <iostream> #include <random> #include <numeric> #include <boost/asynchronous/scheduler/single_thread_scheduler.hpp> #include <boost/asynchronous/queue/lockfree_queue.hpp> #include <boost/asynchronous/scheduler_shared_proxy.hpp> #include <boost/asynchronous/scheduler/multiqueue_threadpool_scheduler.hpp> #incl...
ALGO
0.997277
5.311244
{ "github_metadata": { "branch": "master", "commit_count": 858, "repo_created_at": "2013-07-21T14:07:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 43, "forks": 6, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "b3dbdae...
60949549-a7f0-42bf-bc9e-4e2d8bdf7e63
banimania/CompetitiveProgramming
CSES/Graphs/DownloadSpeed.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll bfs(int s, int t, vector<vector<int>> &adj, vector<vector<ll>> &capacity, vector<int> &prev) { for (int i = 0; i < prev.size(); i++) prev[i] = -1; prev[s] = -2; queue<pair<int, ll>> q; q.push({s, LLONG_MAX}); while (!q.empty()) { in...
ALGO
0.999931
4.80345
{ "github_metadata": { "branch": "main", "commit_count": 103, "repo_created_at": "2025-01-31T20:06:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "74921da89c...
1e869217-f1eb-4623-bfcb-40fafaea8822
Anachor/HellBent
Ashiq's Code Library/data structure/segment tree Max with index.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 2e5 + 100, inf = 1e9 + 100; int tree[4*N]; int a[N]; /// max in a range - keeps index /// initiate a[0] with -inf void build (int cn,int b,int e) { if (b == e) { tree[cn] = b; return ; } int lc = 2*cn , rc ...
ALGO
0.999996
4.497228
{ "github_metadata": { "branch": "master", "commit_count": 209, "repo_created_at": "2019-09-27T07:37:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 59, "forks": 17, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "5eacff...
da946f36-69be-486e-a08b-e5d1911def75
moos-ivp/moos-ivp
ivp/src/lib_behaviors-colregs/BHV_AvdColregsV17.cpp
/*****************************************************************/ /* NAME: <NAME> */ /* ORGN: Dept of Mechanical Engineering, MIT, Cambridge MA */ /* FILE: BHV_AvdColregsV17.cpp */ /* DATE: May 16th, 2013 (combined from individual colrg...
TOOL
0.964146
6.21556
{ "github_metadata": { "branch": "main", "commit_count": 5457, "repo_created_at": "2024-08-05T04:59:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 27, "forks": 18, "issues": 4, "pull_requests": 7 }, "file_meta": { "content_id": "0a08b73b...
f8ee6faf-e7ac-44ed-bd16-a2a1058b38fa
klb3713/aoapc-book
TrainingGuide/bookcodes/ch6/uva11990.cpp
// UVa11990 "Dynamic" Inversion // <NAME> #include<cstdio> #include<vector> #include<algorithm> #include<cassert> using namespace std; inline int lowbit(int x) { return x&-x; } struct Node { Node *ch[2]; // 左右子树 int v; // 值 int s; // 结点总数。有删除标记的结点未统计在内 int d; // 删除标记 Node():d(0) {} int ch_s(int d) { retur...
ALGO
0.999979
3.740954
{ "github_metadata": { "branch": "master", "commit_count": 198, "repo_created_at": "2013-09-22T01:26:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 181, "forks": 56, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "f5e7f...
c2178770-698a-480e-af24-df473bd10039
noushinpervez/Coursework
207 Lab/Final/Minimum Spanning Tree.cpp
#include<iostream> using namespace std; int min_Key(int key[], bool visited[]) { int min = 999, min_index; for (int v = 0; v < 6; v++) { if (visited[v] == false && key[v] < min) { min = key[v]; min_index = v; } } return min_index; } int print_MST(int parent[], ...
ALGO
0.999898
4.320214
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-11T15:53: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": "7195a01337a7...
5c42e320-f068-4267-9c78-b14de5b74db7
kk77777/SPOJ-Solutions
ELEVTRBL/program.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int #define max 1000010 bool vis[max]; int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "rt", stdin); freopen("output.txt", "wt", stdout); #endif ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); ll f, s, g...
ALGO
0.99984
3.318912
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2020-01-21T13: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": "2de5c216a...
fecad8e7-9cc5-4605-b409-d843fe5cd4be
lee-jisung/Algorithm-study
백준/1194번 달이차오른다, 가자./1194.cpp
#include <iostream> #include <algorithm> #include <string> #include <cstring> #include <queue> #include <vector> #include <deque> #include <cmath> #define SIZE 100 #define INF 987654321 using namespace std; struct node { int r; int c; int cnt; int key; }; int n, m, st_r, st_c, result; char map[SIZE][SIZE]; boo...
ALGO
0.999896
3.624802
{ "github_metadata": { "branch": "master", "commit_count": 664, "repo_created_at": "2019-12-04T05:13:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1ac78c56...
f2129ff6-4ad4-491c-b278-720b79451538
alexandraback/datacollection
solutions_2749486_0/C++/tomek204/B.cpp
#include <cstdio> #include <algorithm> #include <vector> #include <iostream> using namespace std; int t, x, y; string solve() { string ret; if(x < 0 && (-x)%2 == 0) { for(int i=1;i<=(-x);i++) ret += "EW"; } if(x > 0 && x%2 == 0) { for(int i=1;i<=x;i++) ret += "WE"; } if(x < 0 && (-x)%2 == 1) { for(int i=...
ALGO
0.999985
4.223814
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c57497ec9...
914a1f40-355c-4335-912b-f275082e110b
PakinDioxide/temp
mitit/M(IT)^2 2025 Spring Invitational Qualification Round 1/b.cpp
/* author : PakinDioxide created : 06/04/2025 22:02 task : b */ #include <bits/stdc++.h> #define ll long long using namespace std; void solve() { int n; cin >> n; ll a[n]; for (auto &e : a) cin >> e; sort(a, a+n); vector <ll> d; d.emplace_back(0); for (int i = 0; i < n-...
ALGO
0.999867
4.864926
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2024-12-10T10:36: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": "aa59846658f...
153d3626-e2cf-4e43-8558-53e1434fc47a
GQH123/Renatus-ACM-Codes
EOJ Monthly 2020.1/E.cpp
#include <bits/stdc++.h> #define rep(i, l, r) for (register int i = l; i <= r; i++) #define per(i, r, l) for (register int i = r; i >= l; i--) #define srep(i, l, r) for (register int i = l; i < r; i++) #define sper(i, r, l) for (register int i = r; i > l; i--) #define maxn 64 #define ll long long int #define pii pair<...
ALGO
0.999947
4.288431
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2022-08-17T06:57: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": "bdf04d9363...
8b663966-3336-41c4-ae8f-37921c3d569c
VivekKumarMishra1301/competative-coding
Linked List/bubble_sort_linked_list.cpp
// bubble sort iterative #include <iostream> class Node { public: int data; Node *next; Node(int data) { this->data = data; this->next = NULL; } }; using namespace std; Node *swap(Node *prev, Node *curr, Node *forw) { if (prev == NULL) { Node *get = curr->next->next;...
ALGO
0.999979
4.972866
{ "github_metadata": { "branch": "master", "commit_count": 608, "repo_created_at": "2022-08-19T19:24: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": "2eb8a46e...
aef9126a-f257-416c-9186-8ec3c7327839
exercism/cpp
exercises/practice/alphametics/alphametics_test.cpp
#include "alphametics.h" #ifdef EXERCISM_TEST_SUITE #include <catch2/catch.hpp> #else #include "test/catch.hpp" #endif TEST_CASE("puzzle_with_three_letters", "[e0c08b07-9028-4d5f-91e1-d178fead8e1a]") { auto result = alphametics::solve("I + BB == ILL"); REQUIRE(result.has_value()); auto m = *resul...
ALGO
0.986186
7.269208
{ "github_metadata": { "branch": "main", "commit_count": 890, "repo_created_at": "2014-03-17T02:12:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 269, "forks": 232, "issues": 68, "pull_requests": 12 }, "file_meta": { "content_id": "5cd38...
eaba7421-14b9-41db-ac5b-1837230e65e9
norwd/tom7misc-svn
llm/karate.h
#include <string> #include <optional> #include <utility> // Karate. // Two fighters and a judge. // Players move simultaneously. // Alternating phases; players simultaneously say something out loud // Red says: "I will avenge my father!" // Blue says: "You are weak." // (or maybe also * Red smiles slyly) // And the...
TOOL
0.910044
5.569758
{ "github_metadata": { "branch": "master", "commit_count": 5410, "repo_created_at": "2023-11-28T00:16: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": "4c8a8b8...
318b82f9-7e88-4d46-b287-a8fe67144e51
AnkitRajavat/some-work-on-dsa
linear linked list.cpp
#include<iostream> #include<stdio.h> #include<malloc.h> using namespace std; struct node{ int data; struct node*next; }*head=NULL,*newnode,*temp,*prev=NULL; int count=0; void create_ll(){ int k,j; do{ newnode=(struct node*)malloc(sizeof(struct node)); cout<<" enter the data in linked list ->:"; cin>...
ALGO
0.999586
3.381285
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-06-17T09:56: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": "dffed2377e34...
8d21576b-0d38-4e85-bb60-ec57c0d4735f
AbbasZaidi11/DSA_Learning
Binary_search/BS_on_1D_arrays/implement_upperBound.cpp
#include <bits/stdc++.h> using namespace std; int main() { vector<int> arr = {5, 6, 8, 9, 6, 5, 5, 6}; int n = 8; int x = 10; pair<int, int> ans; int floor = INT_MIN; int ceil = INT_MAX; int floor_count = 0; int ceil_count = 0; for (int i{0}; i < n; i++) { if (arr[i] > fl...
ALGO
0.999977
4.294752
{ "github_metadata": { "branch": "main", "commit_count": 351, "repo_created_at": "2023-05-04T12:27:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "81b940206b...
c0edeb7e-c7f5-4a55-8996-3e41af6ff3e5
kwheelerj/Challenges
hackerrank/practice/InterviewPreparationKit/01_Warm-upChallenges/02_CloudJumper.cpp
#include <bits/stdc++.h> using namespace std; vector<string> split_string(string); // Complete the jumpingOnClouds function below. /* * c = [0, 1, 0, 0, 0, 1, 0] * Cannot land on '1's. * Start at index 0. * Can jump from index i to either i+1 or i+2, so long * as i+1 or i+2 != 1. * What is the minimum number ...
ALGO
0.999958
4.372574
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-04-27T22:22: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": "26479f76c9...
b152344e-eb69-41da-ad90-851884648d5b
wnch/selectdb
be/src/olap/rowset/segment_v2/segment_iterator.cpp
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may...
TOOL
0.958183
4.719719
{ "github_metadata": { "branch": "master", "commit_count": 4700, "repo_created_at": "2022-06-22T06:52:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2d15bd6...
d164821b-3df9-45a2-93ee-f99ee0070320
ruritoBlogger/AtCoder
abc062/a/main.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define INF_LL 1LL << 60 #define INF 99999999 #define MOD (ll)1000000007 #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define REP(i, a, n) for(int i = a; i < (int)(n); i++) #define all(x) (x).begin(),(x).end() void put_double(double obj){printf(...
ALGO
0.999985
3.710014
{ "github_metadata": { "branch": "master", "commit_count": 90, "repo_created_at": "2018-07-21T15:52:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "08df64565...
5ab96bc5-b5b0-48a3-9c52-b980eb7f3f73
Falihth/RISET_SAR
mainCompass.ino
/* Riset robot yang kami lakukan hanya dengan menggunakan sensor Compass GY-271 sebagai penunjuk arah robot dalam melewati rintangan. */ void lombaCompass() { switch (runSt) { case 0: // Diam Serial.println("Stop"); if (XYst == 0) gripper(170, 170, 0.5); // delay(200); stopValue(); in_s...
ALGO
0.936973
3.782693
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2024-10-31T19:14: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": "acc6eab970...
4c1371cf-3f1d-415f-b5a1-cfc0c73b8565
primaryodors/primarydock
src/test/bb_test.cpp
#include "../classes/search.h" int main(int argc, char** argv) { Protein p("Test Receptor"); Molecule m("Test Ligand"); std::vector<BallesterosWeinstein> pocketcen_res; std::vector<std::string> atoms_of_interest; bool priorities[256]; bool save_tmp_pdbs = false; int i, j; for (i=0; i...
TOOL
0.96885
4.067586
{ "github_metadata": { "branch": "stable", "commit_count": 952, "repo_created_at": "2022-05-24T00:12:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 4, "issues": 56, "pull_requests": 4 }, "file_meta": { "content_id": "87820c5...
98af4ce4-6e1a-44df-b529-b63845b48928
edyeftimie/Rust-Golang
Cplusplus/PbInfo/Fldi/fldiadinainte.cpp
#include <fstream> #include <iostream> #include <exception> using namespace std; struct nod { int info; nod *ant; nod *urm; }; void FLdiAdInainte(nod *&prim, nod *&ultim, int x); int main() { ifstream f("fldiadinainte.in"); nod *prim, *ultim, *p, *q; int k; f >> k; prim = new nod; ...
ALGO
0.99967
4.379831
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-02-20T00:07: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": "01fdbfa79b0b...
06aa1882-e5e1-4b20-8720-3e9c30facb38
moinulshaon/UVa-Problems
vol 103/10397/10397.cpp
#include <iostream> #include <cstdio> #include <algorithm> #include <cmath> using namespace std; struct lists { int start; int end; double distance; } a [600000]; int parent [1000]; int size[1000]; int vertex; int edges; struct mathv{ int x,y; }location[1000]; double distance2DPointAndPoint(mathv&...
ALGO
0.999683
3.873115
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2016-07-05T15:35:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "484b443a1...
fac253d7-0457-4165-92fb-218899ba075f
overIsAC/contest
cf/600/665/d.cpp
#include <bits/stdc++.h> using namespace std; using LL = long long; using PII = pair<int, int>; #define lson (k << 1) #define rson (k << 1 | 1) #if LEMON #define db(x) cout << "function " << __FUNCTION__ << ", line " << __LINE__ << " : " << #x << " " << x << endl; #else #define db(x) #endif const int mod = 7 + 1e9; /...
ALGO
0.999974
3.413674
{ "github_metadata": { "branch": "main", "commit_count": 131, "repo_created_at": "2022-10-30T18:24: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": "00641e38e5...
91a0967f-64d7-43e1-9bb1-35fd14e67ebc
ChessCoder1729/Competitive-Programming
CP/algo/Math/Factors.cpp
// DONT FORGET TO RUN SIEVE // Credits : NEAL's template vector<int> smallest_factor; vector<bool> prime; vector<int> primes; void sieve(int maximum) { maximum = max(maximum, 1LL); smallest_factor.assign(maximum + 1, 0LL); prime.assign(maximum + 1, true); prime[0] = prime[1] = false; primes = {}; ...
ALGO
0.999783
4.634539
{ "github_metadata": { "branch": "main", "commit_count": 103, "repo_created_at": "2024-07-06T07:14: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": "0dc8d9b258...
a139345d-81d7-46ea-9bcd-9e753c8ca868
canetizen/itu-cmpe-undergrad
BLG223E Data Structures/Homeworks/HW2/src/huffman.cpp
//--- 2022-2023 Fall Semester Data Structure Assignment 2 ---// //--------------------------// //---Name & Surname: <NAME> //---Student Number: 150200097 //--------------------------// //-------------Do Not Add New Libraries-------------// //-------------All Libraries Needed Were Given-------------// #include <iostrea...
ALGO
0.984515
3.18847
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2025-01-26T14:16:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9f13fb31fb0...
fc52bb58-bc4e-48af-9568-cff2ab53a956
ishandutta2007/codeforces-c
christ/normal/1010/D.cpp
#include <bits/stdc++.h> using namespace std; const int MN = 1e6+2; int c[MN][2]; int t[MN]; bool irrel[MN]; bool flip[MN]; void dfs (int cur) { if (t[cur] == 5) { flip[cur] = c[cur][0]; return; } dfs(c[cur][0]); if (~c[cur][1]) dfs(c[cur][1]); if (t[cur] == 1) flip[cur] = flip[c[cur][1]] & flip[c[cur][0]]; el...
ALGO
0.999935
4.450451
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:17: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": "9db616e4b7a4...
e7d58bfd-b9cb-49df-9c7e-c1d97d31fb32
kkmk11/Codes_CPP
Digital_KeyPad.cpp
// Given a classic mobile phone, and the key pad of the phone looks like below. // 1 2 3 // abc def // 4 5 6 // ghi jkl mno // 7 8 9 // pqrs tuv wxyz // * 0 # // You are given a string S contains digits between [2-9] only, // For example: S = "2", then the possible wo...
ALGO
0.999744
4.735051
{ "github_metadata": { "branch": "main", "commit_count": 244, "repo_created_at": "2023-01-24T10:21:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "732caac4d1...
3f0705be-0602-4dd6-adab-ef3d5b839a2d
schafar92/antlr-cpp
code/5/6194dd99e2ae5eb939384ce1ffc72d4f2eed6b91.cpp
/*-------------------------------------------------------------------- (C) Copyright 2006-2011 Barcelona Supercomputing Center Centro Nacional de Supercomputacion This file is part of Mercurium C/C++ source-to-source compiler. See AUTHORS file in the top level directory for inform...
ALGO
0.986758
6.469714
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-09-03T13:09: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": "0ad738f2cc...
bb3c6b7c-fe32-4bfc-9247-d1418c43f2a1
JakinChan200/Practice
CTCI/Data Structures/Chapter1 Arrays and Strings/Exercise2.cpp
//Given two string, check if one is a permutation of the other #include <string> #include <cstring> #include <iostream> #include <vector> #include <algorithm> using namespace std; //Compare two substrings bool isEqual(string checkFirst, string checkSecond){ vector<vector<char>> charStorage(10, vector<char>(0, ...
ALGO
0.999885
5.395936
{ "github_metadata": { "branch": "main", "commit_count": 129, "repo_created_at": "2022-06-27T01: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": "fa0bc0bf5a...
a2ddfb68-22df-41a4-9db5-b6ee0dc311ed
dormon/Shadows
src/HSSV/Octree.h
#pragma once #include <Node.h> #include <vector> #include <map> //#define OCTREE_MAX_MULTIPLICITY 2 class Octree { public: Octree(u32 maxRecursionDepth, const AABB& volume); AABB getNodeVolume(u32 index) const; s32 getNodeParent(u32 nodeID) const; s32 getChildrenStartingId(u32 nodeID) const; s32 getNodeInde...
ALGO
0.938408
5.873114
{ "github_metadata": { "branch": "master", "commit_count": 502, "repo_created_at": "2018-05-02T18:13:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0eb00210...
c72f08d8-3ce6-432f-b1ac-529fa3548974
PravinMandal/Supreme_3.0_DSA
16. Binary Search Tree/01. Lec 1/03_Delete_Node.cpp
#include<iostream> #include<queue> using namespace std; class Node { public: int data; Node* left; Node* right; Node(int val) { this->data = val; left = NULL; right = NULL; } }; Node* builtBST(int val, Node* root){ if(root == NULL) { root = new Node(val); ...
ALGO
0.999949
3.876966
{ "github_metadata": { "branch": "main", "commit_count": 431, "repo_created_at": "2024-02-21T06:19: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": "886a8fc243...
9f823c60-ad89-4081-86ec-c2ad8cb46a6b
rahulgihub8279/search_algo
jump_search.cpp
#include <iostream> #include <math.h> using namespace std; int jump_search(int arr[], int key, int size) { int st = 0; int step = sqrt(size); int end; while (st < size) { end = step; if (arr[st] == key) { return st; } else if (arr[end] < key) { st = end; ...
ALGO
0.999966
4.769749
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-02-11T12:35: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": "e1725ce7cc...
62f597a9-fac5-4b02-987d-577b0230786e
kamyu104/LeetCode-Solutions
C++/minimum-cost-walk-in-weighted-graph.cpp
// Time: O(n + e + q) // Space: O(n) // union find class Solution { public: vector<int> minimumCost(int n, vector<vector<int>>& edges, vector<vector<int>>& query) { UnionFind uf(n); for (const auto& e : edges) { uf.union_set(e[0], e[1], e[2]); } vector<int> result(size(...
ALGO
0.999882
5.873562
{ "github_metadata": { "branch": "master", "commit_count": 19395, "repo_created_at": "2018-10-11T17:38:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4939, "forks": 1616, "issues": 1, "pull_requests": 55 }, "file_meta": { "content_id": ...
651c32bc-62be-4054-b0eb-9b532bd4907d
rachitiitr/DataStructures-Algorithms
Library/Tree/trie.cpp
#include<iostream> #include<vector> #include<map> #include<assert.h> #include<algorithm> using namespace std; class Trie { map<char, Trie*> m_keys = {}; // what are the next avail chars in trie node int m_traversed = 0; // how many words in trie are proper prefix bool m_isLeaf = 0; // is this trie node a leaf no...
ALGO
0.998966
5.23476
{ "github_metadata": { "branch": "master", "commit_count": 118, "repo_created_at": "2017-10-01T07:04:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2879, "forks": 995, "issues": 1, "pull_requests": 34 }, "file_meta": { "content_id": "97...
de4ac499-5f43-4f20-bc13-2bb99f0b7fe7
MarkGillespie/CEPS
src/IO.cpp
#include "IO.h" namespace CEPS { std::vector<std::pair<size_t, double>> readPrescribedConeAngles(std::string filename) { return readIndexValuePairs(filename); } std::vector<std::pair<size_t, double>> readPrescribedScaleFactors(std::string filename) { return readIndexValuePairs(filename, 0); } std::vector<st...
TOOL
0.937117
6.408546
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2021-08-25T21:36:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 105, "forks": 14, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "08c6f191...
a67b9773-a3d5-42cf-8b1a-702026ea1a2a
Bhavesh0327/Haffun_with_DSA
Trees/Trees-morrisTraversal.cpp
/************************************************************** * inorder traversal without recursion and stack ****************************************************************/ #include<iostream> #include<bits/stdc++.h> using namespace std; struct node{ int data; struct node* left; struct node* right; }...
ALGO
0.999999
5.084976
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2020-06-05T05:27:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "854c31c29...
ded4b079-d352-4ee1-af29-b5e0bb556fc5
Sharma-005komal/Graph_Data_Structure
Number_Of_Enclaves_BFS.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution { public: int numberOfEnclaves(vector<vector<int>> &grid) { // Code here int n = grid.size(); int m = grid[0].size(); ...
ALGO
0.999918
6.491578
{ "github_metadata": { "branch": "main", "commit_count": 58, "repo_created_at": "2022-07-16T14:27:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8e8c837c843...
cabe53e9-89b8-44cd-88ab-c91023ea9d34
JadnAzzam/Competitve_Programming_Problems-Solutions
Find_Three_Largest_Numbers.cpp
// Find Three Largest Numbers // Write a function that takes in an array of at least three integers and, without sorting the input array, returns a sorted array of the three largest integers in the input array. // The function should return duplicate integers if necessary; for example, it should return [10, 10, 12] f...
ALGO
0.99999
5.125951
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2022-01-13T16:17: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": "fadb865e854...
2523b5a3-c239-446c-915e-2a6b1c878a39
sideb0ard/SoundB0ard
src/fft_processor.cpp
#include "fft_processor.h" #include <array> #include <iostream> #include <sstream> #include <unordered_map> #include <vector> #include "defjams.h" namespace { // Helper function to wrap the phase between -pi and pi double WrapPhase(double phase_in) { if (phase_in >= 0) return fmodf(phase_in + M_PI, 2.0 * M_PI)...
ALGO
0.998268
5.988027
{ "github_metadata": { "branch": "main", "commit_count": 1742, "repo_created_at": "2015-10-18T03:34:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 50, "forks": 2, "issues": 6, "pull_requests": 0 }, "file_meta": { "content_id": "e6a11a8e...
cc469e0d-b340-47a9-8c46-c6f0449ae59d
Liech/Farfalle
Source/Voxel/Voxelizer.h
#pragma once #include <vector> #include <memory> #include <glm/glm.hpp> //http://research.michael-schwarz.com/publ/files/vox-siga10.pdf (4.1 Direct, triangle-parallel solid voxelization) //missing implementation for: //https://learn.microsoft.com/en-us/windows/win32/direct3d11/d3d10-graphics-programming-guide-raster...
ALGO
0.963784
6.18006
{ "github_metadata": { "branch": "main", "commit_count": 249, "repo_created_at": "2023-05-23T17:20:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bc16f2c583...
a397c0a1-9c46-4f0c-b346-7a838f86442f
alex-cornejo/heuristic_ckc
src/CkcSolver.h
// // Created by alex on 26/05/20. // #ifndef CKC_CPP_CKCSOLVER_H #define CKC_CPP_CKCSOLVER_H #include <vector> #include <map> #include <tuple> class CkcSolver { public: CkcSolver(int k, int L, const std::vector<std::vector<int>> &G, int rep); private: int k; int L; std::vector<std::vector<int>> G;...
ALGO
0.999667
6.050375
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2020-06-03T21:40:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8f4449e6b...
622c0351-6eda-4596-a5b5-06793302a7ee
Dan178A/cpp_Samuel
II unidad/ejercicio2.cpp
#include <iostream> using namespace std; int main() { int a, b, c; cout << "Ingrese la longitud del lado a en cm: "; cin >> a; cout << "Ingrese la longitud del lado b en cm: "; cin >> b; cout << "Ingrese la longitud del lado c en cm: "; cin >> c; cout << "Lados introducidos: a = " << a...
ALGO
0.97355
4.456729
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-12-11T14:33: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": "1f26d00a5be4...
35194928-25be-46ec-9aad-d6bfe315af21
ifradK/Competitive-Programming-Solutions
C++ Programs/Wilbur and Swimming Pool.cpp
#include<iostream> #include <bits/stdc++.h> using namespace std; main() { int n,i,area1,area2,area3,area4,area5,area6; cin>>n; int x[n],y[n]; for(i=0;i<n;i++) { cin>>x[i]>>y[i]; } if(n==1) { cout<<-1; return 0; } else if(n==2) { area1=abs(x[0]-...
ALGO
0.99985
3.616773
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-04-21T13:25: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": "2b3dc8a3292e...
18db85c7-0cf7-43c2-b09f-e443cb93256e
krithikvaidya/DSA-Problems-Solutions
Codeforces/Div 2 633/c.cpp
#include <bits/stdc++.h> #define lli long long int #define ld long double using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); int t; cin >> t; for (int i = 0; i < t; i++) { int n; cin >> n; ...
ALGO
0.999672
4.281782
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2019-10-31T16:07: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": "a78be3cd5...
82c6220d-32b6-44b4-b67b-f01df0af5f1d
mahadi-hasan16/Solvings
Codeforces/CF 1742E.cpp
/* <NAME> Dept. of Computer Science and Telecommunication Engineering (CSTE). Noakhali Science and Technology University (NSTU). */ #include<bits/stdc++.h> #define pb push_back #define eb emplace_back #define mp make_pair #define pi acos(-1) #define lcm(a,b) (a*b)/__gcd(a,b) #define all(v) v.begin(),v.end() #define w(x...
ALGO
0.999778
3.761322
{ "github_metadata": { "branch": "main", "commit_count": 210, "repo_created_at": "2022-10-31T20:48: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": "18092ea91a...
48b3dfd2-89c5-48a4-86fc-6bac3186511d
15Andrew43/CPP
semestr3/contest1/MergeSort/main.cpp
#include <iostream> #include <vector> #include <iterator> template <typename Iterator, typename IteratorC, typename Cmp = std::less<typename std::iterator_traits<Iterator>::value_type>> IteratorC Merge(Iterator a_beg, Iterator a_end, Iterator b_beg, Iterator b_end, IteratorC c, Cmp cmp = Cmp()) { while (a_beg != a...
ALGO
0.999969
5.531591
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2020-09-11T21:41: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": "3cd49fe4f...
5a5c35af-e671-4ebd-8e3d-5b8b2b849b8b
hjiang13/LLM4IR
results/Task2_IR_Decompilation/DecompiledResuts_Human_x_164_O1/GPT4o_Human_x_164_O1_decompiled/CPP_33.cpp
```cpp #include <vector> #include <stdexcept> #include <cstdlib> #include <cstring> void throw_length_error(const char* msg) { throw std::length_error(msg); } void throw_bad_alloc() { throw std::bad_alloc(); } void* allocate_memory(size_t size) { void* ptr = malloc(size); if (!ptr) throw_bad_alloc();...
TOOL
0.998738
5.635604
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2025-05-21T20:32:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ed9393fcc1e...
952397f1-b151-4e42-8bb6-94256a302edd
avishagMinnes/OS3
ex3.cpp
#include <iostream> #include <vector> #include <stack> #include <list> #include <unordered_set> #include <algorithm> #include <chrono> using namespace std; using namespace std::chrono; class Graph { public: Graph(int n, int m) : n(n), m(m) { graph.resize(n + 1); reverseGraph.resize(n + 1); } ...
ALGO
0.998354
5.813691
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-12-11T10:29: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": "3e0226225017...
a1dae993-57f7-4407-9cac-aa5d7adc0d5e
Student-Fuz/LeetCode
99_practice/Hot100/14_heap/13_01_findKthLargest.cpp
#include <iostream> #include <string> #include <array> #include <vector> #include <unordered_map> #include <unordered_set> #include <set> #include <algorithm> using namespace std; // 题目描述 // https://leetcode.cn/problems/kth-largest-element-in-an-array/?envType=study-plan-v2&envId=top-100-liked // Solution // 不懂算法的写法...
ALGO
0.999738
5.781013
{ "github_metadata": { "branch": "master", "commit_count": 121, "repo_created_at": "2024-11-15T12:10: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": "aa5f970a...
38362b31-3fe1-476d-b2c8-0ebd1fb336df
ALANPANCHENKO/SIBUniversity
3 семестр/СиАОД 3 семестр/LB9_SHAN_Fano.cpp
#include <iostream> #include <cmath> #include <random> #include <algorithm> #include <stdlib.h> #include <unordered_map> #include <fstream> #include <functional> using namespace std; void shannon(const int n, double p[], int Length[], char c[][20]) { double *q = new double[n]; q[0] = 0; Length[0] = -floor...
ALGO
0.999216
4.29182
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2023-06-02T10:24: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": "e57d0dbce09...
774c6b63-f60a-461d-af84-e40433e1b8eb
Pufikas/NSA-Egzaminai-IT
2023/u2/main.cpp
#include <fstream> #include <iostream> #include <string> #include <algorithm> using namespace std; struct Slaptazodis { string slap = ""; int ilgis; int didzRaides; int mazRaides; int skaiciuKiekis; int specSimboliai; string stiprumas; }; struct PanasusSlap { string slap = ""; int...
ALGO
0.99823
3.087711
{ "github_metadata": { "branch": "main", "commit_count": 76, "repo_created_at": "2025-02-12T18:23: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": "bc8598878dc...
1e4c601e-dba9-4245-844a-cd8ebb67f445
luhtalam/Algoritmit-ongelmanratkaisussa
Viikko06_lampotila/Viikko06_lampotila/main.cpp
#include <iostream> #include <math.h> using namespace std; int p[100000]; int A[100000][18]; int B[100000][18]; int main() { cin.sync_with_stdio(0); int n,q; cin >> n; for (int i = 1; i <= n; i++) { cin >> p[i]; A[i][0] = p[i]; B[i][0] = p[i]; } int l; for (int i =...
ALGO
0.999967
4.17899
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2017-12-28T12:10: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": "b43f1a49d8...
a86a407c-7097-4c01-a89b-4ff1a81554ed
machuiwen/LeetCode-Solutions
Medium/ReorderList.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: void reorderList(ListNode* head) { if (head == NULL || head->next == NULL) return; // split ListNode* fast =...
ALGO
0.999989
6.011626
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2015-09-23T22:51:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cd24d841a...
f43ff09c-9aca-45b1-aa95-a02bd905c3f8
VinhTungg/PTIT_DSA
DSA03023 - SAP XEP VIEN BI.cpp
#include <bits/stdc++.h> #define ll long long #define boost ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define endl "\n" #define MOD 1000000007 using namespace std; int t = 1; int main(){ boost; // cin >> t; while(t--){ int n; cin >> n; string s; cin >> s; int count_...
ALGO
0.999964
4.063583
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2025-04-05T08:06:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bff1097d2d23...
8046a7f7-c2a9-4233-8196-ec845d06fff9
ShahPranav1094-Courses/Algorithms-DataStructures
BackTracking/SudokuSolver.cpp
#include<iostream> using namespace std; /* Global Variables */ int GridSize; /* Print Sudoku Table */ void Print(int** S, bool isSolved) { if(isSolved) cout << endl << "The solved sudoku table is : " << endl << endl; else cout << endl << "The initial sudoku table is : " << endl << endl; cout << "-------------...
ALGO
0.99413
6.033529
{ "github_metadata": { "branch": "master", "commit_count": 303, "repo_created_at": "2019-09-17T10:58:02.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0db7de6cb...
ef3e267c-979d-42d9-bad0-ef491a553fe8
dheerujilagam/leetcode
Add Binary Strings - GFG/add-binary-strings.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends //User function template for C++ class Solution{ public: string addBinary(string a, string b) { // your code here int n=a.size(),m=b.size(); if(n>m){ int t=n-m; while(t--){ b='0'+...
ALGO
0.999959
6.411041
{ "github_metadata": { "branch": "main", "commit_count": 1998, "repo_created_at": "2022-07-27T09:15: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": "99b26eabd...
7e1e13fb-ed0a-41eb-90e8-f2555f168443
Ayjay/aoc
2024/day4.cpp
#include "aoc2024.h" #include <string_view> #include <tuple> #include <utility> #include <vector> #include <fmt/core.h> #include <boost/hana/tuple.hpp> #include <boost/unordered_map.hpp> #include <boost/parser/search.hpp> #include <boost/multi_array.hpp> #include <catch2/catch_test_macros.hpp> namespace day4 { u...
ALGO
0.988766
5.757956
{ "github_metadata": { "branch": "master", "commit_count": 231, "repo_created_at": "2022-12-02T22:10: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": "a0ca5973...
ecb710bc-efa8-4052-85da-74e77b394a0d
shaheryar003/Data-Structures-C-
heap.cpp
#include <iostream> using namespace std; struct Node{ int info; Node *left,*right; }; class bst{ public: Node *root,*temp,*temp1,*temp2 ,*temp3; bst(){ root=NULL; } void inorder(Node *temp){ if (root == NULL){ return; } if(temp->left!= NULL){ inorder(temp->left); } if(...
ALGO
0.999858
4.031373
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-12-27T17:20: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": "8ae5d6354085...