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
2a2693a7-b5d8-446f-abb3-85e50e777e8c
xzrunner/external
cgal/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h
// Copyright (c) 1999-2005 // Utrecht University (The Netherlands), // ETH Zurich (Switzerland), // INRIA Sophia-Antipolis (France), // Max-Planck-Institute Saarbruecken (Germany), // and Tel-Aviv University (Israel). All rights reserved. // // This file is part of CGAL (www.cgal.org) // // $URL$ // $Id$ // SPDX-Li...
ALGO
0.996566
6.980146
{ "github_metadata": { "branch": "master", "commit_count": 59, "repo_created_at": "2016-02-24T06:01:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c6cea88e2...
627ed1c2-8146-4c13-abf3-e38e1d9fbee6
tsattler/RansacLib
RansacLib/sampling.h
// Copyright (c) 2019, <NAME> // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright // notice, this list of condition...
ALGO
0.995798
7.56828
{ "github_metadata": { "branch": "master", "commit_count": 112, "repo_created_at": "2019-08-07T20:57:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 375, "forks": 50, "issues": 1, "pull_requests": 3 }, "file_meta": { "content_id": "b5a37...
20b59015-5152-4752-95ca-dce99ac45188
YOGDEV/Coding_Problem
Two numbers with odd occurrences.cpp
//https://practice.geeksforgeeks.org/problems/two-numbers-with-odd-occurrences5846/1 /* Given an unsorted array, Arr[] of size N and that contains even number of occurrences for all numbers except two numbers. Find the two numbers in decreasing order which has odd occurrences. Example 1: Input: N = 8 Arr = {4, 2, 4,...
ALGO
0.999992
5.142433
{ "github_metadata": { "branch": "main", "commit_count": 196, "repo_created_at": "2022-08-30T18:04:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5776c6afbd...
1a2a6179-6c87-4899-b749-2e71d20228a8
u-noob-i/CF---Practice
Pashmak and Garden.cpp
#include<iostream> using namespace std; int main() { int x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; if (x1 == x2) { cout << x1 + y1 - y2 << " " << y2 << " " << x1 + y1 - y2 << " " << y1 << endl; } else if (y1 == y2) { cout << x1 << " " << y1 + x2 - x1 << " " << x2 << " " << y1 + x2 - x1 << endl; } els...
ALGO
0.999657
3.112255
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-09-01T05:07: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": "8db6d57a03f0...
b441137d-77d9-4b53-892c-37a958283b14
akbtech17/dsa
Patterns/hollow-diamond-pattern.cpp
// hollow - diamond - pattern.cpp #include <iostream> using namespace std; int main() { int n; cin >> n; for (int i = 1; i <= n; ++i) { //one partition if (i <= (n / 2) + 1) { //print star for (int star = 1; star <= (n / 2 + 2 - i); star++) cout << "*\t"; //print space for (int space = 1; space <= ...
ALGO
0.999983
3.879234
{ "github_metadata": { "branch": "main", "commit_count": 163, "repo_created_at": "2021-02-22T13:18: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": "9953eb25b6...
5906c49b-5c51-4946-8dd4-d9c93adb0cde
RickFqt/Coloruid
coloruid.cpp
#include <bits/stdc++.h> std::vector<std::string> tokenize(std::string s){ std::vector<std::string> tokens; int n = s.length(); int count = 0; int start = 0; for(int i = 0; i < n; i++){ if(s[i] == ' '){ std::string t = s.substr(start,count); tokens.push_back(t); ...
ALGO
0.999723
5.004126
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2023-06-03T20:21: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": "10a3e13d1...
7765112d-e20c-4068-828f-0ab181da7101
kaybenot/algorytmy
Z9/include/Graph.hpp
#pragma once #include "Set.hpp" #include <string> #include <fstream> #include <vector> #include <stdexcept> #include <sstream> #include <iostream> #include <algorithm> #include <map> #include <climits> #include <exception> class Vertex { public: std::string index; bool operator==(const Vertex& r) { ...
ALGO
0.996216
5.264222
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-10-05T02:21: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": "2e02d5f08437...
b6d0c2b7-5a9e-4b89-8984-74cbe72b6c6e
aditya-bhatt-coder/Codeforces-Submissions
Codeforces Round #835/c.cpp
// I CAN FIX THE WORLD, BUT THEY WON'T GIVE ME THE SOURCE CODE! #include <bits/stdc++.h> #define ll long long #define mod 1000000007 using namespace std; // --debug-- template <typename dt> void print(vector<dt> v){ for(dt i=0 ; i<v.size() ; i++) cout<<v[i]<<" "; cout<<'\n'; } int main() { ios_ba...
ALGO
0.99999
4.417766
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2022-08-12T15:22: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": "7f7b4933b1b...
39eaa4e4-3a62-465b-9bf2-2068ddc5050c
LuisAlbertoVasquezVargas/CP
otherRepos/Codes/Laptop_Ubuntu/luis/1471_TI.cpp
#include<bits/stdc++.h> using namespace std; #define sc( x ) scanf( "%d" , &x ) #define REP( i , n ) for( int i = 0 ; i < n ; ++i ) #define FOR( it , A ) for( typeof A.begin() it = A.begin() ; it != A.end() ; it ++ ) #define clr( t , val ) memset( t , val , sizeof( t ) ) #define pb push_back #define N 50000 #define ...
ALGO
0.999977
4.121294
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2017-02-12T20:18: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": "778cdf0ccd...
c36d89f9-90ed-4f09-b3af-d022a1ecae1e
Anubhav12345678/competitive-programming
ARYAs STUNTHACKEARTHDFSVVVVIMP.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int lli; #define FIO ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL) #define endl "\n" #define pb push_back #define mp make_pair #define re(i,n) for(int i=0;i<(n);i++) const int N=10002; vector<int> adj[N]; // Adjacency list vector<bool> v...
ALGO
0.999962
3.846635
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-11-18T08:04:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "be6a433979...
77998dff-75ad-48a9-96aa-199d23ddde5b
shersheryar/Data-Structures
linkedList/circularLinkedList.cpp
#include <iostream> using namespace std; class node{ public: int data; node* next; node(int val){ data = val; next = NULL; } }; // ===========Insert at head========================== void insertAtHead(node* &head,int val){ node* n= new node(val); if(head == NULL){ n-...
ALGO
0.999931
4.16351
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2022-12-08T19:08:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6787a082dc9...
6cc824fe-fded-4fe8-911f-87bb6aadc305
runxuanjiang/Competetive_Programming
Solutions/Codeforces/Competition/672D2/C.cpp
//Competition #: //Problem #: //Accepted: #include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; const ll MOD = 1000000007; #define fast ios::sync_with_stdio(false); cin.tie(nullptr) #define tests int testCount; cin >> testCount; while(testCount--) int main() { fas...
ALGO
0.999969
4.053966
{ "github_metadata": { "branch": "master", "commit_count": 202, "repo_created_at": "2019-03-19T07:23: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": "114e5e5d...
7ab32bef-a4a3-428f-a6b9-f6870e88c983
DavidBarbera/MathTeam
OpenGL/Projects/SlerpScene/SlerpScene/Quaternions.h
#pragma once #include <cmath> #include <cstdlib> #include <sstream> #include <iostream> #include <fstream> #define PI 3.14159265 // Quaternion class. class Quaternion { public: Quaternion() { } Quaternion(float wVal, float xVal, float yVal, float zVal) { w = wVal; x = xVal; y = yVal; z = zVal; } float getW() {...
ALGO
0.964959
4.802643
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2015-12-15T19:00:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "457ce6ce4...
7a1f2fff-63b6-4976-b99b-88e68fb4726f
gh0st-ryder/Hacking
leetcode/1-500/_000317_shortestDistAllBuildings_accepted.cpp
class Solution { struct Coord { int r=0; int c=0; }; int R, C; int num_houses=0; vector<vector<int>> dist; // total dist to all houses vector<vector<int>> touched; // how many houses could visit me // O(R*C) time. void bfs(vector<vector<int>>& gr...
ALGO
0.999947
5.629911
{ "github_metadata": { "branch": "master", "commit_count": 618, "repo_created_at": "2015-03-30T22:33: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": "0052dd25...
fd9b83ca-771c-4c07-867a-2a53eeb9ad67
ganeshbhandarkar/Problem-Solving
Practice/Codeforces/1167A.cpp
// Problem : A. Telephone Number // Contest : Codeforces - Educational Codeforces Round 65 (Rated for Div. 2) // URL : https://codeforces.com/problemset/problem/1167/A // Memory Limit : 256 MB // Time Limit : 1000 ms // Powered by CP Editor (https://github.com/cpeditor/cpeditor) /* * My Solutions Repository at http...
ALGO
0.998841
4.658875
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2020-07-07T17:34:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e5b20a41c...
fb1d4553-2d52-4004-b673-22e33a0c2373
dunan/MultiVariatePointProcess
3rd-party/igl/centroid.cpp
// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2014 <NAME> <<EMAIL>> // // This Source Code Form is subject to the terms of the Mozilla Public License // v. 2.0. If a copy of the MPL was not distributed with this file, You can // obtain one at http://mozilla.org/MPL/2....
ALGO
0.993943
6.782548
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2016-02-17T06:32:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 77, "forks": 30, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "21f9fa1...
307f9952-0965-4f33-ac8a-fb0b4d4e88fc
FuzeT/LeetCode
Algorithm/121-180/140_Word_Break_II.cpp
#include <iostream> #include <string> #include <sstream> #include <vector> #include <algorithm> #include <map> #include <stack> #include <queue> #include <unordered_map> #include <set> #include <math.h> #include <unordered_set> using namespace std; class Solution { public: vector<string> wordBreak(string s, unordere...
ALGO
0.998858
5.246911
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2015-04-15T03:41: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": "ff1bfb3d8...
8d1ec6c7-f481-4350-872b-037d5d4b913f
6293/idocp
include/idocp/ocp/state_equation.hxx
#ifndef IDOCP_STATE_EQUATION_HXX_ #define IDOCP_STATE_EQUATION_HXX_ #include "idocp/ocp/state_equation.hpp" #include <cassert> namespace idocp { inline StateEquation::StateEquation(const Robot& robot) : Fqq_inv_(), Fqq_prev_inv_(), Fqq_tmp_(), Fq_tmp_(), lie_der_inverter_(), has_floating_base_...
ALGO
0.997029
6.493804
{ "github_metadata": { "branch": "master", "commit_count": 569, "repo_created_at": "2021-10-15T12:15:26.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "mayataka/robotoc", "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_i...
32ab7335-0283-4ccf-9942-c5e10e0982b5
SnehanjanChatterjee/LeetcodeSolutions
0875-koko-eating-bananas/0875-koko-eating-bananas.cpp
class Solution { private: // TC -> O(N) int totalHoursToEat(vector<int>& piles, int k, int h) { int ans = 0; for(auto &x: piles) { ans += ceil((double)x / (double)k); if (ans > h) return ans; // int overflow occured. So to prevent that return if ans is already over h ...
ALGO
0.99973
5.55718
{ "github_metadata": { "branch": "main", "commit_count": 723, "repo_created_at": "2022-10-31T17:34:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "85c999d148...
f4c938c2-c0eb-4999-97a0-9511307aeab8
karry3775/Motley
Tiling/src/Tiling.cpp
#include <Tiling.h> namespace tiling { Tiler::Tiler(const uint32_t N, const uint32_t cell_size) : N_(N), cell_size_(cell_size) { initViz(); } void Tiler::visualize(const TilingSequences& all_ts) { int all_ts_idx = 0; int tile_idx = 0; SDL_bool quit = SDL_FALSE; while (!quit && all_ts_idx < a...
ALGO
0.971365
6.607483
{ "github_metadata": { "branch": "master", "commit_count": 184, "repo_created_at": "2021-01-11T00:22:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "e1d63178...
17cdd0f6-630b-486e-be02-54f490842c04
kssilveira/topcoder
old/CubeColoring.cpp
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cfloat> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iostream> #include <limits> #include <list> #include <map> #include ...
ALGO
0.999396
3.995884
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2011-12-17T15:31: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": "a43bb2d782...
c0e4a3c3-f7cc-4a0d-957e-2c4050a5b25d
AndersonKao/CP_Problems
WF/WF2000/pA.cpp
#include <bits/stdc++.h> using namespace std; //#define DEBUG //#define DEBUGANS using PII = pair<int, int>; using P3i = tuple<int, int, int>; int T; enum cardinal { W = 0, S = 1, E = 2, N = 3 }; enum direction { L = 0, R = 1, F = 2 }; struct grid{ bool exist; vector<direction> dire...
ALGO
0.999985
4.165143
{ "github_metadata": { "branch": "master", "commit_count": 244, "repo_created_at": "2022-01-23T04:16:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4953e737...
3a9685e4-0186-48d7-807b-2a3b49264d90
huangshixin/Job
C++基础知识/A8-指针/A2-指针数组.cpp
指针数组 1、比如 你先定义一个数组 int arr[5] = {1,2,3,4,5} int *p=&arr cout<<p[0]<<endl;只是拿到第一个数的地址 2、指针的引用和指针的解引用; 实现一个冒号排序,使用【地址传递】-------从前往后排序 #include<iostream> using namespace std; #include<math.h> void bubbleSort(int *arr, int b) { for (int i = 0; i <b-1; i++) { for (int j = 0; j<b-i-1; j++) { //j要小于i...
ALGO
0.999822
4.188007
{ "github_metadata": { "branch": "main", "commit_count": 599, "repo_created_at": "2022-07-21T07:57: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": "89505c290f...
14706a6e-82c5-4dee-8650-92d24fdaf5ea
PandaBoi/Coursera_UCSD_DSA_Specialization
course1_2002192002/week1_programming_challenges/2_maximum_pairwise_product/max_pairwise_product.cpp
#include <iostream> #include <vector> #include <algorithm> // int MaxPairwiseProduct(const std::vector<int>& numbers) { // int max_product = 0; // int n = numbers.size(); // for (int first = 0; first < n; ++first) { // for (int second = first + 1; second < n; ++second) { // max_produc...
ALGO
0.99994
5.078721
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-07-11T13:49: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": "2fe7620767...
1c892780-1b49-4c2c-92ab-1c214e1a187a
rishiVC20/competitive_programming
CSES/RangeQueries/staticRangeMinimumQueries.cpp
// <NAME> #include<bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define onebit(x) __builtin_popcountll(x) #define vi vector<ll> #define YES cout<<'Y'<<'E'<<'S'<<endl #define NO cout<<'N'<<'O'<<endl const ll mod = 1e9+7; class Disjoint{ vector<ll>size,rank,parent; public: ...
ALGO
0.999989
4.755825
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2024-07-24T05:22:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c48e47ea75f...
3902f5ca-a122-43ea-83ee-0284ca42a855
RobbyLawrence/GraphAlgorithms
Homework/Homework7/old/kernighan-lin.cpp
#include <iostream> #include <fstream> #include <vector> #include <algorithm> #include <limits> #include <cstdlib> #include <ctime> using namespace std; class Graph { // I wanted to take a class-based approach this week private: int num_vertices; int num_edges; vector<vector<int> > adjlist; public: G...
ALGO
0.999948
5.126362
{ "github_metadata": { "branch": "main", "commit_count": 48, "repo_created_at": "2025-01-22T21:22: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": "2e1436b0557...
4f343df7-281e-4856-b7a2-8798d90f6f1c
ahicks1/DataAbstractionHomework
AVLMap.h
#ifndef AVLMAP #define AVLMAP #include <utility> #include <algorithm> #include <iostream> using namespace std; template<typename K,typename V> class AVLMap { struct Node { Node(Node *p):left(nullptr),right(nullptr),parent(p),height(1) {} Node():left(nullptr),right(nullptr),parent(nullptr),height(1) {} std::pa...
ALGO
0.987944
4.656716
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2017-09-22T00:36: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": "8cdbe22fdf...
8d106770-8ec7-4e48-a2b3-5821bab655dc
iseki-masaya/topcoder
Div1/SRM383Div1/Medium.cpp
#include <iostream> #include <map> #include <string> #include <vector> #include <algorithm> #include <functional> #include <errno.h> #include <sstream> using namespace std; #define MAX 99999 class FloorBoards { public: int addLine(int now,int prev,int obs,int sizeX) { int cnt = 0; bool isHorizon = false; fo...
ALGO
0.999616
4.571021
{ "github_metadata": { "branch": "master", "commit_count": 218, "repo_created_at": "2013-04-10T01:32:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "51984e4e...
9c832a49-7dd7-4dac-add3-3a556f7610e9
aggarwal-shivansh/PCS505-DAA
week7/bellman.cpp
#include <bits/stdc++.h> #define INF INT_MAX #define NIL -1 using namespace std; void printParent(vector<int> &parent, int u) { cout << u + 1 << " "; if (parent[u] >= 0) printParent(parent, parent[u]); } void bellmanFord(int **Graph, int V,int E, int src) { vector<int> weight(V, INF); vector<i...
ALGO
0.999952
3.9958
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2021-07-21T13:31: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": "74ec956c61a...
e880456b-7dcf-4e68-b120-967f80d1ec9c
SuperHong94/Daily-Study
19년/12m/1week/red_Black Tree/red_Black Tree/tree.cpp
#include "tree.h" Node* NewNode(int data) { Node* node = new Node; node->data = data; node->left = node->right = NIL; node->color = RED; return node; } void printColor(int d) { if (d == BLACK) std::cout << "검정"; else std::cout << "빨강"; } void Insert(Node*& node, int data) { if (node == NIL || node == null...
ALGO
0.999156
4.393544
{ "github_metadata": { "branch": "master", "commit_count": 77, "repo_created_at": "2019-10-11T05:31:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 4 }, "file_meta": { "content_id": "b10b2c0a7...
94f02aaa-a4cc-45de-b5dd-ce9705dc1a2a
rmittal1421/street-coding
LeetCode Problems/79.cpp
class Solution { public: vector<int> f{-1, 0, 1, 0}; vector<int> s{0, -1, 0, 1}; bool includes(vector<vector<char>> &board, int x, int y) { if(x >= 0 && x < board.size() && y >= 0 && y < board[0].size()) return true; else return false; } bool dfs(vector<vector<char>> &board...
ALGO
0.999954
6.203592
{ "github_metadata": { "branch": "master", "commit_count": 89, "repo_created_at": "2019-07-17T06:30:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "72f25afe6...
2f88c799-a323-4957-98a0-93dc739d3629
Bhavya6187/practice
Project Euler/same_divisors_179.cpp
#include <stdlib.h> #include <stdio.h> #include <string> #include <math.h> #include <iostream> #include <algorithm> #include <vector> #include <queue> #include <cstdlib> using namespace std; vector<int> pv; bool myfunction (int i,int j) { return (i<j); } bool is_prime(int a){ if(a == 1) return false; if(binar...
ALGO
0.999556
3.775572
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2014-01-14T10:14: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": "7113cad8e8...
8df622ff-6c41-4860-a154-83dd6302406b
gihop/AlgorithmStudy
시뮬레이션/hello_14503/hello_14503/main.cpp
// // main.cpp // hello_14503 // // Created by <NAME> on 06/09/2019. // Copyright © 2019 <NAME>. All rights reserved. // #include <iostream> using namespace std; void clean(int(*square)[55]); void clean2(int(*square)[55]); int n, m; int score = 0; int dx[4] = {-1, 0, 1, 0}; int dy[4] = {0, 1, 0, -1}; int x, y...
ALGO
0.999865
3.989481
{ "github_metadata": { "branch": "master", "commit_count": 382, "repo_created_at": "2019-12-30T12:34: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": "977d719b...
159ee078-62d4-4d6e-adb9-cc49d1e88c3f
skjha1/Data-Structure-Algorithm-Programs
Heap/01 InsertinHeap.cpp
#include <iostream> #include <vector> using namespace std; // Lecture based void InsertA(int A[], int n){ int i = n; int temp = A[n]; while (i > 0 && temp > A[i % 2 == 0 ? (i/2)-1 : i/2]){ A[i] = A[i % 2 == 0 ? (i/2)-1 : i/2]; i = i % 2 == 0 ? (i/2)-1 : i/2; } A[i] = temp; } /...
ALGO
0.999849
4.846992
{ "github_metadata": { "branch": "master", "commit_count": 682, "repo_created_at": "2020-08-12T04:43:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 652, "forks": 257, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "02c6...
58331f8a-21de-4203-9d06-c96a06285699
MathiasJes/VDMSLCppLib
Map.h
#pragma once #include <unordered_map> #include "../Set/Set.h" /* Operator Name Type dom m Domain (map A to B) !set of A rng m Range (map A to B) !set of B m1 munion m2 Merge (map A to B) * (map A to B) !map A to B m1 ++ m2 Override (map A to B) * (map A to B) !map A to B merge ms Distributed ...
ALGO
0.922629
5.384187
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-05-21T09:18: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": "3e9b6e7e5b...
4b784f95-babb-4337-9814-152679c88b2a
ptjb/pegsolitaire
movelist.cpp
#include "movelist.h" #include "position.h" #include "move.h" MoveList::MoveList(Peg a, Board b) : peg(a), board(b) { MoveList::findmoveables(); } void MoveList::findmoveables(){ moveables.clear(); for (int j=0; j < board.getheight(); j++) { for (int i=0; i < board.getwidth(); i++) { Position position{.x...
TOOL
0.945002
5.33448
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2017-04-13T11:19: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": "974a8bad0...
ecb02824-772d-41d8-b86d-c6e094fa9125
SStepz/ProblemSolving
lab07/wintsch.cpp
/* LANG: C++ */ #include <iostream> #include <vector> using namespace std; int main() { int n,num,maxpay=0; cin >> n; int s[n],t[n],w[n],mp[n]; vector<int> ans; vector<int> current[n]; for (int i=0;i<n;i++) cin >> s[i] >> t[i] >> w[i]; for (int i=0;i<n;i++) { mp[i] = w...
ALGO
0.999959
3.814627
{ "github_metadata": { "branch": "main", "commit_count": 140, "repo_created_at": "2023-02-04T02:33: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": "397b1e9da4...
d9528f1d-809f-4345-b144-3929fbf4f550
geekygirl8/Hacktoberfest_2022_DSA
C++/C++/confusing-number-ii.cpp
// Time: O(logn) // Space: O(logn) class Solution { public: int confusingNumberII(int N) { return totalCount(N) - validCountInLessLength(N) - validCountInFullLength(N); } private: int totalCount(int N) { const auto& s = to_string(N); int total = 0; int p = pow(lookup.s...
ALGO
0.999781
5.651026
{ "github_metadata": { "branch": "main", "commit_count": 84, "repo_created_at": "2022-10-01T04:19:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 63, "issues": 2, "pull_requests": 40 }, "file_meta": { "content_id": "b2c8b9a5...
7e335d1a-52d1-48aa-8b2a-0f1b042f32e4
htiek/cs106b-lecture-demos
Lecture 21/Binary Search Trees/BinarySearchTrees.cpp
/***************************************************** * File: BinarySearchTrees.cpp * * A program to play around with binary search trees! */ #include <iostream> #include <string> #include "console.h" #include "simpio.h" #include "TreeGraphics.h" using namespace std; /* Type: Node * A node in a binary search tre...
ALGO
0.999824
5.863764
{ "github_metadata": { "branch": "master", "commit_count": 125, "repo_created_at": "2019-01-04T21:43:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6c254801...
771350dd-4067-419d-bd5e-a03acf8c6f96
PranavKumarAV/Vertex_Cover_Problem
A3/rgen.cpp
#include <iostream> #include <sstream> #include <vector> #include <fstream> #include <string.h> #include <stdlib.h> #include <random> #include <unistd.h> #include <cstdlib> #include <set> #include <utility> class cmd_arg { // Class to store the command-line arguments public: int s,n,l,...
ALGO
0.960527
4.141557
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-07-18T03:16:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3b50422a9177...
915f4998-1e40-46e0-a69e-60cfa263e763
abhishekkarki/Aoc
Aoc24/24-Crossed-Wires/part01.cpp
#include <iostream> #include <fstream> #include <string> #include <vector> #include <unordered_map> #include <algorithm> enum bool_op { AND, XOR, OR }; struct gate { std::string in1, in2, out; int op; }; struct wire { std::string name; bool value; }; std::vector<std::string> split(const std...
ALGO
0.999577
4.953722
{ "github_metadata": { "branch": "main", "commit_count": 103, "repo_created_at": "2024-12-01T18:51: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": "1c8cd233ba...
30481491-2488-40b8-9460-b396cc09e29a
DhruvDave12/DSA-Practice
LeetcodeContests/01102022.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: bool allSame(vector<int> freq) { int same; // get first non-zero element int i; for (i = 0; i < freq.size(); i++) { if (freq[i] > 0) { same = freq[i]; ...
ALGO
0.999972
4.469566
{ "github_metadata": { "branch": "master", "commit_count": 395, "repo_created_at": "2022-07-01T15:40: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": "bf29c7db...
702f75cd-e1d0-4a88-a671-461c6a8a9b0a
raincross7/code-similarity
codes/train_code/problem223/problem223_18.cpp
#include<iostream> #include<stdio.h> //#include <bits/stdc++.h> #include<vector> #include<float.h> #include<iomanip> #include<algorithm> #include<string> #include<cstring> #include<math.h> #include<cmath> #include<sstream> #include<set> #include<map> #include<queue> #include <cassert> #include <cmath> #include<cstdint>...
ALGO
0.999961
3.757519
{ "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": "9bc8a52e95de...
39be9898-e516-4614-b9d2-b8d625f8f2ac
youssefqabli/OOP-modules-in-CPP
CPP09/ex01/RPN.cpp
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* RPN.cpp :+: :+: :+: ...
TOOL
0.93736
4.99375
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2023-03-21T01:49: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": "56f96c5b8a5...
7c3ebccc-5a07-4f9d-9533-0b2448a63d02
prakharguptaujjain/DSA_assignments
Saves/3rdweek/postfixtoinfix.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef vector<int> vi; typedef vector<pair<int, int>> pi; #define pb push_back #define ff first #define ss second #define hi cout << "HI"; #define des greater<int>() #define ma(v) max_element(v.begin(), v.end()) #define mi(v) min_element(v.begin()...
ALGO
0.999928
4.222017
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-01-05T12:45:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "76de4314cddb...
1dc72595-9ce8-456f-8443-43de849d260f
ks9058/CodingTest
Day55/3474.cpp
#include <bits/stdc++.h> using namespace std; int t; //팩토리얼 끝에 0이 생기는 이유는 2*5때문에 생김 이를 통해 2와 5가 몇번들어갔는지를 알면 답을 구할수 있음 //하지만 2를 나누는 수는 많지만 5르르 나누는 수가 적기 때문에 5를 세는것 int main() { cin.tie(NULL); cout.tie(NULL); ios::sync_with_stdio(false); cin >> t; while (t--) { int n; cin >> n; ...
ALGO
0.999908
4.948309
{ "github_metadata": { "branch": "main", "commit_count": 133, "repo_created_at": "2025-02-05T00:46: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": "5bff425ded...
655ca75e-d44e-47cc-80d9-6d4f6ce2bb5f
r6mez/Problem-Solving
Problems/P_Count_Words.cpp
/* "You’ve changed so much Thorfinn, that anger in your eyes is gone, i’m glad" */ // Contest: Sheet #4 (Strings) // Judge: Codeforces // URL: https://codeforces.com/group/MWSDmqGsZm/contest/219856/problem/P // Memory Limit: 256 // Time Limit: 1000 // Start: Sat 02 Nov 2024 03:54:44 PM EET #include <algorithm> #includ...
ALGO
0.997
4.134521
{ "github_metadata": { "branch": "main", "commit_count": 206, "repo_created_at": "2024-03-24T15:43:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d4f96cf5d8...
92ebcd48-f6f4-44f9-aee0-1c46b623c9e0
echapon/sherpa
SHRiMPS/Main/Cluster_Algorithm.H
#ifndef SHRiMPS_Main_Cluster_Algorithm_H #define SHRiMPS_Main_Cluster_Algorithm_H #include "SHRiMPS/Main/Soft_Jet_Criterion.H" #include "PDF/Main/Cluster_Definitions_Base.H" #include "ATOOLS/Phys/Cluster_Amplitude.H" #include "ATOOLS/Phys/Flavour.H" #include "ATOOLS/Org/Run_Parameter.H" #include "ATOOLS/Math/Histogram...
ALGO
0.952488
6.318765
{ "github_metadata": { "branch": "master", "commit_count": 9622, "repo_created_at": "2020-07-17T14:04:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 5 }, "file_meta": { "content_id": "5dc8c20...
e768f430-532d-4c31-8615-c42e3dff30da
ArielXL/meet-in-the-middle
codes/ABCDEF.cpp
#include<bits/stdc++.h> #define endl '\n' using namespace std; int L[1000000], R[1000000], cntL[1000000], cntR[1000000]; void print(int arr[], int len) { for(int i = 0; i < len; i++) { cout << arr[i] << " "; } cout << endl; } int generate_left(int arr[], int N) { int sizeL = 0; for(i...
ALGO
0.999986
4.100201
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2021-09-04T01:53:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "783736e87...
ed344248-dff8-44d5-8c67-587ec5c6e14e
utcool7/Coding-Problems
gfg1/trees.Right View of Binary Tree.cpp
//https://practice.geeksforgeeks.org/problems/right-view-of-binary-tree/1 // time : O(n) // space :O(depth) // Should print right view of tree void printLeftView(Node *root , vector<bool> &check, int level ) { if(!root) return; if(check[level] == false) { check[level] = true; cout<<root->...
ALGO
0.999834
4.74144
{ "github_metadata": { "branch": "master", "commit_count": 113, "repo_created_at": "2020-03-26T16:32: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": "8fa4d150...
72785ec7-c5cb-43c9-9db2-56e8bc8b2d42
liuyubobobo/Play-Leetcode
0501-1000/0695-Max-Area-of-Island/cpp-0695/main.cpp
/// Source : https://leetcode.com/problems/max-area-of-island/description/ /// Author : liuyubobobo /// Time : 2017-10-19 #include <iostream> #include <cassert> #include <vector> using namespace std; // floodfill // Time Complexity: O(n*m) // Space Complexity: O(n*m) class Solution { private: int d[4][2] = {{...
ALGO
0.999337
6.098084
{ "github_metadata": { "branch": "master", "commit_count": 2592, "repo_created_at": "2016-12-01T17:08:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2732, "forks": 718, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "e3...
630c8ade-ae89-4202-8c9b-740824c57c2d
JorgeIba/Competitive-Programming-Problems
CodeForces/Grupo - Cuarentena de Entrenamiento/Cuarentena 5/D.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define lli long long int using namespace std; using namespace __gnu_pbds; typedef tree< lli , null_type, less<lli>, rb_tree_tag, tree_order_statistics_node_update > ordered_set; int main() { ios_base::sync_w...
ALGO
0.999954
4.063809
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2020-04-16T06:16: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": "3ac2996c0...
8ab82fef-af0e-4842-a273-d1d456b4a224
metrumresearchgroup/Torsten
cmdstan/stan/lib/stan_math/stan/math/prim/fun/simplex_constrain.hpp
#ifndef STAN_MATH_PRIM_FUN_SIMPLEX_CONSTRAIN_HPP #define STAN_MATH_PRIM_FUN_SIMPLEX_CONSTRAIN_HPP #include <stan/math/prim/meta.hpp> #include <stan/math/prim/fun/Eigen.hpp> #include <stan/math/prim/fun/inv_logit.hpp> #include <stan/math/prim/fun/log.hpp> #include <stan/math/prim/fun/log1p_exp.hpp> #include <stan/math/...
ALGO
0.998304
6.768052
{ "github_metadata": { "branch": "master", "commit_count": 655, "repo_created_at": "2018-03-09T17:48:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 59, "forks": 13, "issues": 7, "pull_requests": 1 }, "file_meta": { "content_id": "3d714fd...
d02fc4a8-4337-4f58-a58f-cbd2bf9ae6b6
eurecom-s3/AAl-Khaser
AntiAnalysisProofSample/app/src/main/cpp/rootdetector.cpp
#include <jni.h> #include <string> #include <sys/system_properties.h> #include <sys/types.h> #include <android/log.h> #include <cstdlib> #include <mntent.h> #include <unistd.h> #include "common/common.h" // Log macros #define LOG_TAG "RootDetector_Native" const char *const ANDROID_OS_BUILD_TAGS = "ro.build.tags"; con...
TOOL
0.961251
6.358034
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-12-12T09:06:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 14, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a6731be4a646...
504517cf-90d2-4000-8889-0f533b1ae1a3
ishandutta2007/codeforces-w
wasa855/normal/653/G.cpp
#include<bits/stdc++.h> using namespace std; #define pb push_back #define eb emplace_back #define mp make_pair #define Fast_IO ios::sync_with_stdio(false); #define DEBUG fprintf(stderr,"Running on Line %d in Function %s\n",__LINE__,__FUNCTION__) //mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count()); #de...
ALGO
0.999933
3.884032
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:34:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "79c727ac5f92...
26a5d05b-520f-4faf-9bdf-3ef6e2f2281e
CaSchmidt/Tracer
Tracer/ptcli/src/main.cpp
/**************************************************************************** ** Copyright (c) 2021, <NAME>. All rights reserved. ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1. Redistributions of source ...
ALGO
0.931195
5.780404
{ "github_metadata": { "branch": "master", "commit_count": 486, "repo_created_at": "2019-09-07T09:16:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "08e9bbc2...
62582588-2b06-4706-a0c9-d098961a2043
rdadan/GMAT-src-R2020a
GMAT-R2020a/src/base/forcemodel/SolarRadiationPressure.cpp
//$Id$ //------------------------------------------------------------------------------ // SolarRadiationPressure //------------------------------------------------------------------------------ // GMAT: General Mission Analysis Tool. // // Copyright (c) 2002 - 2020 United States Government...
ALGO
0.973586
5.754859
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-12-19T09:44:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7b133c0fc9...
c7cbd544-f129-471e-890d-0198eb19aceb
jjcwsws/Daily-test
test_4.16/test.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; void mul2(vector<int>& nums) { int upper = 0; for (int i = 0; i < nums.size(); i++) { nums[i] *= 2; nums[i] += upper; upper = nums[i] / 10; nums[i] %= 10; } if (upper)...
ALGO
0.9996
3.844395
{ "github_metadata": { "branch": "main", "commit_count": 297, "repo_created_at": "2024-03-13T00:08: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": "013d43fe92...
a06a3c09-de85-4b8f-9ce5-3ba80b08d8c7
HariAakash646/CompetitiveProgramming
CSES/inversion_prob.cpp
#include <bits/stdc++.h> using namespace std; #define scd(t) scanf("%d", &t) #define sclld(t) scanf("%lld", &t) #define forr(i, j, k) for (int i = j; i < k; i++) #define frange(i, j) forr(i, 0, j) #define all(cont) cont.begin(), cont.end() #define mp make_pair #define pb push_back #define f first #define s second t...
ALGO
0.999551
3.663903
{ "github_metadata": { "branch": "main", "commit_count": 123, "repo_created_at": "2022-09-08T07:58:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2ab5700772...
28ccadc6-7366-4cd4-b5c1-afe8ced32c67
alexandraback/datacollection
solutions_5769900270288896_0/C++/LazyAnna/B.cpp
#include <iostream> #include <iomanip> #include <string> using namespace std; int main() { int tests; int r, c, n, temp, r1, c1; cin >> tests; for (int t = 1; t <= tests; ++t) { cin >> r >> c >> n; if (r < c) { temp = r; r = c; c = temp; } //cout << r << ' ' << c << ' ' << n << endl; if ((r == 5) && ...
ALGO
0.999844
3.652374
{ "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": "cfc182a88...
84eee8e2-9497-4bc9-bb27-08816af739db
jerrykcode/LeetCode
Algorithms/023. Merge k Sorted Lists.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ typedef ListNode * List; class Solution { public: ListNode* mergeKLists(vector<ListNode*>& lists) { List head = NULL, tail = NULL; while (1) ...
ALGO
0.999769
5.859215
{ "github_metadata": { "branch": "master", "commit_count": 198, "repo_created_at": "2018-04-18T01:06: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": "f2710bd4...
509a2623-b57a-45be-a801-aec2e0734d66
EoJinChoi/AlgorithmCodingTest
27_2178.cpp
// 2024.10.2 #include <iostream> #include <queue> using namespace std; int dx[] = {0, 1, 0, -1}; int dy[] = {1, 0, -1, 0}; void BFS(int n, int m, int N, int M); int maze[101][101]; bool visited[101][101] = {false}; int main() { int N, M; cin >> N >> M; for (int i = 1; i <= N; i++) { string n...
ALGO
0.99999
4.231601
{ "github_metadata": { "branch": "main", "commit_count": 99, "repo_created_at": "2024-07-16T07:32: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": "c99ba1b8566...
c6b44cf6-6d76-4265-9018-e0f4e2b745ec
aloehr/adventofcode
aoc2020/solutions/day09.cpp
#include <map> #include <vector> #include <set> #include <algorithm> #include "../aoc.hpp" int adds_up_to(std::vector<unsigned long long>& data, size_t idx, unsigned long long n) { int r = 0; unsigned long long s = 0; for (; idx < data.size(); ++idx) { s += data[idx]; r += 1; if ...
ALGO
0.998767
4.969047
{ "github_metadata": { "branch": "master", "commit_count": 189, "repo_created_at": "2021-01-06T06:44: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": "07bb2d1c...
db1deffe-f5d9-45a7-957a-0a401536b28b
pmcharrison/minVL
src/min-vl.cpp
#include <Rcpp.h> #include <math.h> using namespace Rcpp; // [[Rcpp::export]] float mod(float x, int base) { return x - floor(x / base) * base; } // Get voice-leading element distance // // Computes the voice-leading distance between two // elements <e1> and <e2> given <elt_type>. <elt_type> // can be "pc", in whic...
ALGO
0.999083
4.727051
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2018-08-10T20:38:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e05936802...
86a128a3-9f71-4bb0-9df3-356184553653
ipelupessy/amuse-framework
src/amuse/community/simplex/src/plugins/HEALPix/src/healpix_base2.cc
/* * This file is part of Healpix_cxx. * * Healpix_cxx is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Healpix_cxx is...
ALGO
0.967444
6.224557
{ "github_metadata": { "branch": "master", "commit_count": 7777, "repo_created_at": "2018-06-28T11:15:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "91b0ba9...
740470b2-f28f-45e9-9654-978ee65f3745
Isaacdan333/CPSC323-Project-1
LexicalAnalyzer.cpp
/* Project: CPSC 323 - Project 1 Group members: <NAME>, <NAME>, <NAME> Program: Lexical Analyzer Input file: input_scode.txt Output file: output.txt Language: C++ */ #include <iostream> #include <fstream> #include <string> #include <vector> #include <iomanip> using namespace std; // Define di...
TOOL
0.920255
4.627314
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2023-09-22T05:45: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": "1fc6104410c...
09605528-bbc6-48b2-9432-063af55b5dc9
jdalfaro793/TrabajosPracticosED
TP 1 LISTAS SIMPLES CON 1 PUNTERO/Archivos vistos en clase C1-20240912/Ejercicio1.cpp
/* Considerando una lista de valores enteros, con un único puntero de inicio, modifique la definición y sus operaciones básicas de listas de modo que sea posible registrar la cantidad de valores pares y la cantidad de valores impares almacenados en la estructura. Desarrolle las operaciones iniciar_lista, crear_nodo...
ALGO
0.99901
5.056213
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-11-25T21:18: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": "a1cbd5b047...
37b72d54-eac9-47ee-9a54-ad31641da67d
bqqbarbhg/spear
src/ext/acl/compression/compression_settings.h
#pragma once //////////////////////////////////////////////////////////////////////////////// // The MIT License (MIT) // // Copyright (c) 2017 <NAME> & Animation Compression Library contributors // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated docum...
CONFIG
0.904119
6.762661
{ "github_metadata": { "branch": "master", "commit_count": 684, "repo_created_at": "2020-02-16T21:21:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 49, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8bce8ce...
4a8d96ec-7a07-4f2c-9c85-446d2edb1901
mdciotti/misc
queens.cpp
static bool isDirectionSafe(Grid<bool>& board, int row, int col, int drow, int dcol) { if (drow == 0 && dcol == 0) return true; row += drow; col += dcol; while (board.inBounds(row, col) && !board[row][col]) { row += drow; col += dcol; } return !board.inBounds(row, col); } static bool isSafe(Grid<bool>& board...
ALGO
0.996151
5.520359
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-05-17T02:54: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": "bdfcbbced3f2...
a78cdfbd-f4ff-4456-a8b7-d20d5c3b97bc
arjav1528/CP
LeetCode/2149.rearrange-array-elements-by-sign.cpp
/* * @lc app=leetcode id=2149 lang=cpp * * [2149] Rearrange Array Elements by Sign * * https://leetcode.com/problems/rearrange-array-elements-by-sign/description/ * * algorithms * Medium (84.22%) * Likes: 3592 * Dislikes: 202 * Total Accepted: 546.2K * Total Submissions: 648.6K * Testcase Example: '...
ALGO
0.999995
5.926651
{ "github_metadata": { "branch": "main", "commit_count": 164, "repo_created_at": "2024-08-21T18:14:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e88c278152...
de2fbf0e-47ba-48d6-876c-316a97ebd751
wpilibsuite/allwpilib
wpimath/src/main/native/include/frc/optimization/SimulatedAnnealing.h
// Copyright (c) FIRST and other WPILib contributors. // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. #pragma once #include <cmath> #include <functional> #include <limits> #include <random> namespace frc { /** * An imp...
ALGO
0.999988
7.606248
{ "github_metadata": { "branch": "main", "commit_count": 7447, "repo_created_at": "2014-09-30T20:51:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1185, "forks": 658, "issues": 433, "pull_requests": 134 }, "file_meta": { "content_id": "1...
dbc0d886-2136-4db3-9e14-1833a9297c62
kloetzl/mugsy
mugsy-seqan/projects/library/seqan/seeds/banded_chain_align.h
/*========================================================================== SeqAn - The Library for Sequence Analysis http://www.seqan.de ============================================================================ Copyright (C) 2007 This library is free software; you ...
ALGO
0.999228
4.606099
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2020-04-02T09:44:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "9041bb05d...
59ea09ac-fe8f-476a-8307-21043d3c7ba8
lythaiho/LapTrinh
bai ngay 24,4/3 canh cua 1 tam giac.cpp
#include<stdio.h> int main(){ int(a); printf( " nhap so thuc a bat ky tu ban phim\n",a); scanf("%d",&a); int(b); printf( " nhap so thuc b bat ky tu ban phim\n",b); scanf("%d",&b); int(c); printf( " nhap so thuc c bat ky tu ban phim\n",c); scanf("%d",&c); //de ba so a,b,c bat ki la ba canh cua mot goc vuong t...
ALGO
0.999559
3.55434
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2019-04-24T06:49: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": "6852b5461...
ddb0c1cd-c015-4e88-8551-7b59dbeeb6e7
LuuMing/HomeWork
cc/LeetCode/105.Construct_Binary_Tree_from_Preorder_and_Inorder_Traversal/1.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: vector<int> * pPreorder; vector<int> * pInorder; TreeNode * build(int pre , int start, ...
ALGO
0.999996
6.277331
{ "github_metadata": { "branch": "master", "commit_count": 569, "repo_created_at": "2017-03-15T15:44:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aa589ef2...
dc7cbb75-db6e-4dcc-9737-fd736245ae55
koushik395/LeetCodeProblems
0329-longest-increasing-path-in-a-matrix/0329-longest-increasing-path-in-a-matrix.cpp
class Solution { public: vector<vector<int>> dir = {{0,1},{0,-1},{-1,0},{1,0}}; int dfs(int x,int y,vector<vector<int>> &dp,vector<vector<int>>& grid,int &rows,int &cols) { if(dp[x][y]!=-1) return dp[x][y]; auto isSafe = [&](const int &newx,const int &newy) { ret...
ALGO
0.999988
6.015672
{ "github_metadata": { "branch": "main", "commit_count": 3196, "repo_created_at": "2023-03-26T07:16: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": "991c67ede...
cb76f579-1c52-493e-8132-5aef86d693e7
BackupTheBerlios/lutaprakct
server/src/agents/arch/subsumption/sample/avoidObstacles.cpp
#include "avoidObstacles.h" #include "agentTest.h" #include "testAgentData.h" #include <iostream> void AvoidObstaclesLayer::run(SubsumptionAgentData* data, void* auxiliarData){ TestAgentData* agentData = static_cast<TestAgentData*>(auxiliarData); std::cout << "evitanto obstaculos " << std::endl; //se o alvo ai...
ALGO
0.904772
4.131595
{ "github_metadata": { "branch": "master", "commit_count": 234, "repo_created_at": "2015-08-05T15:18: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": "27269c01...
12a5303c-1f35-4e36-bf6c-8d8a6f3f61a9
sanglap13/Cpp-Basic-Coding
natural.cpp
//C++ (For Loop) #include <iostream> using namespace std; int main() { int num; cout << "Enter the number: "; cin >> num; for(int i=1;i<=num;i++){ printf("%d ",i); } return 0; } // C++ (While Loop) // #include <iostream> // using namespace std; // int main() { // ...
ALGO
0.9944
3.841706
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-07-05T13:11:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6762daa1acf5...
59154a4a-6df0-4973-bcbc-c22787a4b393
Ww2Zero/ARTS
Algorithm/LeetCode/082_Remove_Duplicates_from_Sorted_List_II/test.cpp
#include "solution.h" #include <vector> using namespace std; ListNode *vector2ListNode(vector<int> &list) { ListNode *dummyRoot = new ListNode(0); ListNode *ptr = dummyRoot; for (int i = 0; i < list.size(); ++i) { ptr->next = new ListNode(list[i]); ptr = ptr->next; } ptr = dummyRo...
ALGO
0.999953
5.443935
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2019-04-01T05:19:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3f48d84d9...
ee90fdd8-3514-4d73-865e-250a29217357
Hifzu04/DSA_Practice_2.0
recursion/mergeSort.cpp
#include <iostream> #include <vector> using namespace std; void merge(int *arr, int s, int e) { int mid = s + (e - s) / 2;; // create two array int len1 = (mid - s) + 1; int len2 = e - mid; int *first = new int[len1]; int *second = new int[len2]; // store element int k = s; for ...
ALGO
0.999983
5.336499
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2024-01-08T12:44: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": "df195454a...
3b6962cc-f395-438e-86f2-ea37094a7d67
malak-elbanna/Codeforces-problems
chooseLaptop.cpp
#include <iostream> #include <vector> using namespace std; struct Laptop { int speed; int ram; int hdd; int cost; }; int main() { int n; cin >> n; vector<Laptop> laptops(n); for (int i = 0; i < n; i++) { cin >> laptops[i].speed >> laptops[i].ram >> laptops[i].hdd >> laptops[i]...
ALGO
0.999063
5.106245
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-02-25T09:29: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": "4812e068d895...
dc3714e0-ba86-465c-b9e3-c6553118109a
stackline/atcoder
other_rated_contests/m-solutions2020/c_exp.cc
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { int N, K; cin >> N >> K; // LOGe(x) // // N <= 200000 のため、低が2の対数に変換すると、最大でも18未満となる // // * LOG2(131072) = 17 // * LOG2(262144) = 18 // // 低が e (ネイピア数) の場合、log(200000) ~ 12.2061 となる // // * 前提 // * i学期の評点をL[i]と...
ALGO
0.999985
5.211021
{ "github_metadata": { "branch": "master", "commit_count": 619, "repo_created_at": "2020-04-29T16:18: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": "6acad418...
e7abe10d-a342-4930-a5e7-917f1001a46f
M-Salameh/codeforces-problems
CSES/Tree Algorithms/Tree Distances I.cpp
#include <bits/stdc++.h> #define all(v) v.begin(),v.end() #define mid (l+r)/2 #define lc 2*node #define rc lc+1 #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define ordered_set(X) tree<X, null_type,less_equal<X>, rb_tree_tag,tree_order_statistics_node_update> ///#define int int_fast64_t...
ALGO
0.99996
4.390523
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2024-09-03T20:13:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "efd168141c...
9a0b4a32-20fa-4359-924b-46a1414d2a8c
kjnh10/pcw
work/atcoder/abc/abc043/B/answers/35719_rock.cpp
//#define M_PI 3.14159265358979323846 #define _USE_MATH_DEFINES //#define _GLIBCXX_DEBUG //#define all(x) (x).begin(),(x).end() #include <bits/stdc++.h> #define TASK "" #define sqr(x) ((x)*(x)) typedef long long ll; typedef long double ld; typedef unsigned long long ull; using namespace std; const ll INFLL = numeric...
ALGO
0.999633
3.371919
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2018-05-23T15:03: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": "d52340ff6...
8fcc47cb-fc14-40dd-a872-181166f714ee
0x33467/sdc-udacity-term2
project-1/src/FusionEKF.cpp
#include "FusionEKF.h" #include "tools.h" #include "Eigen/Dense" #include <iostream> using namespace std; using Eigen::MatrixXd; using Eigen::VectorXd; using std::vector; /* * Constructor. */ FusionEKF::FusionEKF() { isInitialized = false; previousTimestamp = 0; // initializing matrices RLaser = MatrixXd(...
ALGO
0.90232
6.486683
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2017-05-11T20:19:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6907193b8...
8b696d70-9b1c-470c-8d4a-03b3bbea5817
YYS666/FastWin
partition.cpp
#include <vector> #include <unordered_map> #include <thread> #include <mutex> #include <stdlib.h> #include <iostream> #include <chrono> #include "partition.hpp" namespace FastWin{ int num_of_partitions = 16; int attribute_to_partition; std::mutex combine_mutex; void divide(std::unordered_map<int, std::vec...
DATA
0.964543
4.87819
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-11-01T15:12: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": "94319cee5a...
f769fd20-67a6-4f9f-8dd8-71a072ad64ef
NobelSS/CP-Problems
SPOJ/ALCATRAZ3.cpp
#include<bits/stdc++.h> int moveX[] = {1, 0, -1, 0}; int moveY[] = {0, 1, 0, -1}; char map[101][101]; bool visited[101][101]; int startX, startY; int n, m, min, max = 0; void transverse(int x, int y, int max_dist){ int currX, currY; visited[x][y] = true; for(int i=0;i<4;i++){ currX = x + moveX[i]; currY = y + m...
ALGO
0.999995
3.564382
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2023-12-29T03:55: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": "5e90caf495c0...
5bdae944-ce49-40a7-92b1-25ce34c67818
mehedi-66/Algorithm_DSA
Graph/13_ShortestPathinUndirectedGraph.cpp
/* Shortest Path Undirected Graph src => target store min distance inside the distance array 1) take distance array 2) put in infinity 3) initial take zero go 4) go adj nodes add weight (1) if the added distance smaller then previous then take it in distance array ... 4 6 0 1 ...
ALGO
0.999972
4.634011
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2022-02-07T17:38: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": "26c4029c3fe...
8a90fad8-73fb-4c95-bff1-945b4ff16596
JACOBIN-SCTCS/competitive_coding
leetcode/critical_connections.cpp
class Node { public: int val; bool visited; int dfs_num; int dfs_low; int parent; }; class Solution { vector<vector<int>> ret; int timer=0; public: void APDFS(vector<int> graph[],Node nodes[],int s) { nodes[s].visited=true; int n...
ALGO
0.999978
5.716578
{ "github_metadata": { "branch": "main", "commit_count": 562, "repo_created_at": "2019-07-13T14:48:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d267a008e3...
508f8f08-2d49-4999-aa97-17e6896e693a
engulfing-marubozu/CodeForces_Streak
A_Doremy_s_Paint_3.cpp
#include <bits/stdc++.h> using namespace std; void solve() { int n; cin >> n; int arr[n]; unordered_map<int, int> mp; for (int i = 0; i < n; i++) { cin >> arr[i]; mp[arr[i]]++; } if (mp.size() > 2) { cout << "No\n"; } else if (mp.size() == 1) ...
ALGO
0.999736
4.357866
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2022-08-15T15:50: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": "263f2f3f193...
f2023fcb-f557-4edb-83ed-2202f4828904
Mascode-Dev/TPProg
tpg.cpp
using namespace std; #include <cmath> #include <string> #include <iostream> void dessinRectangle(int l, int h) { for (int ligne(0); ligne < h; ligne++) { for (int colonne(0); colonne < l; colonne++) { cout << "*"; } cout << endl; } } int diagonale(int l, int h){ /...
TOOL
0.992286
3.201863
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-08-20T19:29: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": "9046dbd694...
8bb51f22-1e04-4ae9-925a-0b0bff3030b1
Andromedanita/Scinet_course
Assignments/Assignment2/ants_using_pointers.cc
#include <cmath> #include <iostream> #include "initialize.h" #include "single_time_step.h" #include <rarray> int main() { // ants walk on a table const int table_size = 356; int end_time = 40; float frac_move = 0.2; const int total_ants = 1010; // initial number of ants // initiali...
ALGO
0.998267
3.970529
{ "github_metadata": { "branch": "master", "commit_count": 81, "repo_created_at": "2016-01-19T16:11:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "deef02de8...
113409a6-df39-41c8-b7ac-b4ebe76a384a
ianmnz/hackerrank
data-structures/stasks/waiter.cpp
/** * https://www.hackerrank.com/challenges/waiter/problem */ #include <iostream> #include <vector> #include <stack> #include <queue> /** * Sieve of Eratosthenes * @param n: The number of primes necessaries * @return An array with n prime numbers in order */ std::vector<int> sieve(const int n) { // To ensur...
ALGO
0.99988
5.230679
{ "github_metadata": { "branch": "main", "commit_count": 97, "repo_created_at": "2023-05-04T12:44: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": "729ec4fb519...
a2cdfc1b-8772-4db9-9eea-99b574d5af12
ShantnuS/COMP3214
cw2/Lab1/rgl/ClipCS.cpp
#include <RGL.h> #define CHECK(w, v) (v >= 0 && v < w) int outcode(int wxl, int wxr, int wyb, int wyt, int x, int y) { int out = 0; if(x < wxl) out = out | 1; if(x > wxr) out = out | 2; if(y < wyb) out = out | 4; if(y > wyt) out = out | 8; return out; } // namespace LINES // { bool Clip(g...
ALGO
0.977001
5.125698
{ "github_metadata": { "branch": "master", "commit_count": 89, "repo_created_at": "2018-03-02T14:58:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7bb9d1bbd...
58da3842-c0de-4d2b-870d-eee70394eff3
himanshu864/DSA_CPP
2D_Array/rotate90.cpp
#include <iostream> #include <vector> using namespace std; void rotate(vector<vector<int>> &matrix) { int n = matrix.size(); // imagine a block toppling to right. // the bottom right corner will be the pivot. // hence invert the matrix from top left to bottom right // corner (transpose), // and...
ALGO
0.99998
6.555267
{ "github_metadata": { "branch": "main", "commit_count": 229, "repo_created_at": "2024-04-13T16:29: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": "5e6158c482...
bee140fb-b382-4a5d-8c25-6ac50af103d4
Bishweswar1709/Programming-Cpp
Pattern/Hollow daimond.cpp
// * // * * //* * // * * // * #include <iostream> using namespace std; int odd(int n) { if (n % 2 == 0) { cout << "possible but not a right pattern"; return false; } return true; } int main() { int n, nst, nsp, i, j, k, ml; cout << "Enter the number of rows: "; ...
ALGO
0.999837
3.615616
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-07-09T19:09: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": "f9eba0dabddf...
68aa99fb-7307-427b-aebc-62d3dc6357c0
ctu-geoforall-lab-projects/bp-fiedlerova-2013
src/geoc_cpp/affinetransformation.cpp
/*************************************************************************** affinetransformation.cpp GEOC - GEOS Conflation library --------------------- begin : April 2013 copyright : (C) 2013 by <NAME> email : tfiedlerova dot at gmail dot com ******...
ALGO
0.998666
6.691913
{ "github_metadata": { "branch": "master", "commit_count": 181, "repo_created_at": "2016-03-23T17:49:13.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "66b025b24...
b2d9a966-fb25-442a-87ea-e0055b81039d
ML-UCV/ML-CodeBert-DistinctSolutions
Raw Dataset/ctc/kosaraju/test/f1b8bf3c-f383-422b-9f4b-7bfd24026a22.cpp
#include <bits/stdc++.h> #include <cstdio> using namespace std; FILE* fin=fopen("ctc.in", "r"); FILE* fout=fopen("ctc.out", "w"); vector<int> lista[100001]; vector<int> listaTrans[100001]; vector<int> comp[100001]; int n, m, ordine[100001], vizitat[100001], total, tot[100001], nr; void DFFinal(int nod)...
ALGO
0.999986
4.039218
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-03-06T17:44:46.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0b79d1e5e2446...
048ac311-0846-4992-8d3b-9e1a64663580
ericgoldfien/code-examples
euler39.cpp
// euler39.cpp : This file contains the 'main' function. Program execution begins and ends there. // my solution to project euler #39 https://projecteuler.net/problem=39 #include <iostream> #include <vector> using namespace std; //Calculate how many unique right triangles have a perimeter of n int numRightTris(int n...
ALGO
0.999934
5.335999
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2023-01-12T17:36: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": "9fe40388105...
4806f664-7e54-41c1-84f0-74e2386677da
u2x1/algorithm
contest/gdut/gdut_2022_summer_camp/811.cpp
#include <cstdio> #include <algorithm> #define orep(i,a,b) for(int i=(a); i< (b); ++i) #define crep(i,a,b) for(int i=(a); i<=(b); ++i) #define abs(a) ((a)<0?-(a):(a)) #define min(a,b) ((a)<(b)?(a):(b)) #define min3(a,b,c) min(min(a,b),c) #define max(a,b) ((a)>(b)?(a):(b)) #define max3(a,b,c) max(max(...
ALGO
0.999818
3.493021
{ "github_metadata": { "branch": "main", "commit_count": 69, "repo_created_at": "2022-07-14T04:43:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "657d5f555df...
bfdf85c4-25d1-49d0-bb13-0d1dd176844a
ishandutta2007/codeforces-k
krijgertje/normal/1418/F.cpp
#include <algorithm> #include <iostream> #include <sstream> #include <string> #include <vector> #include <queue> #include <set> #include <map> #include <cstdio> #include <cstdlib> #include <cctype> #include <cmath> #include <cstring> #include <list> #include <cassert> #include <climits> #inclu...
ALGO
0.999257
3.20505
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:06: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": "09279f058540...