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
9b49893e-a5a4-43cc-91f0-57830f51c498
TrygveUrdahl/TFY4235_Project1
src/percolate.cpp
#include <iostream> #include <utility> #include <vector> #include <string> #include <algorithm> #include <random> #include "latticegenerator.hpp" #include "utils.hpp" // Function to randomly shuffle the list of bonds. // Inputs // latticeList: list of all bonds in the lattice void shuffleLatticeList(std::vector<std::p...
ALGO
0.995518
4.798911
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-02-26T22:47: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": "d3a5032fda...
775ba418-973d-4588-9bb6-bfd72bf43a92
rishisim/Competitive-Programming-Progress
Mad Scientist.cpp
// // Source: https://usaco.guide/general/io // #include <bits/stdc++.h> // using namespace std; // int main() { // int num; // cin >> num; // vector<char> A(num); // vector<char> B(num); // for(int i = 0; i < num; i++) { // cin >> A[i]; // } // for(int i = 0; i < num; i++) { // cin >> B[i]; // } // in...
ALGO
0.999977
4.224575
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-10-28T20:53: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": "458091cac29b...
21db4cb5-a7ad-4f13-9fe9-fe4de424801f
ddnn55/BodyScanner
Libraries/pcl-1.2-bodyscanner/surface/src/simplification_remove_unused_vertices.cpp
/* * Software License Agreement (BSD License) * * Copyright (c) 2011, <NAME>, University of Bonn. * 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...
ALGO
0.905578
6.551569
{ "github_metadata": { "branch": "master", "commit_count": 179, "repo_created_at": "2011-09-19T21:05:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 2, "issues": 8, "pull_requests": 0 }, "file_meta": { "content_id": "d70f6f9...
3bc15cc2-eecd-4ad8-913c-37275cf988c6
huyinhou/leetcode
225.implement-stack-using-queues.cpp
/* * @lc app=leetcode id=225 lang=cpp * * [225] Implement Stack using Queues * * https://leetcode.com/problems/implement-stack-using-queues/description/ * * algorithms * Easy (38.19%) * Total Accepted: 121.4K * Total Submissions: 317.8K * Testcase Example: '["MyStack","push","push","top","pop","empty"]\n...
ALGO
0.989612
6.055161
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2017-12-10T05:21: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": "1d69b354f...
39048ef6-c588-4d19-aac2-0914bfa5e70d
jingminglake/Leetcode
4Sum/4Sum.cpp
#include <iostream> #include <vector> using namespace std; class Solution{ public: vector<vector<int> > fourSum(vector<int>& nums, int target) { vector<vector<int> > ans; if (nums.size() < 4) return ans; sort(nums.begin(), nums.end()); int size = nums.size(); for (int i = 0; i < size - 3; i...
ALGO
0.999869
5.016927
{ "github_metadata": { "branch": "master", "commit_count": 1483, "repo_created_at": "2017-02-24T09:35:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ac0cae...
d1eb6974-9539-47fe-a09c-2b1768f1dd6c
quantumgizmos/ldpc
src_cpp/osd.hpp
#ifndef BPOSD_H #define BPOSD_H #include <vector> #include <memory> #include <iterator> #include <cmath> #include <limits> #include "bp.hpp" #include "sort.hpp" #include "util.hpp" #include "gf2sparse_linalg.hpp" namespace ldpc::osd{ enum OsdMethod{ OSD_OFF, OSD_0, EXHAUSTIVE, COMBINATION_SWEEP };...
ALGO
0.999046
5.170135
{ "github_metadata": { "branch": "main", "commit_count": 871, "repo_created_at": "2021-07-08T08:30:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 133, "forks": 52, "issues": 7, "pull_requests": 7 }, "file_meta": { "content_id": "6eec8ec...
8ac9f87d-757b-42c9-9539-abe94c9384d5
ishandutta2007/codeforces-z
zerokugi/normal/480/C.cpp
#include <cstdio> #include <cmath> #include <cstring> #include <cstdlib> #include <climits> #include <ctime> #include <queue> #include <stack> #include <algorithm> #include <list> #include <vector> #include <set> #include <map> #include <iostream> #include <deque> #include <complex> #include <string> #include <iomanip>...
ALGO
0.999949
3.728296
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:43: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": "40f230341a08...
21ba4ff4-54bb-4b43-9a1d-bf707ce84bd3
coyorkdow/competitive_programming_codes
CF791/C.cpp
#include <bits/stdc++.h> #define all(x) x.begin(), x.end() #define revall(x) x.rbegin(), x.rend() #define mem(a, x) memset(a, x, sizeof a) #define precision(n) std::fixed << std::setprecision(n) #define FASTIO \ do { \ std::ios::sync_with_stdio(false); \ ...
ALGO
0.999892
4.733993
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2020-08-23T16:12:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6de1d1586...
40ecde66-f15d-4b24-8b67-d6fe1a5cca24
raviswan/Elixir
EPI/Chap17_Prob1_FootballScore.cpp
#include <iostream> #include <vector> #include <array> using namespace std; unique_ptr<vector<int>> getMaxCount(const vector<int>& pointsAllowed, int totalPoints ){ unique_ptr<vector<int>> maxValPtr = make_unique<vector<int>>(); for(auto& i: pointsAllowed){ maxValPtr->emplace_back((int)totalPoints/i); } return m...
ALGO
0.99584
4.338058
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2017-10-31T14:50:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "16f405018b...
466b8e42-f1f3-4639-a239-7c1d0aae2212
hs256/NFSE
trace.cpp
#include <iostream> #include <vector> #include <map> #include <z3++.h> //#include "pkt.h" #include "trace.h" #include "instructions.h" using namespace std; using namespace z3; map<string, string> negated_op { {"==", "!="}, {"=", "!=" }, {"<", ">="}, {"<=", ">"}, {">", "<="}, {">=", "<"}, {"!=", "=="} }...
ALGO
0.997602
3.505256
{ "github_metadata": { "branch": "master", "commit_count": 90, "repo_created_at": "2019-05-28T07:41:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a53718a57...
c5e24d03-51a5-4460-a20e-0588b05e57ed
sbaldrich/comprog
codeforces/02256/c.cpp
#include<bits/stdc++.h> using namespace std; typedef pair<int,int> ii; map<ii, int> memo; int f( int m, int n, int k ){ //printf("f( %d, %d, %d )\n", m, n , k); :q :q :q if( k > m + n - 2 ) return -1; if( !k ) return m * n; if( memo.count( ii(m,n) ) ) return memo[ ii(m,n) ]; int best = 1; fo...
ALGO
0.999988
3.408558
{ "github_metadata": { "branch": "main", "commit_count": 176, "repo_created_at": "2012-03-04T23:17:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f702f7903d...
a0de818b-eb31-45fb-ae7f-d39a7fe9d508
amaarquadri/rubiks-cube
src/solvers/HalfTurnReductionSolver.cpp
#include "HalfTurnReductionSolver.h" #include "Algorithm.h" #include "Combination.h" #include "Cube.h" #include "DominoReductionSolver.h" #include "MathUtils.h" #include "Permutation.h" #include "SolverUtils.h" #include "Turn.h" #include "TurnSets.h" #include <algorithm> #include <array> #include <cassert> #include <cs...
ALGO
0.999491
6.781121
{ "github_metadata": { "branch": "master", "commit_count": 570, "repo_created_at": "2021-10-08T21:03: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": "6a85068a...
506d19c8-73ab-4007-b8bc-f5b18c209c95
TaiKonne/Code_Forces
palindromic_numbers.cpp
#include <bits/stdc++.h> using namespace std; #define nl << '\n' #define vti vector<int> #define vtll vector<long long> #define yep cout << "YES" nl #define nope cout << "NO" nl #define ll long long #define lg long #define db double #define pb push_back #define bg begin() #define ed end() #define rbg rbegin() #define ...
ALGO
0.999893
3.521055
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2022-05-01T17:16: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": "c162c3f1b99...
768f8411-b969-4458-9527-17a7b8f2e19c
freecores/reed_solomon_codec_generator
source/RsDecodeChienEmulator.cpp
//=================================================================== // Module Name : RsDecodeChienEmulator // File Name : RsDecodeChienEmulator.cpp // Function : RS decoder chien emulator // // Revision History: // Date By Version Change Description //======================================...
ALGO
0.999305
3.216463
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2014-07-16T21:05:43.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 7, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ba7ca4e0cb...
cbde8ca0-009f-4313-80d4-e055b2d7420a
theQuarky/build-your-own-xyz
ts++/src/core/utils/string_utils.h
#pragma once #include "../common/common_types.h" #include <vector> namespace core::utils { /** * @class StringUtils * @brief Provides static utility functions for string manipulation * * This class offers a collection of methods to perform common string operations * such as splitting, joining, trimming, replaci...
TOOL
0.970977
7.036099
{ "github_metadata": { "branch": "master", "commit_count": 90, "repo_created_at": "2025-01-01T18:25: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": "0c29d60d6...
a12dfd28-222e-4e42-8564-0091a858d6ca
ankit23-exe/CppQUESTIONS
stack/maxAreaHistogram.cpp
#include <iostream> #include <stack> #include <vector> using namespace std; void maxAreaHistogram(vector<int> v){ int n = v.size(); stack<int> s; vector<int> nsl(n); //storing index vector<int> nsr(n); //storing index //next smaller left calculation nsl[0]=-1; s.push(0); for(int i =1;...
ALGO
0.999956
5.538585
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2025-06-27T06:27:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "99932a8d57f...
183a7234-cc3b-420b-a989-d50a4e0083c2
davidseungjin/CPP-DSA
class_Spring_2019/hw3/main_linear.cpp
#include <iostream> #include <string> #include <fstream> #include "Timer.h" using namespace std; class SortedList { public: SortedList() {cout<<"Base class constructor called \n";} virtual void insert(string word){}; virtual bool find(string word){}; virtual void remove(string word){}; virtual bool isEmpty(){}...
TOOL
0.991952
4.258812
{ "github_metadata": { "branch": "master", "commit_count": 190, "repo_created_at": "2019-04-15T08:24: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": "c58cb351...
b46320b7-38ec-4e35-8796-0f9b2642953a
Farhanansari07/SE-DSAL
C13) Graph using DSF BSF.cpp
/* Represent a given graph using adjacency matrix/list to perform DFS and using adjacency list to perform BFS. Use the map of the area around the college as the graph. Identify the prominent land marks as nodes and perform DFS and BFS on that. */ #include <iostream> #include <vector> #include <queue> using namespace...
ALGO
0.999933
5.920463
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2025-05-07T19:32: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": "d03ab55b527...
3c8f1032-5e12-42aa-8a15-1e78ba555a0f
Sidaroth/RayTracer
src/main.cpp
// Author: <NAME> // Last Edit: 04.11.14 // Purpose: A basic raytracer. Aspects of this may be overly commented, but this is done as a learning exercise so the comments are equally for // the authors benefit. Having to put what happens into words furthers our understanding....
ALGO
0.998634
4.697396
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2014-09-10T18:47: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": "aaa0d2406...
2a7b0701-58d0-4ad4-8c7e-b5487252234d
pejtranholmen/NDrip2
src/Model/SOIL_NC/AbioticResponses_Functions.cpp
#include "AbioticResponses_Functions.h" AbioticResponses_Functions::AbioticResponses_Functions(void) { Denit_Temp_Response=0; DenitTempMax=20; DenitTemQ10Bas=20; DenitTemQ10=20; } AbioticResponses_Functions::~AbioticResponses_Functions(void) { } double AbioticResponses_Functions::GetFunctionValue(size_t opt,...
TOOL
0.909483
5.569299
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2023-02-07T10:03: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": "1be8ff3d4...
7706c187-65ba-496e-8df2-77c0916f5202
SudiptoDasSukanto/Code-Bank
pivot.cpp
#include<bits/stdc++.h> using namespace std; int getPivot(vector<int> &v , int n ){ int l = 0 , r = n-1 ; int mid = (l+r)/2 ; while(l<r){ if(v[mid]>v[0]){ l = mid+1 ; } else{ r = mid ; } mid = (l+r)/2 ; } return l ; } int binary...
ALGO
0.999999
4.967178
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-02-01T04:44:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d8361b8ce31c...
767e5a22-95e5-4938-8978-c10d8772a65f
Uuuuuuho/algorithm_study
algorihm/dir_C++/1707_graph_bipartitie.cpp
#include <iostream> #include <vector> #include <string.h> #define MAX 20001 #define RED 1 #define BLUE -1 int color=RED; bool res = true; void dfs(std::vector<int> adj_list[], int visit[], const int v) { visit[v] = color; for(std::vector<int>::iterator e = adj_list[v].begin(); e != adj_list[v].end(); e++){ std...
ALGO
0.999853
4.985955
{ "github_metadata": { "branch": "main", "commit_count": 295, "repo_created_at": "2025-07-15T15:56: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": "d5b17036d2...
a09d3f2a-4cd5-4d4d-acd1-aa27ff74c1db
iamhyc/robo-miscs
auto_car/src/vision_unit/src/rune_detect_node.cpp
#include <caffe/caffe.hpp> #include <rune_detect.h> #include <algorithm> #include <iosfwd> #include <memory> #include <string> #include <utility> #include <vector> #include <chrono> using namespace caffe; // NOLINT(build/namespaces) using std::string; /* Pair (label, confidence) representing a prediction. */ typedef...
DATA
0.988479
6.845411
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2017-07-15T04:41:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2c7acdcec...
4342266b-92fc-448d-b1ab-1bc8074bc9dc
sidgairo18/Programming-Practice
codeforces/501_3/d.cpp
#include <bits/stdc++.h> using namespace std; int main(){ long long int n,k,s; scanf("%lld%lld%lld", &n, &k, &s); long long int check = (n-1)*k; if( check < s || k > s) { printf("NO\n"); return 0; } vector<long long int> ans; ans.push_back(1); while(k>0){ ...
ALGO
0.999876
3.164159
{ "github_metadata": { "branch": "master", "commit_count": 90, "repo_created_at": "2018-06-26T09:32:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dc90a8053...
2cd06ed3-348d-4f29-bffb-e706c7ca5b5f
levongh/sorting_algorithms
merge_sort.hpp
#pragma once /** * @file quick_sort.hpp * @author <NAME> * @date 16 Nov 2015 */ template<typename T, typename Iter> void merge(T *array, Iter first, Iter mid, Iter last) { int * temp = new int[last+1-first]; Iter low_up = first; Iter i=0; Iter mid_up=mid+1; Iter cur; while (low_up <=...
ALGO
0.999676
5.505488
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-12-15T17:46: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": "d1ccd14d63...
5bea0b4b-5e4a-470e-b29d-c3227b23a98f
pipo-chen/play-pat
data-structure/L2-003/main.cpp
// // main.cpp // L2-003 // // Created by zihan on 2021/12/22. // Copyright © 2021 xihe. All rights reserved. // #include <iostream> #include <algorithm> using namespace ::std; struct Cake { float price; float total; float capacity; }cake[1010]; bool cmp(Cake a, Cake b) { return a.price > b.price...
ALGO
0.999918
4.222162
{ "github_metadata": { "branch": "master", "commit_count": 191, "repo_created_at": "2020-08-27T01:29:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "79397548...
d042b10e-cefc-4bf4-aeef-d6480cd9e4ca
Jialin/ICPC
Archive/Codeforces/300/C.cpp
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <cstddef> #include <cstdint> #include <cstdio> #include <cstring> #include <functional> #include <iostream> #include <map> #include <set> #include <string> #include <tuple> #include <unordered_map> #include <unordered_...
ALGO
0.999873
4.243632
{ "github_metadata": { "branch": "master", "commit_count": 886, "repo_created_at": "2019-03-04T23:30:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4c083ca3...
6ccc48aa-1e6c-4141-b613-763da3db7c51
funny-falcon/fast-hash
hashgen/hashgen.cpp
/* The MIT License Copyright (C) 2012 <NAME> (<EMAIL>) 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, ...
ALGO
0.978834
4.793159
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-06-28T20:35:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ba913aad5b...
e815dfc1-48b0-422b-ac5a-ea8382e1e8aa
RhyminGarfunkle/Torpedo1
Torpedo1.ino
/* Torpedo 1 v 0.5 Heavily based off the Helios 1 from <NAME> v 0.5 - Added software exponential filtering of pot values for more stable and reliable readings - This also simplifies construction, since additional resistors aren't required before or after the pots - Improved MIDI note handling. Releasing an old note w...
TOOL
0.917633
4.775624
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2020-12-16T00:28: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": "177eb1a8f436...
f65426d5-2bf5-47e5-91f1-5610a211aa6b
BM1880-BIRD/bm1880-ai-demo-program
fdfr_demo/src/face/bm_face_fdfr.cc
/* ******************************************************************** * Demo program on Bitmain BM1880 * * Copyright © 2018 Bitmain Technologies. All Rights Reserved. * * Author: <EMAIL> * <EMAIL> ******************************************************************** */ #include <iostream> #include <string> ...
TOOL
0.907936
4.411438
{ "github_metadata": { "branch": "master", "commit_count": 122, "repo_created_at": "2018-12-01T08:35:50.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 21, "forks": 15, "issues": 6, "pull_requests": 1 }, "file_meta": { "content_id": "41ba114...
9dad3e3b-1333-4185-88eb-9aa499c1697b
LookParOff/disco-of-cpp
task3/task3/task3Source.cpp
#include <iostream> #include <string> #include <vector> std::string exercise1(int num_input, int n_input) { int num = num_input; int n = n_input; std::string result = ""; do { if (num % n < 10) { result += char('0' + num % n); } else { result += char('A' + num % n - 10); } num /= n; } while...
ALGO
0.998022
4.510853
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-09-30T16:31: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": "db8f1570d...
729bb182-c7d0-4616-8341-0161727be570
HyunsuKim6/Algorithm
Graph/10451.cpp
#include <iostream> #include <vector> using namespace std; int N; int a[1003]; vector<int> v[1003]; bool check[1003]; bool flag = false; int cnt = 0; void dfs(int node) { check[node] = true; for (int i = 0; i < v[node].size(); i++) { int next = v[node][i]; if (check[next] == 1) { flag = true; cnt++; } ...
ALGO
0.999892
4.203531
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2017-06-28T05:10: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": "f2316c89c...
a278f63e-4416-4344-abbe-58b8325d9d73
madangopal16072000/Data-Structure-and-Algorithm
Graph/24_Alien_Dictionary.cpp
#include <bits/stdc++.h> using namespace std; class Solution{ public: void dfs(char src, unordered_map<char, bool> &vis, unordered_map<char, vector<char>> &mp, stack<char> &st) { vis[src] = true; for(char nbr : mp[src]) { if(!vis[nbr]) dfs(nbr, vis, m...
ALGO
0.999995
4.495182
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2022-07-29T05:41:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ae61af45d...
8c3f14f7-7059-4821-932f-81cec08d9a84
subhasish/Algo
05.Array/HC.14.FairBonus2.cpp
/* * HC.14.FairBonus.cpp * * Problem: An array is given with the number of line of codes written by developers sitting side * by side. We are to assign bonus concert tickets to them such that among neighbors * one who wrote more line of code will get more concert ticket than that neighbor. * * Find the ...
ALGO
0.999989
5.405531
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-10-23T17:03: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": "2f38750fee...
438f7aaf-6b26-4f10-822a-99261b9e1a79
svn2github/freearc
Compression/LZMA/7zip/Compress/LZ/BinTree/BinTree.h
// BinTree.h #include "../LZInWindow.h" #include "../IMatchFinder.h" namespace BT_NAMESPACE { typedef UInt32 CIndex; #ifdef HASH_TABLE const UInt32 kMaxValForNormalize = (UInt32(1) << 30) - 1; // Two higher bits are used for tagging #else const UInt32 kMaxValForNormalize = (UInt32(1) << 31) - 1; #endif class CMa...
ALGO
0.995057
4.968971
{ "github_metadata": { "branch": "master", "commit_count": 665, "repo_created_at": "2015-11-01T00:37:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 45, "forks": 18, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "a43143...
3653cc13-1def-46ed-9d7d-8e4d461bc6eb
Sejalkathane/Leetcode_problems
Cpp Challange/Day3/1769_Minimu_Number_of_Operations_to_Move_All_Balls_to_Each_Box.cpp
#include<bits/stdc++.h> using namespace std; //You have n boxes. You are given a binary string boxes of length n, where boxes[i] is '0' if the ith box is empty, and '1' if it contains one ball. // In one operation you can move one ball from a box to an adjacent box. Box i is adjacent to box j if abs(i - j) == 1. Note...
ALGO
0.99999
4.462593
{ "github_metadata": { "branch": "leet", "commit_count": 49, "repo_created_at": "2022-10-15T14:04: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": "347231560fe...
665ac61d-e7a6-4def-bd54-e21674c35d1d
dongjuk157/coding_test
Baekjoon/Others/9465.cpp
#include<iostream> #include<vector> using namespace std; #define max(x, y) ((x > y) ? x : y) int main() { int T, N, tc, i, j, num_tmp; cin >> T; for (tc = 0; tc < T; tc++) { cin >> N; vector<vector<int>> sticker; vector<vector<int>> memo(2, vector<int>(N, 0)); for (j = 0; j < 2; j++) { vector<int> tmp...
ALGO
0.999958
3.572783
{ "github_metadata": { "branch": "master", "commit_count": 222, "repo_created_at": "2021-01-19T04:20: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": "332e4213...
c534eafb-6800-446e-a47d-31cb6cb6d6e3
AhmadHRai/LeetCode
1001→1500/1190. Reverse Substrings Between Each Pair of Parentheses/solution.cpp
class Solution { public: string reverseParentheses(string s) { // Get the length of the string int n = s.length(); // Initialize a vector to keep track of matching parentheses indices vector<int> index_pairs(n, 0); // Use a deque to keep track of the start i...
ALGO
0.99999
6.542985
{ "github_metadata": { "branch": "main", "commit_count": 950, "repo_created_at": "2023-08-24T18:24:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fb4d2dc6a0...
eec1f4de-d0c3-47b0-a3d2-e0ba2c9ab040
khbminus/code2020
contests/vkoshp/src/c.cpp
#include <bits/stdc++.h> #include <ostream> using namespace std; using ll = long long; #define SZ(x) (int)((x).size()) #define ALL(x) (x).begin(), (x).end() #define RALL(x) (x).rbegin(), (x).rend() #define TMAX(type) numeric_limits<type>::max() #define TMIN(type) numeric_limits<type>::min() #ifdef LOCAL #define a...
ALGO
0.999903
3.599542
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2020-10-03T15:22:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c81a33a6a...
534b8d51-f0a3-4d08-af5a-0ad735f01019
akshit-vashishtha/uca-class
riteshSirClass/28aug/maximalRect.cpp
class Solution { private: void charToInt(vector<int>& temp, const vector<char>& matrix) { for(int i = 0; i < matrix.size(); i++) { temp[i] = matrix[i] - '0'; } } vector<int> nextSmallerElement(vector<int> &arr, int n){ stack<int> s; s.push(-1); vector<int> ans(n); for...
ALGO
0.999984
6.268167
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-08-14T14:49: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": "c22f4a30d083...
7f2b7119-e269-4ade-b323-5508bdad1c0f
xyiyy/icpc
src/codeforces/Codeforces Round #301 (Div. 2)/B.cpp
#include <iostream> #include <sstream> #include <ios> #include <iomanip> #include <functional> #include <algorithm> #include <vector> #include <string> #include <list> #include <queue> #include <deque> #include <stack> #include <set> #include <map> #include <cstdio> #include <cstdlib> #include <cmath> #include <cstring...
ALGO
0.99994
3.247181
{ "github_metadata": { "branch": "master", "commit_count": 100, "repo_created_at": "2015-08-04T13:49:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dea1db70...
fde14f1c-4208-4348-be33-ed24d711575b
briancairl/cppcon2023
demo/v1/src/graph.cpp
// C++ Standard Library #include <algorithm> // CppCon #include <cppcon/demo/v1/graph.h> #include <cppcon/demo/json.h> namespace cppcon::demo::v1 { Graph::Graph(const std::filesystem::path& graph_file_name) { const auto v = load_json(graph_file_name); const auto& root = v.get<picojson::object>(); const auto& n...
ALGO
0.911789
6.519968
{ "github_metadata": { "branch": "main", "commit_count": 52, "repo_created_at": "2023-06-21T05:49:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "4988d4ee365...
88dc61a4-1d52-4d49-bd8d-e3f5f3bc47d9
alexandraback/datacollection
solutions_1483485_0/C++/Aumy/A.cpp
# include <iostream> # include <vector> # include <map> # include <deque> # include <set> # include <algorithm> # include <memory> # include <cstring> # include <cstdio> # include <cctype> # include <cstdlib> # include <cmath> # include <utility> # include <string> # include <queue> #include <assert.h> using namespace ...
ALGO
0.999745
3.442155
{ "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": "7bf04cb81...
dee5b61b-8b13-46ec-891b-8ac84a8657a3
GorkemOkur/IUS-CS103
after_tut_2/pop.cpp
/* * ===================================================================================== * * Filename: pop.cpp * * Description: 2D arrays by using old way. Pop(Pointer of pointer) are used to create the structer. * * * Version: 1.0 * Created: 13/10/22 22:52:00 * Revision: n...
TOOL
0.915131
3.988477
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-10-13T20:58:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "917149b99f5...
89b7ba8e-eade-4602-b42d-c883180bc29b
Gabriel-sardine/Codes
Atividade 4/main.cpp
#include <iostream> using namespace std; int main() { int par[10]; int res = 0, maior1 = 0, maior2 =-1 ; for(int i = 0; i < 10; i++) { cout << " Digite o " << i << " valor " ; cin >> par[i]; cout << "\n"; } for(int i = 0; i < 10; i++) { if( par[i] % 2 ==...
ALGO
0.999567
3.720935
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-08-12T19:37: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": "c6908de22ea9...
ee5b02c0-e6a0-41bc-9991-28ac1afe386f
mytnii/Introdaction_to_oop
class_fraction/main.cpp
#pragma warning (disable:4326) #define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<cstdlib> #include<cstring> using namespace std; using std::cin; using std::cout; using std::endl; class Fraction; Fraction operator*(Fraction left, Fraction right); Fraction operator/(Fraction left, Fraction right); Fraction op...
TOOL
0.940813
4.155186
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2021-11-21T17:25: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": "bd34ab5c8...
6d05e341-7f27-4e11-90b9-597d1dc367b0
ardaarslan47/schoolProjects
numberClassification/main.cpp
#include <iostream> #include <cstring> using namespace std; void printNumsBetween(int first, int second, int numbers_total, string type){ type[0] = toupper(type[0]); cout << type << " numbers between:" << endl; type[0] = tolower(type[0]); for (int i = first; i < second; i = i + 2) { cout << i <...
ALGO
0.99289
4.415686
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2024-01-02T18:31:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5395e917e...
27d89367-41d0-4028-a511-e27e82ec7c53
ompl/ompl
src/ompl/geometric/planners/kpiece/LBKPIECE1.h
/********************************************************************* * Software License Agreement (BSD License) * * Copyright (c) 2008, <NAME>, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * ...
ALGO
0.9934
6.120234
{ "github_metadata": { "branch": "main", "commit_count": 4948, "repo_created_at": "2014-05-20T14:22:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1776, "forks": 636, "issues": 80, "pull_requests": 28 }, "file_meta": { "content_id": "40e...
8b03b79b-4ebf-4ab7-a858-14cd94673e2f
FR4NKESTI3N/UVa
10000-99999/10901.cpp
#include <iostream> #include <queue> #include <string> #include <utility> #include <vector> #include <algorithm> using namespace std; int main(){ int T, n, t, m; cin >> T; for(int I = 0; I < T; ++I){ cin >> n >> t >> m; int tt, cur_time = 0; string direction; queue< pair<in...
ALGO
0.999167
3.078716
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2018-01-19T18:05:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7043e0a5c...
cf7e4b09-b1b3-4af2-a061-00985869764e
max-ch9i/dyna-simple
AI_Balloon.cpp
#include <array> #include <random> #include "Utils.hpp" #include "AI_Balloon.hpp" void AI_Balloon::assign(Balloon* _b) { balloon = _b; } void AI_Balloon::move() { XY next_pos = pos_by_dir(balloon->pos, dir, balloon->speed); OBJECT next_tile = tile_at(map, map_width, map_height, next_pos); if (balloon->is_val...
ALGO
0.928542
5.265282
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2019-04-16T17:01: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": "1b96a7d60...
0a0c3583-2ee8-4fe7-9bf0-44128123e9ef
ishandutta2007/codeforces-p
primenumber/normal/1500/B.cpp
#include <bits/stdc++.h> #include <variant> #define rep2(i,k,n) for(i64 i=(i64)(k);i<(i64)(n);i++) #define rep(i,n) rep2(i,0,n) #define all(x) begin(x),end(x) #ifdef ENV_LOCAL #define dump if (1) cerr #else #define dump if (0) cerr #endif using namespace std; using namespace std::string_literals; using i32 = int32_t...
ALGO
0.999995
4.286628
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:49: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": "3c3fe548309e...
31f500cc-9ad7-47c4-85b1-162967d83058
Chocochip101/Algorithm
Solution/9421_소수상근수.cpp
#include <bits/stdc++.h> #define endl "\n" #define ll long long #define MAX 1000002 #define INF 987654321 using namespace std; int N; bool isPrime[MAX]; // 소수 찾기 void Prime(){ isPrime[0] = false; isPrime[1] = false; isPrime[2] = true; for(int i = 2; i <= sqrt(MAX); ++i){ if(isPrime[i]){ ...
ALGO
0.999959
4.956872
{ "github_metadata": { "branch": "main", "commit_count": 492, "repo_created_at": "2021-04-13T13:38:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "52acb77ec3...
8642d588-4c40-46c1-b2cd-324f66584539
Ewenwan/MVision
CNN/Deep_Compression/quantization/Ristretto/src/base_ristretto_layer.cpp
#include <math.h> #include <algorithm> #include <stdlib.h> #include <time.h> #include "ristretto/base_ristretto_layer.hpp" namespace caffe { template <typename Dtype> BaseRistrettoLayer<Dtype>::BaseRistrettoLayer() { // Initialize random number generator srand(time(NULL));// 随机数种子 } //==========================...
DATA
0.931177
5.571019
{ "github_metadata": { "branch": "master", "commit_count": 3396, "repo_created_at": "2017-09-24T06:25:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8384, "forks": 2800, "issues": 17, "pull_requests": 2 }, "file_meta": { "content_id": "...
6847b775-c32a-46c2-9fc3-742209d0438b
kosumosu/yet-another-raytracer
yet-another-raytracer/participating_media/AtmosphericMedium.h
#pragma once #include "ParticipatingMedium.h" #include "PhaseFunction.h" namespace participating_media { template <CPhaseFunction TPhaseFunction> class AtmosphericMedium final : public ParticipatingMedium { const space_real planet_radius_; const space_real inv_scale_height_; const ...
ALGO
0.97054
6.612687
{ "github_metadata": { "branch": "master", "commit_count": 118, "repo_created_at": "2015-12-26T20:19: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": "5ff80e07...
6abcb877-c29f-4922-89db-42f7f12dd9bf
Yanning-Hou/cpppractice
hw3/yh6146_hw3_q1.cpp
#include <iostream> using namespace std; #include <iomanip> int main() { double price1, price2; char clubCard; double taxRate; double basePrice, sumPriceDiscount, sumPrice; cout << "Enter price of first item: "; cin >> price1; cout << "Enter price of second item: "; cin >> price2; c...
TOOL
0.950557
4.608484
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-02-24T02:02: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": "c7d50e077301...
7308a312-fe99-44f9-9e50-081eb68c5080
MasterIceZ/IMSO
18/XD/RoseTransportation.cc
/* * AUTHOR : Hydrolyzed~ * SCHOOL : RYW * TASK : Rose Transportation * ALGO : Miniumum Spanning Tree, Binary Search * DATE : 16 Aug 2022 * */ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <ext/rope> #ifndef _DEBUG // @==== Libary ====@ // //...
ALGO
0.999901
4.471786
{ "github_metadata": { "branch": "main", "commit_count": 127, "repo_created_at": "2022-01-04T04:37:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d01827d570...
45a3fab6-322a-4f15-95d1-4a6eea9f0e58
bor2com/Sumy-Jam
2C/checker/check.cpp
#include "testlib.h" #include <cstdio> #include <vector> using namespace std; #define N 1000 char maj[N][N]; void readCoord(const string& s, int& a, int& b) { if (sscanf(s.data(), "(%d;%d)", &a, &b) != 2) { quitf(_wa, "Wrong output forma in line \"%s\"", __testlib_part(s).data()); } } int main(int argc, cha...
ALGO
0.99998
4.171892
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2012-12-22T09:26: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": "e12ac5c93...
79805471-db76-4728-8cd6-5312efddb92a
devAmulya/Cpp_DSA
V8/search.cpp
#include<iostream> using namespace std; bool linearSearch(int arr[], int n, int key){ for(int i = 0; i < n; i++){ if(key==arr[i]){ cout<<"key found at place : "<<i+1; return true; } } return false; } bool binarySearch(int arr[], int n, int key){ int s = 0; i...
ALGO
0.999938
4.618039
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2024-06-23T09:51:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "056b2ef5d24...
28180df1-a934-48d5-9a16-01959ca0aca6
Li-Shu14/.leetcode
104.maximum-depth-of-binary-tree.cpp
/* * @lc app=leetcode id=104 lang=cpp * * [104] Maximum Depth of Binary Tree */ // @lc code=start /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; 方法一:递归 39/39 cases passe...
ALGO
0.999808
5.805752
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2019-09-22T13:17: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": "9ab71626e...
c92ca9c7-0186-4619-8705-4bdc7cf1c398
JoshuaTPierce/Learning_Repo1
Lafore_OOCPP/Intermediate Examples/arrayOfObjectPointers.CPP
//ArrayOfObjectPointers.CPP #include <iostream> using namespace std; class Person { protected: char name[40]; public: void setName() { cout << "Etner name: "; cin >> name; } void printName(){ cout << "\n Name is: " << name; } }; int main(){ pe...
TOOL
0.946702
4.271382
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-08-02T14:50:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a3d275c6de...
7678eba8-4efc-4633-8c6d-09d3641e4e31
af-orozcog/competitiveProgramming
Competitive/Graphs/657.cpp
/** * I'm an Idiot */ #include<iostream> #include<vector> #include<algorithm> #include<cstring> using namespace std; int diX[] = {0,0,1,-1}; int diY[] = {1,-1,0,0}; int map[50][50]; int X,Y; void DFSW(int x,int y){ if(x < 0 || x >= Y || y < 0 || y >= X) return; if(map[x][y] != 2) return; map[x][y] = 0; for(...
ALGO
0.999594
3.206312
{ "github_metadata": { "branch": "master", "commit_count": 63, "repo_created_at": "2019-08-19T16: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": "c6726ae27...
f26c0e7e-f805-4a1c-aa1f-ed1ff06b6e1b
RobotLocomotion/drake
multibody/test_utilities/spatial_derivative.h
#pragma once #include <memory> #include "drake/common/eigen_types.h" #include "drake/math/rigid_transform.h" #include "drake/multibody/math/spatial_acceleration.h" #include "drake/multibody/math/spatial_velocity.h" namespace drake { namespace multibody { namespace test_utilities { // For a frame Bq that has a fixed...
ALGO
0.985571
7.260855
{ "github_metadata": { "branch": "master", "commit_count": 33726, "repo_created_at": "2014-01-26T16:11:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3630, "forks": 1305, "issues": 690, "pull_requests": 46 }, "file_meta": { "content_id":...
697aa97b-8cfd-4840-9f77-afbf40909fb6
Kartavya-Shrivastav/Gfg_Uploads
Day_154_Insert_in_Sorted_Circular_Linked_List.cpp
#include <bits/stdc++.h> using namespace std; // Function to insert a new node with given data into a sorted circular linked list class Solution { public: Node* sortedInsert(Node* head, int data) { Node* newNode = new Node(data); // Case 1: Empty list if (!head) { newNode->n...
ALGO
0.999942
5.959923
{ "github_metadata": { "branch": "main", "commit_count": 250, "repo_created_at": "2025-04-20T17:53:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0daf7ab073...
47892df1-6779-4159-84ff-a31936189ce4
81-28/AtCoder
archive/24_08_31/t_a34_Nim3_Grundy.cpp
// https://atcoder.jp/contests/tessoku-book/tasks/tessoku_book_ah #include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) template<typename T> istream &operator>>(istream &is, vector<T> &v) { for(T &in : v) is >> in; return is; } void print() { cout << '\n'; } templ...
ALGO
0.999975
4.258731
{ "github_metadata": { "branch": "main", "commit_count": 362, "repo_created_at": "2024-06-29T11:33:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b83319fee7...
7426001e-f157-4a82-a96e-adb6ddc0d0f5
cyqian97/CSCE689-602-HW3
src/main.cpp
#include <iostream> #include <chrono> #include "utils.hpp" #include "algorithms.hpp" using namespace std; int main(int argc, char *argv[]) { string dirname = "../data/"; string dataname = "data"; string resultname = argv[2]; vector<double>results; // Read points data PointSet pset; read_...
ALGO
0.999738
4.884015
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2023-12-09T22:59: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": "c124c7f7d74...
598aa522-d651-4214-ba58-7230fc1a0ed2
devanshnexus/DP-questions
dynamic programming/dp_19.cpp
#include<iostream> #include<vector> using namespace std; // int f(vector<int>& wt, vector<int>& val, int ind, int W, vector<vector<int>>& dp){ // if(ind == 0){ // if(wt[0] <=W) return val[0]; // else return 0; // } // if(dp[ind][W]!=-1) // return dp[ind][W]; // int notTaken = ...
ALGO
0.999999
5.025567
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-06-17T16:41: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": "042a1b252d94...
07306d4d-b146-4956-8fb8-a76be2737d96
resfeber14/Codes
Trie/Minimum XOR Value Pair.cpp
/* Given an array of integers. Find the pair in an array that has a minimum XOR value. Examples : Input : arr[] = {9, 5, 3} Output : 6 All pair with xor value (9 ^ 5) => 12, (5 ^ 3) => 6, (9 ^ 3) => 10. Minimum XOR value is 6 Input : arr[] = {1, 2, 3, 4, 5} Output : 1 */ /* Approach 1...
ALGO
0.999979
5.424209
{ "github_metadata": { "branch": "main", "commit_count": 389, "repo_created_at": "2021-07-19T15:39:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8da0f2bfa5...
0d188a7f-ed0c-41bf-bb2a-dda9013f2888
LTLA/RepertoireUtils
src/RcppExports.cpp
// Generated by using Rcpp::compileAttributes() -> do not edit by hand // Generator token: <PASSWORD> #include <Rcpp.h> using namespace Rcpp; // permute_diversity Rcpp::List permute_diversity(Rcpp::IntegerVector left, Rcpp::IntegerVector right, int iterations, bool use_gini, Rcpp::IntegerVector use_hill, Rcpp::Integ...
ALGO
0.973594
5.880189
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2020-01-19T06:53: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": "b424f9274...
18b32dc4-d147-46db-982a-930f7d9446a5
JakubCzarnik/Machine-Learning-in-Cpp
src/logistic_reggresion/logistic.cpp
#include "logistic.h" #include <iostream> LogisticReggresion::LogisticReggresion(double lr): n_features(), weights(), bias(){ learning_rate = lr; } LogisticReggresion::~LogisticReggresion(){ } void LogisticReggresion::fit(Eigen::MatrixXd X, Eigen::MatrixXd y, int epochs) { double loss = 0; weights = 0.0...
ALGO
0.974121
4.949899
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-11-30T12:59: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": "5f0c260f6c00...
2815b788-bff7-4f8e-9f72-801899a81106
CogRob/distributed-mapper
distributed_mapper_core/cpp/src/MultiRobotUtils.cpp
#include <MultiRobotUtils.h> #include <gtsam/inference/Symbol.h> using namespace std; using namespace gtsam; namespace distributed_mapper{ static const Key keyAnchor = 99999999; //***************************************************************************** Vector multirobot_util::rowMajorVector(Matrix3 R){ ...
ALGO
0.999366
4.796862
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2017-03-22T20:10:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 119, "forks": 34, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "53d3460...
34a60a51-f1a7-4d04-b837-3767d47816c2
TrungVN9/Object-Oriented-Programming
LinkedList/linked_list.cpp
#include <iostream> using namespace std; // Self referential structure struct Node { int data; struct Node *next; } *first = NULL; // Size of this struct is 12 bytes // Display Linked List void display(struct Node *ptr) { int index = 0; while (ptr != NULL) { cout << "Index " << index << "...
ALGO
0.9999
5.126818
{ "github_metadata": { "branch": "main", "commit_count": 85, "repo_created_at": "2022-08-13T21:59:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5be93aa9fe5...
fb2f2336-dd46-465b-aa35-51ca2afd4f2e
omegaup/ofmi-archive
2024/filtro-2-selectivo-dia-2/selectivo-egoi-2025-michititlan/solutions/sub4.cpp
// Sub4: Optimizacion de la subtarea 3, podemos determinar cual es la casa en la // que vamos tomando el mayor entre el par de casas anteriores en O(n^2). #include <iostream> #include <vector> int n; std::vector<std::pair<int, int>> casas; std::vector<std::vector<int>> memo; int Busqueda(int prev_x, int prev_y) { ...
ALGO
0.999978
5.073322
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2022-01-13T20:18:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 2, "issues": 8, "pull_requests": 2 }, "file_meta": { "content_id": "5219901366f2...
7d5cb94d-2cc4-49ca-bae8-0b55c74f23ae
Wilson1996/LeetCode-exercise
daily_problem/hasGroupsSizeX.cpp
/* * @Author: wilson_t(<EMAIL>) * @Date: 2020-03-27 14:00:49 * @Last Modified by: wilson_t * @Last Modified time: 2020-03-27 18:03:08 */ /********************************************************* * 题目[简单]: 给定一副牌,每张牌上都写着一个整数。此时,你需要选定一个数字 X, 使我们可以将整副牌按下述规则分成 1 组或更多组:每组都有 X 张牌。 组内所有的牌上都写着相同的整数。仅当你可选的 X >= 2 时返回 true。 ...
ALGO
0.999507
5.375836
{ "github_metadata": { "branch": "master", "commit_count": 176, "repo_created_at": "2020-03-06T02:51: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": "aaf5da78...
4e1e2d76-d7de-4ed7-913a-76319609cb34
AnakinNN/TrainSimulation2
src/simulation/Track.cpp
#include "Track.h" #include <algorithm> #include <queue> #include <unordered_set> std::shared_ptr<Node> Track::createNodeByTypeAndID(std::string type, int id) { std::cout << "Creating node with id: " << id << std::endl; if (type == "TrackSegment") addTrackSegmentNode(id); else if (type == "Junctio...
ALGO
0.997223
4.40625
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2024-06-10T15:46: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": "c00e2c0ff75...
ec406d83-bf65-48c9-a526-110e09f155e9
KpoxaPy/learning
cpp_belts/4brown/5_week/_singular/5_4_budget_2_3_4.cpp
#include <iomanip> #include <iostream> #include <memory> #include <sstream> #include <tuple> #include <stdexcept> #include <array> #include <map> #include "test_runner.h" using namespace std; template <typename T, typename R1, typename R2 = R1> void CheckInRange(T value, R1 from, R2 to = numeric_limits<R1>::max()) {...
ALGO
0.949779
5.216021
{ "github_metadata": { "branch": "main", "commit_count": 246, "repo_created_at": "2022-01-07T14:13: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": "951d7e41ee...
a312b308-34bc-4331-b408-57e245ecb0cd
blender/blender
intern/cycles/integrator/adaptive_sampling.cpp
/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation * * SPDX-License-Identifier: Apache-2.0 */ #include "integrator/adaptive_sampling.h" #include "util/math.h" CCL_NAMESPACE_BEGIN AdaptiveSampling::AdaptiveSampling() = default; int AdaptiveSampling::align_samples(const int start_sample, const int num_samples...
ALGO
0.963064
7.324312
{ "github_metadata": { "branch": "main", "commit_count": 152123, "repo_created_at": "2019-10-09T12:47:28.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 15670, "forks": 2395, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7...
068b9663-3a25-4181-8bcc-b2efae2e2de2
MaryPinkBorsch/leti_labs
2 KURS /2 SEM/AiSD/lab1/test_entropy.cpp
// #include "test_entropy.h" #include <iostream> #include <stdio.h> #include <cstdlib> #include <filesystem> #include <fstream> #include <vector> #include <string> #include <unordered_map> #include <cmath> using namespace std; // # второй варик // def prob_estimate2(S): // total_symbols = len(S) // symbol_cou...
ALGO
0.916326
3.282872
{ "github_metadata": { "branch": "main", "commit_count": 278, "repo_created_at": "2023-11-16T17:46:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "65177db5bb...
1e7c215b-1317-4678-b50b-a2b648ec0392
mchill/advent-of-code
2015/cpp/day14/part2.cpp
#include <iostream> #include <fstream> #include <sstream> #include <string> #include <vector> #include <stdlib.h> using namespace std; vector<string> getLines() { ifstream file("input.txt"); vector<string> lines; string line; while (getline(file, line)) lines.push_back(line); return line...
ALGO
0.999643
3.807682
{ "github_metadata": { "branch": "main", "commit_count": 230, "repo_created_at": "2015-12-11T21:03:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "eba3e9411f...
ca93fdfe-b342-451a-ba11-ba63efedd7cb
reneejoo22/Algorithm_baekjoon
C++17/백준/Gold/3109. 빵집/빵집.cc
//3109 #include <iostream> using namespace std; int dn[3] = { -1,0,1 }; //아래 가만 위 int du[3] = { 1,1,1 }; // 대각선 옆 대각선 int D, U = 0; long long cnt = 0; int map[10001][501]; void insert() { cin >> D >> U; string in; for (int i = 0;i < D;i++) { cin >> in; for (int p = 0;p < U;p++) { if (in[p] == '.') map[...
ALGO
0.999195
3.893565
{ "github_metadata": { "branch": "main", "commit_count": 297, "repo_created_at": "2024-07-25T08:33: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": "f3650d7123...
da1fad7a-e31e-4d8f-8857-31ae03597920
pasongsj/AlgorithmStudy
ddeoyoung/BaekJoon/BOJ_16234_인구이동.cpp
// 2024.08.26 // BOJ 16234 인구 이동 #include <bits/stdc++.h> using namespace std; typedef pair<int, int> pp; int n, L, R, res, ny, nx, sum, cnt, temp; int a[50][50]; bool visited[50][50]; int dy[4] = { -1, 0, 1, 0 }; int dx[4] = { 0, 1, 0, -1 }; vector<pp> v; void dfs(int y, int x) { visited[y][x] = 1; for (int i = 0; ...
ALGO
0.999834
4.070737
{ "github_metadata": { "branch": "main", "commit_count": 171, "repo_created_at": "2024-08-20T12:54:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "5640f70b2c...
81589ae8-1700-4753-80dd-6951c2d5b96b
InitGo/acwing
ac进阶班/tl2/Splay.cpp
#include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; const int N = 100010; int n, m; struct Node { int s[2], p, v; int size, flag; void init(int _v, int _p) { v = _v, p = _p; size = 1; } }tr[N]; int root, idx; void pushup(int x) { ...
ALGO
0.999996
4.204928
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2022-10-02T02:38:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "39f765fc2...
2dcb0042-0873-4ca8-b612-c8cd3918f07b
preru98/Hashing-Exercise
countSortDuplicates.cpp
/* Problem : Perform countsort Duplicates Allowed 0 allowed Solution : Create hashtable of array. Traverse hashtable and store the index where valid element is found in serial fashion. Constraints : No negative numbers */ #include<iostream> using namespace std; int find_max_element(int[],int...
ALGO
0.999972
5.602197
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2020-04-10T08:08: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": "1a543bebaf...
9e80afeb-fc55-43f8-bb7e-b4200984d4cc
gyank46/placement_practice
graph.cpp
#include <cstdio> #include <vector> #include <list> #include <utility> #include <iostream> #include <stdlib.h> #include <queue> using namespace std; struct node { int v; struct node *next; }; node* add(struct node *x,int y) { struct node *temp; temp=(node*)malloc(sizeof(node)); temp->v=y; tem...
ALGO
0.999993
3.959136
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2020-10-07T21:55: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": "6c94eb5f5658...
5ba4c8dc-0514-43ca-a0d4-87e09d733158
Siddeshwar002/DSA-again
Dynamin Programming/Unbounded Knapsack/CoinChange_II.cpp
#include <bits/stdc++.h> using namespace std; // ! DP : Memoization // * This get accepted too int coinChange(int amt, int idx, vector<int> &coins, vector<vector<int>> &dp) { if (amt == 0) return 1; if (idx < 0) return 0; if (dp[idx][amt] != -1) return dp[idx][amt]; int consi...
ALGO
0.999973
5.589567
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-01-25T14:42: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": "9456c13cf58...
ae2c9a4f-b8f0-4dfc-9928-1747771c4693
abhishek18124/LVCPPMay2021
August/9thAugustLecture 31/002DP_MinStepsToOne.cpp
/* Given a number n, count the minimum steps to reduce n to 1 such that at each step you may reduce n to n/2 if n is divisible by 2 or reduce n to n/3 if n is divisible by 3 or reduce n to n-1 by decrementing n by 1 Example : Input : n = 10 Output : 3 Input : 6 Output : 2 */ #include<iostream> #include<cli...
ALGO
0.999982
5.454608
{ "github_metadata": { "branch": "main", "commit_count": 65, "repo_created_at": "2021-06-14T12:27:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fe50dc7140d...
c2cf0300-c970-4183-90eb-2e24080d6d39
utmishr/codeforces
A_Number_Replacement.cpp
#include <iostream> using namespace std; int main() { int t; cin >> t; while (t--) { int n; cin >> n; int a[n]; for (int i = 0; i < n; i++) { cin >> a[i]; } int flag = 0; string s; cin >> s; for (int i = 0; i < n; i++) { for (int j = i; j < n; j++) {...
ALGO
0.999957
3.619212
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2023-01-13T16:05:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "88b4cb80d...
d2dd9aa4-5415-4a45-b7f5-35d0bb049647
kamyu104/LeetCode-Solutions
C++/serialize-and-deserialize-n-ary-tree.cpp
// Time: O(n) // Space: O(h) /* // Definition for a Node. class Node { public: int val = NULL; vector<Node*> children; Node() {} Node(int _val, vector<Node*> _children) { val = _val; children = _children; } }; */ class Codec { public: // Encodes a tree to a single string. ...
ALGO
0.999473
5.92932
{ "github_metadata": { "branch": "master", "commit_count": 19395, "repo_created_at": "2018-10-11T17:38:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4939, "forks": 1616, "issues": 1, "pull_requests": 55 }, "file_meta": { "content_id": ...
c74e2c57-a050-452a-9a8f-82099d7b1bd6
EdgarGc026/EstructuraDeDatos
EstructuraDatosFEI/Clase 1 Estrcutura.cpp
#include <iostream> using namespace std; //realizar una funcion en c++ que regrese un 1 si un dato x esta en el arrglo o un 0 si no //Escribir una funcion en c++ que invierta los datos de un arreglo //funcion en c++ que regrese el valor mayor de un arrglo //funcion que elimine un dato de la siguiente manera: [ 2,...
ALGO
0.99958
3.623092
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-04-29T19:33: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": "6803cbaf7f...
e00ae544-a4cb-4a23-a505-8fb800e3aab6
MarinVLT/Sistemas_Operacionais_Trabalho_Unidade1
processos.cpp
#include <chrono> #include <fstream> #include <iostream> #include <sstream> #include <string> #include <sys/types.h> #include <sys/wait.h> #include <sys/shm.h> #include <unistd.h> #include <vector> #include <iomanip> using namespace std; chrono::steady_clock::time_point inicio; chrono::steady_clock::time_point fim; i...
ALGO
0.992981
4.299211
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-09-18T21:24: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": "e9e4220686ef...
13954805-2937-4b31-b1e5-d8c288f4e27c
CJSBinder-User/CJSBinder
experiment/correctness_efficiency/groundtruth/cpp/CHECK_LARGE_NUMBER_DIVISIBLE_6_NOT.cpp
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // #include <iostream> #include <cstdlib> #include <string> #include <vector> #include <fstream> #include <iomanip> #include...
ALGO
0.985305
4.799411
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2023-04-15T02:32: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": "f6a62eb2a44...
0ef1ca09-57ef-4355-b03c-71d51b35c9ea
DiegoNGonzalez/laboratorio1
guia3/guia3ej7.cpp
//Nombre: <NAME> //TP N°:3 //EJ N°:7 /* Comentarios Hacer un programa que permita ingresar el sueldo de 10 empleados y determine: El sueldo máximo. El sueldo mínimo. El sueldo promedio. Cantidad de sueldos mayores a $50000. */ #include <iostream> using namespace std; int main(void) { const int MAS_CINCUENTA = 50...
TOOL
0.980248
3.713385
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-05-31T00:04:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "644d6de87598...
7855f9a2-a946-4b13-a8c9-aa310b40e06d
Nadrixa/EDA
EDA-56/56.cpp
/*<NAME> & <NAME> - A22*/ #include <iostream> #include "Arbin.h" using namespace std; typedef struct{ bool ok; int sumaNodos; int numNodos; }tSolucion; template <class T> Arbin<T> leerArbol(T const& vacio); tSolucion arbolesValiosos(Arbin <int> arbol); int main() { int numCasos; cin >> numCasos; tSolucion ...
ALGO
0.999625
4.568739
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2017-04-24T17:38: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": "7665030db...
515aa809-0334-4f5d-a282-ab55c88fc37a
J-1ac/Algorithm
.vscode/codetree/samsung/test.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; int arr[10][10]; int myarr[4]={1,2,3,4}; bool visited[4]; void print_arr(int (&myarr)[10][10]){ for(int i=0; i<10; i++){ for(int j=0; j<10; j++){ cout << myarr[i][j] << "\t"; } cout << endl; } cout << "----...
ALGO
0.997401
4.616603
{ "github_metadata": { "branch": "main", "commit_count": 113, "repo_created_at": "2023-02-18T06:47: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": "ad8ee565dd...
a641fbce-57b7-4454-9869-58ab0a997b49
huynhat98/C-HowKteam
026 - Câu điều kiện Switch trong C++ (Switch statements)/project/CauLenhSwitch/CauLenhSwitch/main.cpp
#include <iostream> using namespace std; const int SUNDAY = 1; const int MONDAY = 2; const int TUESDAY = 3; const int WEDNESDAY = 4; const int THURSDAY = 5; const int FRIDAY = 6; const int SATURDAY = 7; int main() { int dayOfWeek(TUESDAY); switch (dayOfWeek) { case SUNDAY: cout << "Sunday" << endl; break; c...
ALGO
0.983738
3.261452
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2020-08-30T14:48: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": "9838086f1...
facbd394-a910-48b8-bddd-b65dcd326cb5
sureshyhap/Miscellaneous
Algorithms/MSSP/Linear/MSSP.cpp
#include <iostream> int MSSP(int a[], int n, int& start_max, int& end_max); int main(int argc, char* argv[]) { int a[] = {-10, 15, -10, 20, -50, 25, 10, -30, 15, -10, 40, -30, 20, -10, 5, -35, 20, -10, 15}; int s = 0, e = 0; std::cout << MSSP(a, sizeof(a) / sizeof(int), s, e) << std::endl; std::cout <...
ALGO
0.999984
4.94593
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2019-01-10T01:22:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "03af38eb2...
25d7d90e-9b94-414f-8af4-a0300debcf5b
shubhramani21/DataStructure
7. Array/Medium/setMaxZero.cpp
#include<bits/stdc++.h> using namespace std; void setZeros(vector<vector<int>> &matrix) { int rows = matrix.size(); int cols = matrix[0].size(); vector<int> marker_rows(rows, 1); vector<int> marker_cols(cols, 1); for(int i = 0; i < rows; i++){ for(int j = 0; j < cols; j++){ ...
ALGO
0.999334
6.016286
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2024-02-13T15:59: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": "b99f3d851d1...
46ce91e8-3d41-47f7-b052-30c7b78eb18e
ismail-ru-cse-39/Programming_Samsung_internship
Advance_Minimum_Invreament_to_make_Array_unique.cpp
#include <stdio.h> #define SZ 100000 int Arr[SZ]; int Count[SZ]; int Ans = 0; int Test_cases,Case; int N; void init() { for(int i = 0 ; i < SZ ; i++){ Count[i] = 0; } } void take_input() { scanf("%d", &N); for(int i = 0 ; i < N ; i++){ scanf("%d",&Arr[i]); } } void count_arr() ...
ALGO
0.999639
3.727506
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2019-04-08T18:24: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": "e2da2ff28...
600eca34-cf7c-4be7-aa50-48589122d72e
adobe/webkit
Source/JavaScriptCore/dfg/DFGCFAPhase.cpp
/* * Copyright (C) 2011 Apple Inc. 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 code must retain the above copyright * notice, this list of conditions a...
ALGO
0.901532
7.389583
{ "github_metadata": { "branch": "master", "commit_count": 121572, "repo_created_at": "2012-05-02T01:08:25.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 216, "forks": 107, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6d...
57ccf385-fed5-409a-a53f-5719c7aa90d5
ishandutta2007/codeforces-l
lzr_010506/normal/1761/E.cpp
#include <bits/stdc++.h> using namespace std; #define WA printf("line = %d\n" , __LINE__); const int Max_n = 4005; int read() { int x; scanf("%d" , &x); return x; } int n , fa[Max_n]; int find(int x) { return fa[x] == x ? x : fa[x] = find(fa[x]); } void merge(int x , int y) { if(find(x) == find(y)) return; ...
ALGO
0.999883
3.635355
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:17: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": "3f0bbd829927...
10244d5e-ed51-42f5-82b0-26cf67075a51
galloska/ManiAC
East-Central NA 2015/E.cpp
#include <bits/stdc++.h> #define endl '\n' #define forn(i, n) for(int i=0;i<n;i++) #define lli long long int #define pii pair<int,int> #define pb push_back #define fi first #define se second using namespace std; const int MAXN = 101; vector< vector<lli> > A, B; void add(int a,int b) { A[a][b]++; A[b][a]++; ...
ALGO
0.999887
4.433586
{ "github_metadata": { "branch": "master", "commit_count": 123, "repo_created_at": "2017-04-14T18:52: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": "47a2f06b...