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
6f1467ed-74a6-4110-9efe-9cdbddf7dfa9
khyatig95/CrackingTheCodingInterview
LinkedLists/2_1.cpp
//Assumption : Linked list is made of integers //Algorithm : isDup : Iterates through the list for each element to check for duplicate // Time Complexity : O(N^2) ; Space Complexity : O(1) // isDupHash : Stores element from list to hash one at a time. If element // already exis...
ALGO
0.999223
5.152567
{ "github_metadata": { "branch": "main", "commit_count": 68, "repo_created_at": "2022-07-16T15:01:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 10, "pull_requests": 0 }, "file_meta": { "content_id": "66ee88fc17...
91fff8b8-8950-4c39-a43b-5accb4c2cec5
hexL3t/arduino-robotics
common-resources/4_DrivingShapes/4_Hexagon.ino
// Robot setup void setup() { // Motor Set Up pinMode(13, OUTPUT); // Set Pin 13 as output pinMode(11, OUTPUT); // Set Pin 11 as output } // Main loop - runs repeatedly void loop() { delay(5000); // Wait for 5 seconds hexagon(); // Perform the hexagon pattern stopMotors(); ...
ALGO
0.903224
5.505499
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2024-10-03T07:46:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "09ba17b153a...
81b282f0-fc02-4949-bf8e-789d98bf7148
ND0322/CompetitiveProgramming
Dmoj/UACC/UACC 1 P3 - Cheeky Checkers.cpp
#include <bits/stdc++.h> #include <iostream> #include <queue> using namespace std; char grid[9][9]; vector<int> di = {1,1,-1,-1}; vector<int> dj = {1,-1,1,-1}; //backtracking int ans = 0; void dfs(int x, int y, int d, bool start = 1){ if(x < 0 || x >= 8 || y < 0 || y >= 8) return; if(grid[x][y] != '.' &&...
ALGO
0.998397
3.85744
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2024-03-26T05:46: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": "582a78758d3...
5f92a475-3de9-4b2a-b346-7e2f4faf1cf5
dye8128/ABC
357D.cpp
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using ll = long long; using str = string; using pint = pair<int, int>; using pll = pair<ll, ll>; template<class T>using vc = vector<T>; template<class T>using vvc = vc<vc<T>>; using vint = vc<int>; using vll = vc<ll>; using vstr = vc<str>; using vpint...
ALGO
0.999967
4.690491
{ "github_metadata": { "branch": "master", "commit_count": 67, "repo_created_at": "2024-05-03T07:47: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": "bb4d58d04...
f9692907-c7c7-4b72-874e-db9f651d9895
Tejas1202/MasteringDSAndAlgo
Queue/queue_using_array.cpp
// Queue implementation using Array #include <cstddef> #include <iostream> using namespace std; class Queue { private: int size; int front; int rear; int* Q; public: Queue(); Queue(int size); void Enqueue(int x); int Dequeue(); void Display(); bool IsFull(); bool IsEmpty(); ~Queue() { delete[]Q; } }; Qu...
ALGO
0.996712
4.951579
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2020-06-10T04:22:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f382a6e24...
1918084c-4bca-4e62-91ac-6cfdfadf9828
simpcomp-team/simpcomp
src/reduce_complex.cpp
// // reduce_complex.cpp // Bistellar // // Created by <NAME> on 22.10.11. // Copyright 2011 -. All rights reserved. // #include "reduce_complex.h" #include <iostream> #include <stdlib.h> #include <time.h> const unsigned int baseHeating = 4; const unsigned int baseRelaxation = 3; void reduce_complex(MovableCo...
ALGO
0.99982
3.737108
{ "github_metadata": { "branch": "master", "commit_count": 483, "repo_created_at": "2015-05-18T22:42:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 2, "issues": 3, "pull_requests": 5 }, "file_meta": { "content_id": "734eae92...
fb630a30-7f0a-456c-a6a2-b5d5275ee4be
RAJPATEL-DROID/LeetCode-Repo
Shortest Source to Destination Path - GFG/shortest-source-to-destination-path.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 shortestDistance(int N, int M, vector<vector<int>> A, int X, int Y) { // code here if(A[0][0] == 0 || A[X][Y] == ...
ALGO
0.999961
5.695187
{ "github_metadata": { "branch": "master", "commit_count": 2359, "repo_created_at": "2023-01-27T18:37: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": "578fe88...
6ecc9460-ee7b-4595-8696-add5f5768817
zqx123321/Connect6
MyConnect/Game.h
#pragma once #include "Search.h" class Game { private: char resMove[5]; int computerSide; Search search; public: ChessBoard chessBoard; int choose; Game(){ memset(resMove, '\0', sizeof(resMove)); computerSide = -1; } void init(){ chessBoard.init(); computerSide = -1; } char* move(Step step){ Step...
ALGO
0.999353
3.802174
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-07-15T13:55:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "939f83e615...
430f58e4-c5bf-484d-b2b3-8d67de624679
slajerek/RetroDebugger
src/Emulators/nestopiaue/core/NstVideoFilterHq3x.inl
//////////////////////////////////////////////////////////////////////////////////////// // // Nestopia - NES/Famicom emulator written in C++ // // Copyright (C) 2003 MaxSt ( <EMAIL> ) // Copyright (C) 2003-2008 <NAME> // // This file is part of Nestopia. // // Nestopia is free software; you can redistribute it and/or ...
ALGO
0.934405
4.63676
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2021-03-06T00:16:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 240, "forks": 28, "issues": 32, "pull_requests": 1 }, "file_meta": { "content_id": "4434d...
d2e2e3c2-50ed-4772-a9cf-a425fd14dfee
ishandutta2007/codeforces-d
deemo/normal/257/A.cpp
#include<iostream> #include<cmath> #include<algorithm> using namespace std; const int MAXN = 50 + 5; int n, m, k; int vec[MAXN]; int main(){ cin >> n >> m >> k; for (int i = 0; i < n; i++) cin >> vec[i]; if (k >= m){ cout << 0 << endl; return 0; } sort(vec, vec + n); reverse(vec, vec + n); int sum = 0;...
ALGO
0.999992
3.93165
{ "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": "1a6ddc65b8e6...
83ffc836-07ff-4738-845c-5f5444a273da
zjsxzy/algo
Spoj/P3915_MPOLSTAR.cpp
#include <map> #include <set> #include <list> #include <cmath> #include <queue> #include <stack> #include <bitset> #include <vector> #include <cstdio> #include <string> #include <sstream> #include <cstdlib> #include <cstring> #include <iostream> #include <algorithm> using namespace std; const int MAXN = 55; const doub...
ALGO
0.999939
3.68278
{ "github_metadata": { "branch": "master", "commit_count": 1296, "repo_created_at": "2013-05-18T10:52:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9b486f7...
2ca6b78f-53d3-4491-9247-20feca41ae3f
kripken/ammo.js
bullet/Extras/CDTestFramework/Opcode/OPC_AABBCollider.h
/* * OPCODE - Optimized Collision Detection * http://www.codercorner.com/Opcode.htm * * Copyright (c) 2001-2008 <NAME>, <EMAIL> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission...
ALGO
0.997731
5.858193
{ "github_metadata": { "branch": "main", "commit_count": 434, "repo_created_at": "2011-05-28T23:08:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4355, "forks": 574, "issues": 161, "pull_requests": 14 }, "file_meta": { "content_id": "75...
d132a0b1-9a19-42dc-8901-f54010ed171d
terracraft321/Calculator
main.cpp
#include <cstdio> #include <iostream> #include <cmath> // A Calculator made in C++ // Copyright <NAME> 2021 void Addition() { int xx; int yy; std::cin >> (xx); std::cin >> (yy); std::cout << (xx + yy) << std::endl; } void Substraction(){ int xx; int yy; std::cin >> (xx); std::cin >> (y...
ALGO
0.988255
3.865981
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2021-04-30T16:57: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": "0c056e98ab...
40ef3c4c-1c21-471d-94c0-29430b4ae445
elmachotroso/unreal_devtoolbox
Engine/Source/Runtime/Experimental/Iris/Core/Public/Iris/ReplicationSystem/Filtering/NetObjectGridFilter.h
// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "Iris/ReplicationSystem/Filtering/NetObjectFilter.h" #include "Net/Core/NetBitArray.h" #include "Containers/ChunkedArray.h" #include "Math/Vector.h" #include "UObject/StrongObjectPtr.h" #include "NetObjectGridFilter.generated.h" namespace UE::N...
TOOL
0.940531
7.207424
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-03-23T14:37:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "93194859241e...
512032e4-8b3e-4033-a791-53cb28f68724
Injamam321/leetcode_problem_solving
merge_two_sort.cpp
// 21. Merge Two Sorted Lists // cpp Solution! problem-21 #include <bits/stdc++.h> using namespace std; // 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) ...
ALGO
0.999988
6.540928
{ "github_metadata": { "branch": "main", "commit_count": 66, "repo_created_at": "2024-12-06T04:35:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "24830ad85e5...
61e7ad74-1a3b-4a34-8e21-f24040642f1a
xQQsHia/OurTakeOnBigONotation
quickSort.cpp
#include<iostream> int split(int array[], int begin, int end) { int pivot = array[begin]; int left = begin; int rigth = end; int aux; while(left < rigth) ///mientras no se cruzen los indices { while(array[rigth] > pivot) rigth--; while((array[left] <= pivot) && (...
ALGO
0.99992
4.810706
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-12-02T02:36:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2f2ee5fecb...
683e07b0-2e49-405a-a411-e0c673d07b69
NhatBarbie001/myGame
boss.cpp
#include "boss.h" boss :: boss(){ /* mgun_deg = 0; is_created = 0; count_frames_gun = 0; done_shoot = 1; blood_level = 0; is_destroyed = 0; last_shoot = 0; */ } double boss :: find_enemy(double x, double y, double a, double b){ double rt; if(a >= x){ if(b == y) rt...
TOOL
0.912408
3.720247
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2023-04-29T08:02:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eb7770aff1...
00a31bf7-db72-4fbd-9e24-f590682f6f38
mandalsudipti/AtcoderSolutions
BeginnerContest238/DigitNum.cpp
#include<bits/stdc++.h> using namespace std ; const long long int mod = 998244353 ; int main() { long long int n ; cin>>n ; long long int ans = 0 ; long long int left = 1 , right = 9 ; while(right <= n) { long long int num = (right - left + 1) ; long lon...
ALGO
0.9999
4.268939
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2021-08-22T06:27: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": "b41d10c36...
0bd5d2e8-8330-4898-a8bf-09143d04789a
hydroo/coding-and-math-exercises
project-euler/214/main.cpp
#include "../lib.hpp" using namespace std; void testTotientFunction(); void test1(); void test2(); int main(int argc, char **args) { (void) argc; (void) args; // testTotientFunction(); // test1(); test2(); return 0; } s64 totientFunction(s64 n) { s64 sum = 0; for (s64 i = 1; i <= n; i ...
ALGO
0.992889
5.189898
{ "github_metadata": { "branch": "master", "commit_count": 131, "repo_created_at": "2011-04-03T09:04:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b004f7c0...
d6da9236-3951-407a-ad6e-e96d08717c1a
shas9/codehub
Codeforces/Educational/Educational 76/D.cpp
// God put a smile upon your face <3 #include <bits/stdc++.h>` #define slld(longvalue) scanf("%lld", &longvalue) #define ll long long #define ull unsigned long long #define pll pair < long long, long long > #define fastio ios_base:: sync_with_stdio(false); cin.tie(0); cout.tie(0) #define pb push_back #define bug ...
ALGO
0.999928
3.219316
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-07-25T17:32: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": "ad9634f094...
8cfac433-7e54-4798-b29a-b84514b3256d
amanzi/amanzi
src/operators/PDE_DiffusionFVwithGravity.cc
/* Copyright 2010-202x held jointly by participating institutions. Amanzi is released under the three-clause BSD License. The terms of use and "as is" disclaimer for this license are provided in the top-level COPYRIGHT file. Authors: <NAME> (<EMAIL>) <NAME> (<EMAIL>) */ /* Operators */ #inclu...
ALGO
0.999263
6.163974
{ "github_metadata": { "branch": "master", "commit_count": 14660, "repo_created_at": "2016-07-22T18:50:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 50, "forks": 38, "issues": 103, "pull_requests": 5 }, "file_meta": { "content_id": "80b...
61e5fc51-68d0-4daa-b7b1-bb6d0e4dd1df
glannuzel/projet_ti
mahalanobis.cpp
#include <iostream> #include <cstdlib> #include <fstream> #include <string> #include <opencv2/opencv.hpp> using namespace cv; using namespace std; void process(const char* imsname, int seuil) { //Time calculation init clock_t start; double duration; start = clock(); //Read picture and initialize dimension...
ALGO
0.992207
4.156419
{ "github_metadata": { "branch": "master", "commit_count": 86, "repo_created_at": "2018-12-11T07:38:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ea98fedaa...
1c600701-a50e-472e-affc-06bdf547f839
satyam6112/DSA-with-c-
dsa_/lecture_14/search_in_rotated_array.cpp
#include <iostream> using namespace std ; int binary_search(int a[] , int size , int key ,int start , int end ) { int mid ; while ( start <= end ) { mid = start + (end - start ) / 2 ; if (a[mid] == key ) { return mid ; } else if (a[mid] < key...
ALGO
0.999955
5.241812
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-09-27T16: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": "ee296ce19d42...
e9932495-1be1-4d7f-a59a-33efc331e3f6
winersch/Algorithm
백준/Gold/17142. 연구소 3/연구소 3.cc
#include <iostream> #include <vector> #include <algorithm> #include <cstring> #include <queue> #include <cmath> #include <iomanip> #include <map> #include <stack> #define inf 0x3f3f3f3f #define ll long long #define pii pair<int,int> #define pdd pair<double,double> using namespace std; int n, m, ans = inf; int lab[5...
ALGO
0.99995
3.782636
{ "github_metadata": { "branch": "main", "commit_count": 768, "repo_created_at": "2023-08-07T05:08: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": "7fd408175e...
b559e37c-3d0f-419e-a5ce-d5c51d8c6e5a
ZephyrZhng/code_ub
cpp/cyk/main.cpp
#include <algorithm> #include <cassert> #include <cmath> #include <cstring> #include <initializer_list> #include <iostream> #include <fstream> #include <functional> #include <set> #include <sstream> #include <vector> #include "../grammar_str/grammar.h" #include "../grammar_str/grammar.cpp" using namespace std; void ...
ALGO
0.999756
4.439474
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2016-01-27T08:34:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8986ee44d...
c1d1ee86-3123-4a61-a8ce-87cbbeef758f
Shikhar-S/Analysis-of-Competitive-Codebase
Data/Contest1245/all/29578357_64019327.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int #define pll pair<ll, ll> #define MOD 1000000007 int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); string s; cin >> s; vector<ll> fib(100006); fib[0] = 1; fib[1] = 1; for (int i = ...
ALGO
0.999966
4.117779
{ "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": "40bf8a628...
9db6d87b-d925-4118-9540-81402c6f42f5
aklk1ng/code
cpp/cf/1710B.Rain.cpp
#include <bits/stdc++.h> typedef long long ll; void solve() { int n, m; std::cin >> n >> m; m *= 2; std::vector<std::pair<ll, ll>> diff; std::vector<ll> x(n + 1), p(n + 1); std::pair<ll, ll> key = {0, -0x3f3f3f3f3f3f3f3f}; auto get = [&](std::pair<ll, ll> p1, std::pair<ll, ll> p2) -> st...
ALGO
0.999993
4.074484
{ "github_metadata": { "branch": "main", "commit_count": 495, "repo_created_at": "2022-02-09T13:42: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": "88f8696e72...
66a09af6-4cb1-41d2-b0f7-e3fe2d3d159a
ahmeddrawy/codeforces-submissions
codeforces/1202/D.cpp
// // Created by ahmed_drawy on 17/08/19. // virtual contest Educational Codeforces Round 70 #include <bits/stdc++.h> #pragma clang diagnostic push #pragma ide diagnostic ignored "OCUnusedMacroInspection" using namespace std; #define lp(i,start , end) for(int i = start ; i<end ; ++i) #define lllp(i,start , end) ...
ALGO
0.999585
3.754983
{ "github_metadata": { "branch": "master", "commit_count": 161, "repo_created_at": "2021-01-06T19:33:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8b747314...
e5c6af55-b8f1-4d9f-904e-f52ece1c0b6f
VarmaMSP/UVA-Solutions
02 - Data Structures and Libraries/03 - Data Structures with Our-Own Libraries/01 - Graph Data Structures Problems/10928 - My Dear Neighbours.cpp
#include <bits/stdc++.h> using namespace std; int main() { int tt, p, tmp, deg[1010]; string line; stringstream sin; cin >> tt; while (tt--) { int min = INT_MAX; cin >> p; cin.ignore(); for (int u = 1; u <= p; ++u) { deg[u] = 0; getline(cin, ...
ALGO
0.99943
4.052449
{ "github_metadata": { "branch": "master", "commit_count": 126, "repo_created_at": "2016-11-30T05:36:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 29, "forks": 11, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "687980...
bbb0abfa-784f-4809-bd79-abd2c4348019
VROOM-Project/vroom
src/structures/vroom/tw_route.cpp
/* This file is part of VROOM. Copyright (c) 2015-2025, <NAME>. All rights reserved (see LICENSE). */ #include <algorithm> #include "structures/vroom/tw_route.h" #include "utils/helpers.h" namespace vroom { TWRoute::TWRoute(const Input& input, Index v, unsigned amount_size) : RawRoute(input, v, amount_size), ...
TOOL
0.979236
5.281346
{ "github_metadata": { "branch": "master", "commit_count": 3026, "repo_created_at": "2015-09-05T12:58:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1511, "forks": 369, "issues": 33, "pull_requests": 6 }, "file_meta": { "content_id": "a8...
adeaa8df-6054-45a1-a538-047e629feda5
wassup-/recursive-iterator
example.cpp
#include "include/recursed_range.hpp" #include <algorithm> #include <array> #include <chrono> #include <iomanip> #include <iostream> #include <random> #include <vector> constexpr int kNumRuns = 10000; constexpr int kNumElements = 500; namespace detail { template<typename> struct random_fill_helper; } // namespace ...
TEST
0.98561
6.73113
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2015-02-13T10:26: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": "0b3db6023...
acf0b380-c30c-47e6-b381-61c26c689b52
Mehedi-Hasan-Rabbi/Online-Judge-Solution
CodeForces/2000 C. Numeric String Template.cpp
// In the name of Allah the merciful. #include<bits/stdc++.h> using namespace std; #ifndef ONLINE_JUDGE #include "algo/Debug.h" #else #define dbg(...) #endif typedef long long ll; typedef unsigned long long ull; #define endl '\n' #define efficient() ios_base::sync_with_stdio(0); cin.tie(0); #def...
ALGO
0.999897
5.750345
{ "github_metadata": { "branch": "main", "commit_count": 572, "repo_created_at": "2023-06-30T10:35:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e29d0b096...
83d861c2-8e0c-43cd-a6e9-9a0e29cabc86
fwillett/speechBCI
LanguageModelDecoder/srilm-1.7.3/lm/src/nbest-mix.cc
/* * nbest-mix -- * Interpolate N-Best lists * */ #ifndef lint static char Copyright[] = "Copyright (c) 1998-2004 SRI International. All Rights Reserved."; static char RcsId[] = "@(#)$Id: nbest-mix.cc,v 1.6 2004/12/03 05:35:34 stolcke Exp $"; #endif #include <stdio.h> #include <string.h> #include <stdlib.h> #inc...
ALGO
0.987254
5.607211
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2023-06-11T20:01:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 167, "forks": 40, "issues": 8, "pull_requests": 0 }, "file_meta": { "content_id": "8118d40b...
60a2096d-6dc5-4adb-98aa-65c97b1415c9
DragoonXen/CodeRoyale-raic2022
utils/Movement.hpp
// // Created by dragoon on 09.07.2022. // #ifndef AI_CUP_22_MOVEMENT_HPP #define AI_CUP_22_MOVEMENT_HPP #include "model/Vec2.hpp" #include "model/Constants.hpp" #include "Util.hpp" #include <iostream> using namespace model; const std::vector<Vec2> kMoveDirections = []() { constexpr double stepCount = 12.; ...
ALGO
0.988413
6.695577
{ "github_metadata": { "branch": "master", "commit_count": 86, "repo_created_at": "2022-08-03T18:46:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a95d67964...
c0d5a18a-866d-481a-8708-b17f252e2ec7
WangBD2023hdu/algorithm_design
best_merge.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; bool sort_fun(int a, int b) { if (a >= b) return false; else return true; } int main() { int n, temp; cin >> n; vector<int> len; for (int i = 0; i < n; i++) { cin >> temp; len.push_back(temp); } ...
ALGO
0.999995
3.302552
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-01-02T11:52: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": "e8a6a077b6...
134c6dfa-1af2-459b-83a0-41a5efb1f38c
ebobola-dev/prime-list-c
prime_list/Source.cpp
#include <stdio.h> #include <locale.h> void print_prime_list(int max); int isPrime(int x); int main() { int n; setlocale(LC_ALL, "Rus"); while (1) { printf("Введите число(введите 0, чтобы завершить): "); scanf("%d", &n); while (1) { if (n > 0) break; printf("Необходимо положительное число(введите 0, ч...
ALGO
0.999823
3.954462
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2021-09-28T08:58: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": "21b284f30a...
f8f98f55-50ce-48f7-b7ec-99b226cdf0b0
Prokopiy19/advent_of_code
2023/5/5.cpp
#include <algorithm> #include <deque> #include <fstream> #include <iostream> #include <string> #include <utility> #include <vector> #define int long long #define l first #define r second struct Range { int to, from, size; }; signed main() { std::ifstream in("input.txt"); std::string skip; in >> ...
ALGO
0.999749
5.034704
{ "github_metadata": { "branch": "master", "commit_count": 84, "repo_created_at": "2023-12-01T11:35: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": "ae2119b11...
f84c2c43-9d93-4df2-a6ee-fb9f223918d1
DavidLyhedDanielsson/D3D11Raytracer
DXConsole/consoleAutoexecManager.h
#ifndef OPENGLWINDOW_CONSOLEAUTOEXECMANAGER_H #define OPENGLWINDOW_CONSOLEAUTOEXECMANAGER_H #include <string> #include <unordered_map> #include <unordered_set> #include "consoleCommandManager.h" /** * Manages automatically executing commands by reading an autoexec file * * The autoexec file is a plaintext file where...
TOOL
0.906926
7.44841
{ "github_metadata": { "branch": "master", "commit_count": 59, "repo_created_at": "2022-04-22T20:43:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ec57035a2...
5a8036a1-418c-4f0a-8f38-dba4696bd2d7
M-E-U-E/Current
B. StORage room.cpp
#include<bits/stdc++.h> #define ll long long #define endl "\n" using namespace std; bool cmp(pair<int,int>a,pair<int,int> b) { if(a.first > b.first) return true; else if(a.first == b.first and a.second<b.second) return true; return false; } void solve() { ll n; cin >> n ; ll a[n...
ALGO
0.999765
4.875628
{ "github_metadata": { "branch": "main", "commit_count": 551, "repo_created_at": "2023-06-27T21:59: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": "c1d1f2068a...
9f48e022-c613-4131-b752-452fb9167e83
rjenez/W266-final-project
data/programming-homework-dataset-plagiarism-detection/src/B2017/Z3/Z1/student8043.cpp
/B2017/2018: Zadaća 3, Zadatak 1 #include <iostream> #include <vector> #include <utility> #include <functional> #include <algorithm> #include <stdexcept> #include <limits> #include <cmath> double fun(double x) { return x*x+sin(x); } typedef std::vector<std::pair<double,double>> VektorParova; double Aproksimacija...
ALGO
0.997144
4.686242
{ "github_metadata": { "branch": "main", "commit_count": 125, "repo_created_at": "2022-02-09T00:45:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "021951bb25...
1d816224-320b-4c87-9835-b76b1d05ffab
ASM-ATIKUR/Competitive_Programming_Atikur_Rahman
Codechef/COW3B_BILATERAL SEGMENTS.cpp
/*** ** <NAME> <NAME> ** Update: 18-04-2020 ***/ //#include <bits/stdc++.h> #include<iostream> #include<stdio.h> #include<stdlib.h> #include<math.h> #include<cstring> #include<time.h> #include<climits> #include<vector> #include<string> #include<stack> #include<queue> #include<map> #include<unordered_map> #includ...
ALGO
0.999967
3.067477
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2021-02-14T08:35:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "01873fb59b1...
c77e5f20-bbeb-4854-a3a3-4943a01519c8
wzhugit/CPP-Primer-Plus
chapter16/chapter16ex5.cpp
// C++ Primer Plus chapter16ex5.cpp #include <algorithm> #include <iostream> #include <vector> #include <iterator> template <typename T> int reduce(T ar[], int n); int main() { long numlist[] = { 10,20,5,500,600,20,400,3000,600,500 }; std::string strlist[] = { "I have an apple.","This is a pear", "I love you.","...
ALGO
0.997886
5.55608
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-06-14T20:32: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": "c35fc1e9e19...
fea97a2a-5cc0-47a2-abb5-ab595b76726a
arafatdayan005/XPSC
Week - 4/Day - 3/Petr and a Combination Lock.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); long long int t; cin >> t; while (t--) { long long int n; cin >> n; vector<long long int> v(n); for (long long int i = 0; i < n; i++) { cin >> v[i]; } long long int f...
ALGO
0.999882
4.35512
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2024-03-20T11:39: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": "dff68887dd3...
12014b2e-2d95-4b16-b1f4-d9c72cd76501
shay-ff/cpp-files
Atcoder/390/B_Geometric_Sequence.cpp
/** * created: 2025-01-25 17:33:29 **/ #include<bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; #ifndef ONLINE_JUDGE #include "../debug.cpp" #else #define debug(...) #define debugArr(...) #endif #define int long long #def...
ALGO
0.999966
4.122747
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-05-08T13:22: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": "ee6ae85377e5...
a90f9d57-ea7e-4393-b1b1-820a54c380a6
Barrun-Kabir-Rifat/C_Plus_plus-Standard-Template-Library-STL-
set/set.cpp
#include<bits/stdc++.h> using namespace std; typedef long long int ll; typedef unsigned long long int ull; void solve() { } int main() { //set usually store elements in ascending order set<int>s; /*if we want to arrange element in decending order, then,we need to declare set like: set<int,greater<int>>s;...
ALGO
0.988413
3.657996
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-09-19T13:02: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": "3e2daa5b97d9...
ad603892-6486-473b-b079-eb75c8088a02
ishandutta2007/codeforces-s
shun_pi/normal/1389/C.cpp
#include <bits/stdc++.h> using namespace std; using lint = long long int; using P = pair<int, int>; using PL = pair<lint, lint>; #define FOR(i, begin, end) for(int i=(begin),i##_end_=(end);i<i##_end_;i++) #define IFOR(i, begin, end) for(int i=(end)-1,i##_begin_=(begin);i>=i##_begin_;i--) #define REP(i, n) FOR(i,0,n) #d...
ALGO
0.999797
4.567519
{ "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": "c0660b9f682e...
ef36dcd0-1cb5-4149-a1e0-4f8ff1b15dc6
ninedayhx/code_log
binary_tree/124_Binary_Tree_Maximum_Path_Sum.cpp
// tag: dfs 深度优化 bfs 广度优先 #include <bits/stdc++.h> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {} TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} TreeNode(int x, TreeNode *left, TreeNode *right) ...
ALGO
0.999972
5.529593
{ "github_metadata": { "branch": "main", "commit_count": 134, "repo_created_at": "2024-01-28T11:46:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "016a72a5ac...
116514f1-91dd-4b91-b6aa-d192f3913092
XiandaChen/LeetCode
CPP/CodeSignal/LinkedList_reverseNodesInKGroups.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) {} * }; */ // Input: head = [1,2,3,4,5,6,7], k = 3; Output: ...
ALGO
0.999998
5.846042
{ "github_metadata": { "branch": "master", "commit_count": 257, "repo_created_at": "2019-08-29T02:19: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": "f15f999e...
1634053d-cc3d-43d7-8626-483d1df9a69b
Ram-cs/CS-25-LaneyCollege
Cis25Spring2016Ram/lab3Agian/lab3Agian/main.cpp
/* Program Name: cis25Spring2016RamLab3Ex1.cpp Discussion: Lab -3 Exercise - 1 Written By: <NAME> Date: 2016/02/25 */ #include <iostream> using namespace std; // Function prototype void displayExercise(void); void menu01Ram(void); int* extractUncommonDigitRam( int[], int); int main() { disp...
ALGO
0.997084
4.915257
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-06-28T02:52:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f47ddd80a2...
0e527f51-6b59-4b4b-82e9-c0c1e52e764c
reiniermujica/algorithms-and-contests
USACO/2008/Silver/BONES.CPP
/* PROG: bones LANG: C++ */ #include <cstdio> using namespace std; const int MAXN = 21, MAXK = 41; int s1, s2, s3, sol; int i, j, k; int msum = 0; int cant[MAXN * MAXN * MAXK]; int main() { freopen( "bones.in", "r", stdin ); freopen( "bones.out", "w", stdout ); scanf( "%d %d %d", &s1, &s2, &s3 ); for (...
ALGO
0.999913
3.739816
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-06-24T22:17:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0c97177e7d...
ec54305d-1391-4016-bdba-96cfffe47bd3
moiseyalaev/Set-class-
Set.cpp
#include "Set.h" #include <iostream> Set::Set() { head = nullptr; } Set::~Set() { Node *ptr = head; // start the transversing at the first interesting node while (ptr != nullptr) // loop until reached full circle back to dummy node { Node *tempNext = ptr->next; // save next node in temp Node ptr dele...
TOOL
0.900643
4.841837
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2021-10-02T01:41: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": "db1a54ec08c6...
fe7fe865-24a8-40c5-b179-4c88aa0a3104
Night-fury0/competitive-programming
cpp_codes/algorithms/sweep_line_algo.cpp
#include<bits/stdc++.h> #define ios_base ::sync_with_stdio(false); cin.tie(0); cout.tie(0)l using namespace std; int main(){ int n, temp; freopen("sweep_line_algo_input.txt", "r", stdin); cin>>n; vector<int> entry, exit; for (int i=0;i<n;i++){ cin>>temp; entry.push_back(temp); ...
ALGO
0.99996
3.852609
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2023-08-26T05:14:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "28851418e43...
85c66a98-3e3d-405a-adcb-7f839c7def1c
Umer-8/OOP-LAB
LAB 11/q4.cpp
#include <iostream> using namespace std; template <typename T> class Base { protected: T val1; T val2; public: Base(T a, T b) : val1(a), val2(b) {} virtual void multiply() = 0; virtual ~Base() {} }; template <typename T> class Derived : public Base<T> { private: T val3; T val4; public: ...
ALGO
0.993195
6.441734
{ "github_metadata": { "branch": "main", "commit_count": 48, "repo_created_at": "2025-01-25T12:19:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "bd58e12b3fc...
57e3590d-a74a-4084-a4d0-49a1678631b7
ishandutta2007/codeforces-s
suiseiseki/normal/1685/D1.cpp
#include <bits/stdc++.h> #define pb push_back #define fi first #define se second #define mp make_pair using namespace std; typedef pair<int, int> PII; typedef long long LL; template <typename T> bool chkMax(T &x, T y) { return (y > x) ? x = y, 1 : 0; } template <typename T> bool chkMin(T &x, T y) { return (y < x) ?...
ALGO
0.999992
3.824933
{ "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": "cb78328bd969...
2826bfe9-b007-41a0-b55a-78c8451ded8e
SawyerHopkins/ProteinSim2015
ClusteredCore/src/defaultAnalysis/analysisCluster.cpp
/*The MIT License (MIT) Copyright (c) [2015] [<NAME>] Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge...
ALGO
0.921638
5.486716
{ "github_metadata": { "branch": "master", "commit_count": 114, "repo_created_at": "2015-05-21T22:29:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "2259c671...
e41fabd7-3524-4c54-b394-143acd6c9188
TenFifteen/SummerCamp
lbc_lintcodeII/120-word-ladder.cc
/* 题目大意: 给定一组单词,还有一个起点一个终点,如果两个字符串之间只有一个字母是不一样的,可以认为他们之间是连接的。 然后问是否可以找到一组字典中的单词,从起点到终点。 解题思路: BFS 遇到的问题: 一开始忘记了处理end不在dict中的情形。 */ class Solution { public: /** * @param start, a string * @param end, a string * @param dict, a set of string * @return an integer */ int ladderLength(...
ALGO
0.999882
5.471097
{ "github_metadata": { "branch": "master", "commit_count": 2242, "repo_created_at": "2015-07-06T03:15:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3ad8a844...
1bd16f95-aa2e-4b86-89ac-faa70f6509dc
a-y-u-s-h/competitive
codechef/MARARUN.cpp
#include <bits/stdc++.h> int main(int argc, char const *argv[]) { int T; std::cin >> T; for (int t = 0 ; t < T; t += 1) { int D, d, A, B, C; std::cin >> D >> d >> A >> B >> C; /* ====================================== Chefland is holding a virtual marathon for the categories: 10...
ALGO
0.999679
3.413149
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-06-26T23:29: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": "3023fada0f...
495bca1a-35f9-4bb2-9af6-fc8ec55a34db
bibimoni/codeStuff
cp/atcoder/abc409/c.cpp
/** * Author: distiled */ #include <bits/stdc++.h> using namespace std; #ifdef DEBUG #include </Users/distiled/codeStuff/templates/debug.h> #else #define dbg(x...) #endif #define int int64_t signed main() { ios::sync_with_stdio(false); cin.tie(0); int n, l; cin >> n >> l; vector<int> mark(l); int st = 0...
ALGO
0.999982
3.850695
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2023-08-23T09:31:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "19e72e2f613...
e66de72e-8fd7-4b91-9257-4258d28b0c88
jerryhan88/BNC
BNC/BnB/Tree.cpp
// // Tree.cpp // BNC // // Created by <NAME> on 2/8/19. // Copyright © 2019 <NAME>. All rights reserved. // #include "Tree.hpp" #define DEFAULT_BUFFER_SIZE 1024 Tree::Tree(Problem *prob, FilePathOrganizer *fpo) { this->prob = prob; this->fpo = fpo; } Tree::~Tree() { } MathematicalModel* Tree::get_incu...
ALGO
0.991502
4.272378
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-07-20T05:58: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": "b5954d9532...
ebc29612-685b-4e43-afd1-1ea0f4602893
huHHhhuhu/C-of-my-own
Machine Learning/Quiz2/decision stump2.cpp
#include <fstream> #include <iostream> #include <ctime> #include <cmath> #include <vector> #include <algorithm> using namespace std; #define DEMENSION 9 //數據維度 char *file = "training.txt"; char *file_test = "testing.txt"; struct record { double input[DEMENSION]; int output; }; struct singleDemensionRec...
ALGO
0.970317
3.637875
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2015-09-29T13:53: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": "62201ab375...
deccb3c3-d347-421c-9a0c-0f9d5b417560
Prathmesh410/DSA_CPP
BinaryTree.cpp/printAllNodeAtDistance.cpp
#include "bits/stdc++.h" using namespace std; struct Node { int data; struct Node* left; struct Node* right; Node(int val){ data=val; left=NULL; right=NULL; } }; void printSubtree (Node* root, int k){ if(root==NULL || k<0){ return; } if(k==0){ ...
ALGO
0.999996
4.033237
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-12-18T10:52: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": "511e739ee859...
45aa1754-7e3a-4493-b70a-94639c31aa82
Rukmini-Meda/DSA-Diary
Codeforces/R686_Div3/D.cpp
#include<bits/stdc++.h> using namespace std; typedef long long int ll; # define MOD 1000000007 void fillPrime(vector< pair<ll,ll> >& numPrimeFactors, ll n){ pair<ll,ll> two; two.first = 2; two.second = 0; while(n%2 == 0){ // cout << 2 << " "; two.second++; n /= 2; } if(t...
ALGO
0.999922
3.70259
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2019-11-23T16:36:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "951dd3f50...
d75e3aeb-9d5f-440f-a284-bf06d38efda0
greole/coalFoam
transpEq/pEqnComp.H
// rho = thermo.rho();1 // update rho from thermodynamics, moved out of piso loop as suggested byJarczy 2013 clock_t t_begin_P = std::clock(); Info << "=== Start Pressure Corrector ===" << endl; volScalarField rAU(1.0/UEqn.A()); U = rAU*UEqn.H(); phi = fvc::interpolate(rho)*( // Kg/s (fvc::int...
ALGO
0.999781
4.78933
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-01-18T14:35:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8704bb6b7bb3...
b8f3b34e-1878-43d7-8d45-2867786224d7
pawanjenu/compitative-programming
new_format/cses/Sorting and Searching/Playlist/solution.cpp
#include <bits/stdc++.h> using namespace std; #define lli long long int #define ll long long #define li long int #define ld long double #define vi vector<int> #define vs vector<string> #define vll vector<long long> #define vl vector<long> #define endl "\n" void file_input(){ freopen("input.txt", "r", stdin); ...
ALGO
0.99999
4.147111
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2020-04-22T15:09: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": "96871b7d2...
353610c2-b3a5-42cc-9e61-b33133c257a5
manchalaharikesh/CODES-POTDs
LeetCode/1701. Average Waiting Time.cpp
// DATE: 09-JUL-2024 // Question URL: https://leetcode.com/problems/average-waiting-time/description/ // Question: 1701. Average Waiting Time // Description: There is a restaurant with a single chef. You are given an array customers, where customers[i] = [arrivali, timei]: // arrivali is the arrival time...
ALGO
0.999883
6.238204
{ "github_metadata": { "branch": "main", "commit_count": 389, "repo_created_at": "2023-08-17T10:03: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": "bb5bac3bf8...
90d172e4-c29d-4f4b-acbf-b0c5b869d3ed
TheWestWings/Algorithm
AtCoder/beginner_contest_380/d.cpp
#include <bits/stdc++.h> using namespace std; const int N = 64; typedef long long ll; ll a[N]; int main(){ string str; cin >> str; int n = str.size(); a[1] = n; int len = 0, i; for(i = 2; a[i - 1] < 1e18; i ++){ a[i] = a[i - 1] * 2; } len = i - 1; // for(int i = 0; i < N...
ALGO
0.999925
3.946578
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2025-01-20T10:42: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": "9fe2c52582...
38770f29-629a-46e8-ab10-a10d5ad7b31c
shenhuaze/leetcode
cpp/three_sum_closest.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int ThreeSumClosest(vector<int>& nums, int target) { int closest = nums[0] + nums[1] + nums[2]; int diff = abs(closest - target); sort(nums.begin(), nums.end()); for (int i = 0; i < nums.size() - 2; i++) { int left...
ALGO
0.999998
6.266928
{ "github_metadata": { "branch": "master", "commit_count": 265, "repo_created_at": "2019-06-12T10:31: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": "8840bac3...
dd7f5352-93da-4ed7-bc6c-3e332fac64fa
apple/turicreate
src/external/boost/boost_1_68_0/boost/math/tools/roots.hpp
// (C) Copyright <NAME> 2006. // Use, modification and distribution are subject to 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) #ifndef BOOST_MATH_TOOLS_NEWTON_SOLVER_HPP #define BOOST_MATH_TOOLS_NEWTON_SOLVER_HPP #ifdef _MS...
ALGO
0.999897
6.352241
{ "github_metadata": { "branch": "main", "commit_count": 1571, "repo_created_at": "2017-12-01T00:42:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 11198, "forks": 1137, "issues": 502, "pull_requests": 21 }, "file_meta": { "content_id": "...
b6940374-84a0-4352-9454-b15b5df5f904
KanshiVN/LP1
sjf.cpp
#include <iostream> #include <vector> #include <algorithm> #include <climits> using namespace std; struct Process { int id, burst_time, remaining_time, waiting_time, turnaround_time, completion_time, arrival_time; }; bool compareArrival(Process a, Process b) { return a.arrival_time < b.arrival_time; // Sort ...
ALGO
0.999995
5.266762
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2024-11-10T16:47: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": "9999315012...
f00ed46c-fd71-4c41-90da-ab9d7cfb74bc
ShambhaviPandey2021/GFG
Difficulty: Easy/Reverse Words/reverse-words.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: // Function to reverse words in a given string. string reverseWords(string str) { // code here vector<string> s; string word = ""; for (int i = 0; i < str...
ALGO
0.999019
5.603434
{ "github_metadata": { "branch": "main", "commit_count": 903, "repo_created_at": "2024-01-31T17: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": "7a79841efb...
3c9462f7-b048-41c5-848c-6c9b94b5512f
Apiros3/library
graph/dfs.hpp
#ifndef GENERAL_DFS #define GENERAL_DFS #include "general/fixed_integer.hpp" #include <vector> #include <algorithm> template <typename T = i64> struct DFS { private: i64 N; std::vector<bool> used; void dfs(i32 pos, std::vector<std::vector<T>> &adj, i32 &cnt) { used[pos] = true; dis[pos]...
ALGO
0.999666
5.191179
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-11-09T16:49:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "18ac7a5040e3...
5627f593-50a6-4574-9f45-fb87624fffa7
mayank-ag11/Data-Structures
Lecture/Dynamic Programming/Assignment/shortest-subsequence.cpp
/*** * Gary has two string S and V. Now, Gary wants to know the length shortest subsequence in S, which is not a subsequence in V. * Note: The input data will be such that there will always be a solution. * Test case: S: babab V: babba => 3 (aab) * Help: Check notes or the hint video. ***/ /* Time complexity:...
ALGO
0.999951
5.403043
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2022-01-28T18:17:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "08b41673f51...
a4ea43e1-b9fe-4c38-b0b5-dbdc8303a102
xiyanykt/code
Nowcoder/Winter1/e.cpp
#include<bits/stdc++.h> using u32 = unsigned int; using i64 = long long; using u64 = unsigned long long; using f64 = long double; using i128 = __int128; using u128 = unsigned __int128; using f128 = __float128; #ifndef ONLINE_JUDGE #include "algo/debug.hpp" #else #define debug(...) (void)42 #endif template<class T> c...
ALGO
0.999581
5.248534
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2025-04-23T01: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": "d1a2c04e0c1...
080bf293-e492-43ea-937c-1bb72dc64375
Rudro-25/My_Solved_ProblemSet_From_All_Judge
LightOj/DS/Diablo.cpp
//A. Segment Tree for the Sum #include <bits/stdc++.h> using namespace std; #define PSB push_back #define MP make_pair #define ll long long #define FastIO ios::sync_with_stdio(0);cin.tie(0); cout.tie(0); constexpr ll mod = 1e9 + 7; const ll N=2e5+5; const ll INF =1e...
ALGO
0.999954
4.258957
{ "github_metadata": { "branch": "main", "commit_count": 219, "repo_created_at": "2021-12-06T20:30:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "091eb9119d...
a23c8be2-9cfa-4386-998a-eabe6dc1e9e2
ssk4988/Coding
UCFPT/230701/k.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for(int i = a; i < (b); i++) #define all(x) begin(x), end(x) #define sz(x) (int) (x).size() using ll = long long; using pi = pair<int, int>; using vi = vector<int>; int main() { freopen("cubes.in", "r", stdin); cin.tie(0)->sync_with_stdio(0); ...
ALGO
0.999892
4.247632
{ "github_metadata": { "branch": "main", "commit_count": 189, "repo_created_at": "2021-11-02T23:44:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b8a7950dfb...
7796e595-009e-41fa-b6ba-5a305d6f9f1a
RaulGerru/FELTOR_Raul
inc/dg/topology/operator_tensor.h
#pragma once #include <algorithm> #include <cusp/coo_matrix.h> #include <cusp/multiply.h> #include "operator.h" #include "grid.h" namespace dg { ///@addtogroup lowlevel ///@{ /** * @brief Form the tensor product between two operators * * Computes C_{ijkl} = op1_{ij}op2_{kl} * @tparam T The value type * @param op1...
ALGO
0.994855
5.803603
{ "github_metadata": { "branch": "feltor3d", "commit_count": 4177, "repo_created_at": "2020-06-11T09:23: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": "e74a9...
8a927535-3f6a-4244-8513-9d1793691343
Yolke/ProjetEcosystemeC-
map.cpp
#include "map.h" #include "natural.h" // Assurez-vous que ce fichier est inclus #include "entity.h" // Pour Entity si nécessaire #include "grass.h" #include "wolf.h" #include "sheep.h" #include "mineral.h" #include <cstdlib> #include <iostream> #include <algorithm> Map::Map(int width, int height) : width(width), heig...
TOOL
0.98956
4.077076
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-06-05T10:04:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6646c937862b...
94efcd41-af13-4859-a899-d8eb022ade56
nmhienbn/Competitive-Programming
Mr.Binh/09.01.2022/hash/hash.cpp
#include <bits/stdc++.h> #define fi(i, a, b) for(int i = (a), _b = (b); i <= _b; i++) #define fid(i, a, b) for(int i = (a), _b = (b); i >= _b; i--) #define gb(x, i) (((x) >> (i)) & 1) #define pii pair<int,int> #define pb push_back #define ll long long #define Irelia "hash" const int maxn = 15; using namespace std; int...
ALGO
0.99997
3.636816
{ "github_metadata": { "branch": "main", "commit_count": 74, "repo_created_at": "2023-02-11T14:40:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "589a8541c57...
6f5a73a6-2d0a-4752-b322-be36ccaa3536
Mazziruso/LeetCode-Solution
LeetCode-MEDIUM/Leetcode106/Main.cpp
#include <iostream> #include <map> #include <vector> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; class Solution { public: map<int, int> InIndex; vector<int> post; TreeNode* construct(int postS, int...
ALGO
0.999997
6.023454
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2018-10-27T04:26:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c573f1d3a...
b2c50377-49fb-4788-b740-7bf017b6362b
yutarchery/GitCoder
ABC/201-250/abc224/D.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> Pii; typedef pair<int, ll> Pil; typedef pair<ll, ll> Pll; typedef pair<ll, int> Pli; typedef vector<vector<ll>> Mat; #define fi first #define se second const ll MOD = 1e9 + 7; const ll MOD2 = 998244353; c...
ALGO
0.99982
3.560217
{ "github_metadata": { "branch": "main", "commit_count": 1429, "repo_created_at": "2021-04-20T14:39: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": "7f32ba759...
77dd505b-addc-4427-863e-1a28c65497dc
phamcongtruongptit/data_structures_and_algorithms-codeptit
DSA08009_bien_doi_st.cpp
#include<bits/stdc++.h> using namespace std ; struct data { int value ; // giá trị int buoc ; // theo từng tầng } ; // ý tưởng: duyệt theo từng tầm vào vét hết tất cả các giá trị . int tinh(int s , int t ){ queue <data> Q ; data dau = {s, 0} ; Q.push(dau) ; set <int> se ; // cấu trúc set gi...
ALGO
0.999944
4.315266
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-07-20T03:22:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "41e87d8e6c...
bdd60823-4b5e-432a-90ed-a5e318128236
alhambr/arduino-autobot
autobot.ino
#define MAX_SPEED 255 // максимальный сигнал на мотор (max 255) #define IN1 2 #define IN2 3 #define IN3 10 #define IN4 11 #define ECHO_PIN 6 #define TRIG_PIN 7 #define SENSOR_PIN 4 #define MAX_DISTANCE 200 #include <Servo.h> #include "GyverMotor.h" #include <NewPing.h> GMotor motorL(IN1, IN2); GMotor motorR(IN3, IN4)...
TOOL
0.924333
4.536032
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2020-12-07T19: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": "4d131d2b2470...
49e4c446-9e72-4bdf-badb-3f63be00e033
zlfben/tools_for_gem5-NVP
test-progs/queens.cpp
#include <iostream> #include <vector> #include <cmath> using namespace std; class Checkboard { private: typedef vector<vector<int> > Map; protected: Map map; int size; public: Checkboard(int _size) : map(_size, vector<int>(_size, 0)), size(_size) {} void set(int m, int n) { map[m][n...
ALGO
0.997125
5.000453
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2017-03-20T03:42: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": "342139cb5...
8d22003c-6d56-4c03-90f3-98b8b6be51e6
jasoncearley/CS162
Source Files From Textbook/Chapter16/pr16-07.cpp
// This program demonstrates the use of the swap // function template. #include <iostream> #include <string> #include <algorithm> // Needed for swap using namespace std; int main() { // Get and swap two chars char firstChar, secondChar; cout << "Enter two characters: "; cin >> firstChar >> secondChar; ...
ALGO
0.916173
5.970503
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-04-23T16:59: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": "f1a9c220eb...
51cb020c-1674-441c-8039-27014d182ced
shubhrajyotidey305/Leetcode
863-all-nodes-distance-k-in-binary-tree/863-all-nodes-distance-k-in-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: unordered_map<TreeNode*, TreeNode*> parent; void getParent(TreeNode* root) { queue...
ALGO
0.999996
6.209909
{ "github_metadata": { "branch": "main", "commit_count": 1761, "repo_created_at": "2022-01-03T10:24:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "30c0245b9...
10d28015-cf19-4ce7-9181-84ede1c8de9e
MhJunaid1/CS
DSA/Trees/maxHeap.cpp
#include <iostream> #include <vector> class MaxHeap { private: std::vector<int> heap; void heapifyUp(int index) { int parent = (index - 1) / 2; if (index > 0 && heap[index] > heap[parent]) { std::swap(heap[index], heap[parent]); heapifyUp(parent); } } v...
ALGO
0.999451
6.039086
{ "github_metadata": { "branch": "main", "commit_count": 137, "repo_created_at": "2023-04-12T12:17:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d22879aff4...
3f0012c8-da07-4b4a-9ad4-a2e84b302767
lightning-sagar/100th_days_of_DSA
LINKLIST/day6/reverse_k_group.cpp
#include<iostream> using namespace std; class Node { public: int data; Node* next; Node() { this->data = 0; this->next = NULL; } Node(int data) { this->data = data; this->next = NULL; } }; void prints(Node* head) { Node* temp = head; while(temp != NULL)...
ALGO
0.999969
4.811372
{ "github_metadata": { "branch": "main", "commit_count": 93, "repo_created_at": "2024-04-02T18:27: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": "66097790254...
26493038-c9b6-4c7e-9bda-1cbe17dae5f3
ishandutta2007/codeforces-s
sofapuden/normal/144/A.cpp
#include<bits/stdc++.h> #define rep(i,a,b) for(int i = a; i<b; i++) #define dep(i,a,b) for(int i = a-1; i>=b; i--) #define makeUnique(vec) sort(all(vec)); vec.resize(unique(all(vec)) - vec.begin()) #define LOG_vec(vec, sep) for (int fl = 0; fl < vec.size(); fl++) { cout << vec[fl]<< sep; } cout << "\n"; #define LOG_int...
ALGO
0.999925
3.488871
{ "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": "5a1f8f32cc6f...
90e9a1fc-8f45-4cec-970a-b993440b5898
ishandutta2007/codeforces-m
meliodasira/normal/1634/C.cpp
#include <bits/stdc++.h> using namespace std; template<typename T> void chmin(T& x, const T& y) { if (x > y) x = y; } template<typename T> void chmax(T& x, const T& y) { if (x < y) x = y; } typedef int64_t s64; typedef uint64_t u64; typedef uint32_t u32; typedef pair<int, int> pii; #define rep(i, l, r) for (int i = ...
ALGO
0.998442
3.199062
{ "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": "97611afde29a...
8769ecb0-6856-4e17-952f-76e55cd886f5
Lingfei-Li/leetcode
spring16/282.ExpressionAddOperators.cpp
// 1.12% slow (good job) // DFS // backtracking #include"mytest.h" void solve(vector<string>& ans, string& exp, int pos, string& num, long long target, int multiplyflag, long long multiplier) { int n = num.size(); if(pos == -1) { if(target == 0) ans.push_back(exp); return; } for(int i...
ALGO
0.999945
4.331768
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2016-05-29T08:56: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": "7532835f9...
96c48b5c-4d8a-47ea-9d65-51296c9146ab
OldKroll/KIP
2 курс ПКС/Практика/УП 01.01 Вариант 11/C/t8.cpp
#include <iostream> #include <random> #include "cmath" using namespace std; void zad1(){ int n,m; long buff; cout << "Введите n и m" << endl; cin >> n; cin >> m; cout << "Первчиный массив:" << endl; long a[n][m]; for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { ...
ALGO
0.998811
3.380385
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-09-02T12:45:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "03881a3ae823...
fcc639c7-9153-48d4-90ca-54b900c61ded
Joonking/Study_CodingTest
Study_CodingTest/BaekJoon/_전체/12891_DNA비밀번호.cpp
#include <iostream> #include <string> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); //S : DNA 길이, P : 부분문자열 길이(윈도우 사이즈) int S, P; cin >> S >> P; string DNA; cin >> DNA; //체크할 문자 개수 A C G T 순서 int CheckChar[4] = { 0, }; for (int i = 0; i < 4; i++) { ...
ALGO
0.999778
4.219409
{ "github_metadata": { "branch": "master", "commit_count": 210, "repo_created_at": "2023-03-11T06:40: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": "862f02b4...
f6453dba-585d-49aa-a108-450456c9468b
shaikhikram04/DSA-with-Cpp
Stack/stack_implementation_Linked_List.cpp
#include <iostream> using namespace std; class Node { public: int data; Node* next; Node(int data) { this->data = data; next = NULL; } }; class Stack { // properties Node* head; Node* tail; int top; int size; void insertAtTail(Node* &head, Node* &tail, int dt...
ALGO
0.999334
5.323803
{ "github_metadata": { "branch": "main", "commit_count": 103, "repo_created_at": "2023-07-31T16:18:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "36e0e4e1db...
5786b76b-e40a-4aaf-9a5a-f7097840905b
shoyeb001/DSA
backtracking/ratinmaze.cpp
#include<iostream> using namespace std; bool solvemazeuntil(int maze[4][4], int x, int y, int sol[4][4]); void printsolution(int sol[4][4]){ for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { cout << ""<< sol[i][j]; } cout << endl; } } bool issafe(int maze[4][4], ...
ALGO
0.999934
3.752263
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-06-01T03:25: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": "4117f6ec1c36...
a028f38d-5f5a-4683-812c-2bc44ad524c9
MarvikDC/lenguaje_de_programacion_1_
laboratorio 1/lab 1-8 uribilletes/main.cpp
#include <iostream> using namespace std; int main() { int val, aux,a=100, b=50, c=20,d=10, e=5, f=2, g=1, a1=0, b1=0, c1=0, d1=0, e1=0, f1=0, g1=0; string bill=" billete(s) de: "; cout<<"_____________Billetes-Calculadora__________"<<endl; cout<<"\n ingrese un valor entero positivo, para descomponer \n...
ALGO
0.998664
3.370301
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2018-09-14T03:30:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "caee0ff0f...
4e879e27-04ea-442a-b2f0-cd70c1fdcb55
YeonWon123/2019_Winter_Data_Structure
Week 8/명신/이중연결리스트.cpp
#include<iostream> using namespace std; //Node struct 생성 struct Node { int data; Node* next, * prev; Node() { next = prev = NULL; data = 0; } Node(int i, Node* ptr)//ptr 뒤에 추가한다. { data = i; prev = ptr; next = ptr->next; next->prev = prev->next = this; } void selvDelete() { prev->next = next; ...
ALGO
0.999927
3.676296
{ "github_metadata": { "branch": "master", "commit_count": 126, "repo_created_at": "2019-11-02T18:47:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "662e915f...
07528a6f-a74e-44c7-856e-9447105a48fb
NICK03nK/Linux_Study
producer-consumer model/circleQueue/MainCP.cc
#include "CircleQueue.hpp" #include "Task.hpp" #include <pthread.h> #include <cstdlib> #include <ctime> #include <sys/types.h> #include <unistd.h> #include <string> string SelfName() { char name[128] = { 0 }; snprintf(name, sizeof(name), "thread[0x%x]", pthread_self()); return name; } void* produce(void*...
TOOL
0.948268
4.668851
{ "github_metadata": { "branch": "main", "commit_count": 87, "repo_created_at": "2022-10-25T06:16: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": "20dbc809bb0...
b6320b50-b119-404e-b0e7-5a483974042d
menaehab/Codeforces-Solutions
0 - 1000 problems/Lights Out.cpp
#include <iostream> #include <bits/stdc++.h> #include <vector> #include <algorithm> #include <cmath> #include <map> #include <iomanip> #include <string> #include <set> #include <queue> #define speedup ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define ll long long #define el "\n" #define all(arr) arr.begin(),...
ALGO
0.999246
3.5998
{ "github_metadata": { "branch": "main", "commit_count": 117, "repo_created_at": "2024-08-24T15:38:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fbc7595a09...
13d333ae-1d83-42a0-a1d0-c745d9370db0
KartikSindura/cp-solutions
B/79B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define lp(i, n) for (int i = 0; i < n; i++) #define lps(start, n) for (int i = start; i <= n; i++) int main() { int n, m, k, t; vector<pair<int, int>> wastes; cin >> n >> m >> k >> t; wastes.resize(k); lp(i, k) { cin >> wastes[i].first >> w...
ALGO
0.999972
4.261478
{ "github_metadata": { "branch": "main", "commit_count": 66, "repo_created_at": "2023-06-15T17:41: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": "9566f115651...
307ff9d2-3f62-4a9b-948a-5e4c9cc94221
ishandutta2007/codeforces-n
natsugiri/normal/1334/F.cpp
#pragma GCC optimize ("O3") // #pragma GCC target ("avx") #include<stdio.h> #include<iostream> #include<vector> #include<algorithm> #include<string> #include<string.h> #ifdef LOCAL #define eprintf(...) fprintf(stderr, __VA_ARGS__) #else #define NDEBUG #define eprintf(...) do {} while (0) #endif #include<cassert> usin...
ALGO
0.999945
3.57216
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:35:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "75975cbf213f...