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
192b3512-f3ec-44de-b785-d0993b1a2110
unitedoperations/code-challenges
1/Sacher/Challenge1.cpp
struct Version { int majorV = 0; int minorV = -1; int revisionV = -1; std::string attachedString = ""; bool operator<(const Version& other) { if(other.majorV == majorV && other.minorV == minorV && other.revisionV == revisionV) return true; if(majorV < other.majorV...
ALGO
0.998409
5.283942
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2018-08-25T01:07:58.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db6be21401...
637481cb-17d2-4fb5-aabb-7c2ec95e67bd
MilkaValkanova/Project---Data-structures-course-FMI
Pack.cpp
/** * * Solution to homework task * Data Structures Course * Faculty of Mathematics and Informatics of Sofia University * Winter semester 2016/2017 * * @author <NAME> * @idnumber 45155 * @task 2 * @compiler VCC * */ #include "Pack.h" #include <bitset> uint64_t compressText( HuffmanTree& T,std::vector<uint32_t>& comp...
ALGO
0.999707
3.867533
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2017-06-07T19:19: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": "b695e0983...
8be80297-04b4-41ed-81c6-ddaf07d14255
junbread/algorithm-study
practice/baekjoon/12100.cpp
#include <iostream> #include <queue> using namespace std; int n, N; char dir[4] = {'u', 'd', 'l', 'r'}; int solution(int *state, int level) { if (level > 5) return -1; int max_block = 0; for (int i = 0; i < 4; i++) { int *new_state = new int[N](); for (int j = 0; j < n; j++...
ALGO
0.99992
4.395524
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2019-08-10T05:00: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": "d26227535...
e8d5c43e-440d-49cd-b24e-0baa336991b6
Birmjune/Problem-Solving
solutions/현대모비스_트럭_군집주행.cpp
// unsolved #include <bits/stdc++.h> using namespace std; typedef long long ll; #define INF 1000000001 vector<pair<int, int>> graph[200001]; // 다익스트라 (https://velog.io/@717lumos 참고) vector<pair<int, int>> dijkstra(int start, int N) //graph[i]에 저장된 값은 {다음노드, 비용} { vector<pair<int, int>> dist(N + 1); // 거리를 저장할 리...
ALGO
0.999892
3.755276
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2025-05-12T03:11: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": "eeb3c38be6e0...
70e4303b-0d32-457f-ad6c-a6eb3ea8ff79
KamranMoazim/Cpp-Object-Oriented-Programming
LABS/Lab 3/Task 3/Any Practice Empty Project.cpp
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include "Job.cpp" using namespace std; int main() { int deadline = 0; Job jobs[10]; jobs[0].setJobId(1); jobs[0].setDeadline(12); jobs[1].setJobId(2); jobs[1].setDeadline(1); jobs[2].setJobId(3); jobs[2].setDeadline(11); ...
ALGO
0.999888
5.10374
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2021-10-08T11:54: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": "49b3520cab3...
01cd8108-1c7d-4931-9ca9-b3fd6c9d04a1
akozyreva/cpp-tutorial
07_app/guess_game_with_vector.cpp
#include <string> #include <iostream> #include <cstdlib> #include <ctime> #include <vector> void print_guesses(std::vector<int> &guesses) { std::cout << "Possible guesses:\n"; for (int i = 0; i < guesses.size(); i++) { std::cout << guesses[i] << "\t"; } std::cout << "\n"; } void print_coun...
TOOL
0.958404
3.80488
{ "github_metadata": { "branch": "master", "commit_count": 75, "repo_created_at": "2020-09-23T15:11: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": "22dfc10e6...
ff01a9b1-61a0-4723-905b-36f589dc5448
upsidedownio/coding-club-hr
season001/20181016-week7/MonkeyThunder/Contacts.cpp
#include <iostream> #include <string.h> using namespace std; int main() { int INT_NumberOfName = 0; int INT_Return = 0; int INT_NumberOfCommand; cin >> INT_NumberOfCommand; string *CHR_Command = new string[2 * INT_NumberOfCommand]; string *CHR_Name = new string[INT_NumberOfCommand]; fo...
ALGO
0.996591
4.127944
{ "github_metadata": { "branch": "master", "commit_count": 151, "repo_created_at": "2018-08-22T14:07:57.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5060a453f...
591a0a99-0d3e-4593-a6ef-f0fead474696
HRF05/DMOJSolutions
nccc1j4s2.cpp
#pragma GCC optimize("Ofast,unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma") #include <iostream> #include <queue> #include <cmath> #include <vector> #include <set> #include <unordered_set> #include <list> #include <string> #include <stack> #include <iomanip> #include <fstream> #...
ALGO
0.999986
5.059837
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2022-08-10T03:36: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": "11c4e573f89...
a62fa108-2029-4d3e-9baa-0807fc101969
heyuhhh/ACM
oj/codeforces/problems/cf1286B.cpp
/* * Author: heyuhhh * Created Time: 2020/1/28 10:59:22 */ #include <iostream> #include <algorithm> #include <cstring> #include <vector> #include <cmath> #include <set> #include <map> #include <queue> #include <iomanip> #define MP make_pair #define fi first #define se second #define sz(x) (int)(x).size() #define a...
ALGO
0.99998
3.815344
{ "github_metadata": { "branch": "master", "commit_count": 693, "repo_created_at": "2019-11-25T06:31:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fb22288d...
2ed4a133-41f8-4fb7-9e5b-e48561c78087
MrLumps/Series
Engine/Modulation.h
#pragma once #include <array> #include <cmath> #include <memory> #include <math.h> #include "Common.h" //#include "BaseObjects.h" using namespace std; //template <typename float, int 8> struct Lfo { private: float dt; public: float freqMin = static_cast<float>(0.001f); float freqMax = static_cast<float>(72....
TOOL
0.921918
4.091159
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-10-09T19:02: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": "b86156f1bf...
b6b0c05d-222d-4dd8-b63a-d4c23fed6d1c
sakky016/Game_TicTacToe
functions.cpp
#include "header.h" /******************************************************************************************** * @name : initMatrix * @Description : ********************************************************************************************/ int initMatrix() { int i = 0; int j = 0; char tmp...
ALGO
0.991542
4.40865
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-01-28T15:21:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e87138d457...
1fe77b6a-ec81-496e-a5b2-ed080a1642a9
usc-csci104-fall2024/resources
lab8/hashtable.cpp
#include "hashtable.h" #include <iostream> using namespace std; #define A 54059 #define B 76963 #define C 86969 /** Hash function for the CS104 hash table. */ unsigned hash_str(const char* s) { unsigned h = 31; while (*s) { h = (h * A) ^ (s[0] * B); s++; } return h % C; } /** Creates a has...
ALGO
0.956589
4.643932
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2024-06-14T02:14:32.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 14, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c4c9e323a1c...
d328d7dd-89c7-48e0-8d24-75c5e7bbae3f
matt-42/cuimg
cuimg/tracking2/tracker.h
#ifndef CUIMG_TRACKER2_H_ # define CUIMG_TRACKER2_H_ # include <cuimg/improved_builtin.h> # include <cuimg/obox2d.h> namespace cuimg { template <typename F> class tracker { public: typedef typename F::input I; typedef typename F::particles_type particles_type; typedef typename F::particle_type pa...
TOOL
0.986717
6.052547
{ "github_metadata": { "branch": "master", "commit_count": 247, "repo_created_at": "2013-06-07T17:30:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 66, "forks": 67, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "51ae65...
1d9c4c2f-b8bc-4168-8d52-c1e93e068c7e
audreyemu/Cache-Replacement
ChampSim_CRC2/example/lru.cc
#include "../inc/champsim_crc2.h" #define NUM_CORE 1 #define LLC_SETS NUM_CORE*2048 #define LLC_WAYS 16 uint32_t lru[LLC_SETS][LLC_WAYS]; uint32_t bip[LLC_SETS][LLC_WAYS]; bool use_LRU= false; // I just have this set to false and only use BIP, but I'll keep the LRU implementation here since it's interesting // init...
ALGO
0.99551
4.304554
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-05-06T21:25:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5fb02a5d2a35...
8a0dd390-c33f-4e03-b602-741989f9d7d0
ganyuo/algorithm_learn
exercise/nowcoder/HJ89.cpp
/* AC */ #include <stdio.h> #include <string.h> #include <string> #include <iostream> struct card_t { int num; std::string str; }; int get_num(std::string str) { if ('2' <= str[0] && str[0] <= '9') { return str[0] - '0'; } else if (str == "10") { return 10; } else ...
ALGO
0.996274
4.530246
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2022-06-28T08:42:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5172ded09...
011c8d2a-5893-49dc-8f2f-5dfc7feaf9c2
strange-suraj/LeetCode-Susbmission
Remove the balls - GFG/remove-the-balls.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution { public: int finLength(int n, vector<int> color, vector<int> radius) { stack<pair<int, int>> s1; for(int i=0;i<n;i++){ ...
ALGO
0.99969
5.333283
{ "github_metadata": { "branch": "main", "commit_count": 3434, "repo_created_at": "2022-01-13T06:50:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c7ef7cb76...
038ed4dc-7132-44aa-a862-27bb6d3b6f3a
algostudy0720/Problem_Solving_Jail
Programmers/lev3/입국심사/입국심사_PHJ.cpp
#include <string> #include <vector> using namespace std; long long solution(int n, vector<int> times) { long long answer = 0; long long min = 1; long long max = (long long)times.back() * n; //마지막*n명 long long mid = (min + max)/2; long long sum = 0; answer = max; while(min<=max) { ...
ALGO
0.999996
4.603676
{ "github_metadata": { "branch": "main", "commit_count": 206, "repo_created_at": "2022-01-13T12:18:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "738b8b9c7ad...
94f6ba86-4624-4d3e-b801-565351bc791b
hugoMiCode/2048
main.cpp
#include <SFML/Graphics.hpp> #include <string> #include <iostream> enum class Arrow{ Left = sf::Keyboard::Left, Right = sf::Keyboard::Right, Up = sf::Keyboard::Up, Down = sf::Keyboard::Down }; class Grid { public: Grid(sf::RenderWindow* window) { font.loadFromFile("OpenSans-Bold.ttf"); val.setFont(font);...
ALGO
0.995288
3.71057
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2022-11-22T11:28: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": "de3878efd9...
4e29d208-3503-4565-8f57-f868698d5a4e
timi-liuliang/echo
thirdparty/mlpack/core/optimizers/cmaes/random_selection.hpp
/** * @file random_selection.hpp * @author <NAME> * * Randomly select dataset points for use in the Evaluation step. * * mlpack is free software; you may redistribute it and/or modify it under the * terms of the 3-clause BSD license. You should have received a copy of the * 3-clause BSD license along with mlpa...
ALGO
0.976983
7.100672
{ "github_metadata": { "branch": "master", "commit_count": 3016, "repo_created_at": "2018-03-10T04:07:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 971, "forks": 116, "issues": 254, "pull_requests": 0 }, "file_meta": { "content_id": "9...
bfec8450-75e2-4b0a-87a3-a341801e938e
nicholas-fwang/algorithms
study/graph/trunk.cpp
// 그래프의 인접 리스트 표현 vector<vector<int> > adj; // discovered[i] = i번 정점의 발견 순서 // finished[i]=dfs(i)가 종료했으면 1, 아니면 0 vector<int> discovered, finished; // 지금까지 발견한 정점의 수 int counter; void dfs2(int here) { discovered[here] = couter++; // 모든 인접 리스트를 순회한다. for(int i=0; i<adj[here].size(); i++) { int the...
ALGO
0.99954
4.379044
{ "github_metadata": { "branch": "master", "commit_count": 328, "repo_created_at": "2016-05-24T11:38:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1c98e298...
777b3ca7-2880-4279-bd34-ce86f591625f
jeremykvlim/kattis
open/raudtifastuttkefli.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n, k; cin >> n >> k; vector<int> l(n + 1), D(n + 1); for (int i = 1; i <= n; i++) cin >> l[i] >> D[i]; int t; cin >> t; vector<int> diff, indices; vector<long long> ...
ALGO
0.999977
3.918482
{ "github_metadata": { "branch": "main", "commit_count": 4387, "repo_created_at": "2023-11-17T12:14:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "618820754...
d916bdd4-4f4a-405a-83c5-f009d2f162c9
sultan101004/OOP-Problems
Source.cpp
#include<iostream> #include<string> #include<cstring> using namespace std; //int main() { // // string word = "hello"; // string word2 = " World"; // // for(int i = 0; i < word.length(); i++) { // cout << word[i] << endl; // } // // cout << "Length : " << word.length() << endl; // // bool status = true; // for (int ...
TOOL
0.988697
3.009731
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-05-24T19:49: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": "29f19b5da094...
34b01b26-7a6f-4c01-8ac9-b8c965de0687
iliaatmazhitov/LAB-2SEM
lab3/LinkedList.h
#pragma once #include <stdexcept> template <class T> class LinkedList { private: struct Node { T value; Node* next; Node* prev; Node(const T& new_value, Node* new_prev = nullptr, Node* new_next = nullptr) : value(new_value), next(new_next), prev(new_prev) {} }; ...
TOOL
0.981362
6.175828
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2024-05-17T12:15: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": "dc64516a5aa...
dde369b9-82c4-44d9-9984-221fa214dd46
mrGupta04/DAA-Algorithms
equalsumpartioning.cpp
#include <iostream> #include <vector> using namespace std; int equalsumpartioning(int target, vector<int> a) { int n = a.size(); vector<vector<bool>> k(n + 1, vector<bool>(target + 1, false)); for (int i = 0; i <= n; i++) { k[i][0] = true; } for (int i = 1; i <= n; i++) { ...
ALGO
0.999903
4.719114
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-03-11T19:41: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": "4db548c9148e...
20280496-8e80-4128-9b6c-bdbbeefd27eb
apartisan/Clasa-XI
05 Structuri de date/03 operatii.cpp
/* */ #include <iostream> using namespace std; struct Nod{ int info; Nod *urm; }*prim=NULL; void Creaza(int a[],int n){ Nod *ultim, *q; prim = new Nod; prim->info = a[0]; prim->urm=NULL; ultim = prim; for (int i=1;i<n;i++){ q = new Nod; q->info = a[i]; q->urm =...
ALGO
0.999649
4.317083
{ "github_metadata": { "branch": "main", "commit_count": 39, "repo_created_at": "2022-10-07T09:56:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cef94131ab7...
7828357c-0202-434f-b513-72c83b8dd747
ssginc-be/coding-test-study
week7/1520/dckat.cpp
#include <iostream> #include <cmath> using namespace std; int dx[] = {-1, 1, 0, 0}; int dy[] = {0, 0, -1, 1}; int v[501][501]; // 입력 배열 int d[501][501]; // 경로 저장 배열 (dp) int m, n; // 가로. 세로 크기 // 범위 확인 bool canMove(int& x, int& y) { if (1 <= x && x <= m && 1 <= y && y <= n) { r...
ALGO
0.999985
4.734866
{ "github_metadata": { "branch": "main", "commit_count": 318, "repo_created_at": "2024-10-16T08:42:32.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5e208a5c4d3...
37758d96-c367-4fc5-85a5-cfd61bdea478
ETHZ-TEC/exot_app_lib
src/utilities/filesystem.cpp
// Copyright (c) 2015-2020, Swiss Federal Institute of Technology (ETH Zurich) // 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 co...
TOOL
0.952624
7.242928
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-06-13T15:31:01.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "56f96425105...
7fe8289f-c2ae-4e73-8eb9-9f43d55eb921
luisenriquelarrea/Algorithms-C-CPP
Batcode.cpp
/* * <NAME> is known as BATMAN and a nocturnal peculiar mammal represents him; the word of that * animal in Spanish consists of 5 consonants and the 5 vowels, from which none of them is repeated. This * word must create an encryption code to transfer text files. These are the following rules: * * 0...
TOOL
0.988498
3.824369
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2016-02-05T00:53: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": "d365a26c7...
b2e9ddbe-b42a-4919-99ab-cc9e61c9e55e
yujning/edacode
vscodecpp/text171.cpp
#include <iostream> using namespace std; #include <Set> class person { public: person(string name, int age) { this->name = name; this->age = age; } bool operator<(const person &p) const { return age < p.age; } string name; int age; }; class mycompare { public: ...
ALGO
0.982406
4.372417
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-11-14T08:58: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": "3f94f6491f5b...
e4d32ad3-3894-49b0-a8d0-701af7179194
AcademySoftwareFoundation/openvdb
openvdb/openvdb/tools/LevelSetFilter.h
// Copyright Contributors to the OpenVDB Project // SPDX-License-Identifier: Apache-2.0 // /// @author <NAME> /// /// @file tools/LevelSetFilter.h /// /// @brief Performs various types of level set deformations with /// interface tracking. These unrestricted deformations include /// surface smoothing (e.g., Laplacian f...
ALGO
0.989145
7.358212
{ "github_metadata": { "branch": "master", "commit_count": 4561, "repo_created_at": "2013-04-12T18:39:57.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2970, "forks": 704, "issues": 169, "pull_requests": 52 }, "file_meta": { "content_id": "...
f96ef708-2d7d-4025-bfc2-95a92df22401
ishandutta2007/codeforces-o
okrut/normal/875/E.cpp
#include <bits/stdc++.h> #define rep(i,a,b) for (int i=a; i<b; i++) #define pb push_back #define mp make_pair #define fi first #define se second #define debug // using namespace std; typedef long long ll; typedef long double ld; const int N = 1e5+10; const int T = 1<<17; int val[N], tree[T+T]; //to zwraca maksimum b...
ALGO
0.999941
4.016943
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:45:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a5dde4830581...
37acd8ca-f8c8-4bb6-954f-f18a4f38786f
devangi2000/Data-Structures-Algorithms-Handbook
Arrays/MaximumProductOfTwoElementsInAnArray1464.cpp
// Given the array of integers nums, you will choose two different indices i and j of that array. // Return the maximum value of (nums[i]-1)*(nums[j]-1). // Example 1: // Input: nums = [3,4,5,2] // Output: 12 // Explanation: If you choose the indices i=1 and j=2 (indexed from 0), you will get the maximum value, that...
ALGO
0.999941
6.017108
{ "github_metadata": { "branch": "master", "commit_count": 77, "repo_created_at": "2021-10-14T09:04:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 51, "forks": 11, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a40c266...
6bd20453-68a8-4b93-a405-270e76057508
hmazhar/physbam_public
PhysBAM_Geometry/Basic_Geometry_Intersections/BOX_PLANE_INTERSECTION.cpp
//##################################################################### // Copyright 2009, <NAME>. // This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt. //##################################################################### // Namespace ...
ALGO
0.99776
6.041754
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2014-04-02T21:48:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 30, "forks": 13, "issues": 2, "pull_requests": 1 }, "file_meta": { "content_id": "8387ac6...
187fa597-2749-49f8-a229-e3f535c8ec2c
anukulSingh/DS-algorithms
greedy/huffman.cpp
// a huffman tree struct Node { // input charcters char data; unsigned freq; // freq of character Node *left, *right; Node(char data, unsigned freq, Node* l = NULL, Node* r = NULL) { this->left = l; this->right = r; this->data = data; this->freq = freq; } } struct compare() { bool operator()(Node* ...
ALGO
0.999957
3.844657
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-06-13T15:23: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": "4e5eee94a81...
5a843835-155d-477c-804e-231e50f847a6
g04157017/ads8867
soft_arm_ads8867/sm2/sm2_imp/src/sm2_cpu.cpp
#include "lkt.h" #include "sm2.h" /******************************************* * 用来做SM2国密算法的应用开发 *时间:2020.08.17 *作者:刘鹏 ********************************************/ /* *说明:打印调式 */ void sm2_cpu_dbg(const char* strlog, ...) { printf ("[sm2_cpu dbg]: "); va_list vp; va_start(vp, strlog); vprintf (strlog, vp); ...
TOOL
0.976211
3.662328
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2023-12-15T05:40: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": "8dcdb631a31...
46c6b627-af4e-41d8-982e-3f2a3cc1f1bc
huanyizhiyuan/ICPC-workspace
2023ICPC网络赛II/L.cpp
#include<bits/stdc++.h> #define i64 long long #define int i64 using PII = std::pair<int,int>; using TIII = std::tuple<int,int,int>; constexpr int mod = 1e9+7; constexpr int inf = 1e9+5; int n,m,k; struct DoubleStringHash { std::vector<int>h1, h2, p1, p2; int base1 = 131, base2 = 13331; int mod1 = 1e9 + 7,...
ALGO
0.999758
4.559552
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-01-20T12:09:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "02c345c9d1f4...
ad5e1085-3400-4b4e-be51-e1350d7a9bc5
aditya-agr/GeeksForGeeks-POTD
Get Min from Stack.cpp
class Solution { public: stack<int> st; int mini; Solution() { // code here mini = INT_MAX; } // Add an element to the top of Stack void push(int x) { // code here if(st.empty()) mini = x; else{ if(x...
ALGO
0.999969
5.492701
{ "github_metadata": { "branch": "main", "commit_count": 503, "repo_created_at": "2024-03-14T15:57: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": "fb11465d51...
2a3884b3-f245-4e33-b14c-f2ef6db359c1
cocomodo/my_beakjoon_repo
백준/Gold/16120. PPAP/PPAP.cc
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); string s; cin >> s; int cnt = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == 'P') { //p라면 개수 증가 cnt++; continue; } //'P'일때 continue;로 나머지 부분 넘겨버리기 때문에, //여기에 도달했다는건 P가 아니라는 얘기이고, 그런 경우 무조건 A라는 얘기 ...
ALGO
0.999961
3.964534
{ "github_metadata": { "branch": "main", "commit_count": 552, "repo_created_at": "2023-04-15T01:38: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": "515823e61c...
e9edb143-bf98-4c2d-856c-d4a54bd52627
bturnbul/Lab5
Lab5/LLSE.cpp
/* * LLSE.cpp * * Created on: Nov 8, 2016 * Author: Debra */ #include "Node.hpp" #include "LLSE.hpp" #include <iostream> #include <stdlib.h> #include <string> using namespace std; LLSE::LLSE() { first = NULL; last = NULL; size = 0; } LLSE::~LLSE() { Node *tmp = first; for(int i = 0; i < size; i++) { ...
ALGO
0.998403
3.181338
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-11-16T19:56: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": "2aea42d417...
8b6e3cc1-9f41-471e-8eb5-13ab2a39ff05
Tahsin005/Algorithms
Module 25 Unbounded Knapsack/unbounded_knapsack_top_down.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define Tahsin ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); const int N = 1005; int dp[N][N]; int unbounded_knapsack(int n,int s,int val[],int weight[]){ if(n == 0 or s == 0) return 0; if(dp[n][s] != -1) return dp[n][s]; if(w...
ALGO
0.999995
4.062653
{ "github_metadata": { "branch": "main", "commit_count": 56, "repo_created_at": "2023-07-27T16:26: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": "56875e59f37...
a6b8dae0-99a9-4ccc-9831-2c9e2f31bb8f
NamYunje2002/algorithm
Boj_C++/14716.cpp
#include <bits/stdc++.h> using namespace std; #define X first #define Y second int dx[8] = {-1, -1, 0, 1, 1, 1, 0, -1}, dy[8] = {0, 1, 1, 1, 0, -1, -1, -1}; int vis[252][252], board[252][252]; int main() { ios::sync_with_stdio(0); cin.tie(0); int m, n; cin >> m >> n; for(int i = 0; i < m; i++) { ...
ALGO
0.999931
4.34383
{ "github_metadata": { "branch": "main", "commit_count": 195, "repo_created_at": "2024-03-08T07:03: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": "7bdcf8daea...
8d0e8468-0ca3-4637-a898-1620305e159b
bit-my-qubit/Scripts_cpp
17_07_FOR_LADY_PRIMO.cpp
#include<iostream> #include<cstdlib> using namespace std; bool primo ( int p ) { int div = 2, cont = 1; //div variable utilizada para los divisores de p. //cont, variable que cuenta los divisores de p. while(cont==1&&div<=p/2) { if(p%div==0) cont++; else div++; ...
ALGO
0.998705
3.526366
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-09-03T02:21: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": "258cbf96a0...
7c16d75b-9e4c-4541-9cea-11b2eb2f141a
hec12/nocow_library
src/geometry/CPP.cpp
// closest point pair Verify AOJ CGL_5_A R cpp(VP a, int flag = 1) { const int n = a.size(), m = n / 2; if (n <= 1) return INF; auto cmp_x = [](P a, P b)->bool{ int sr = sgn(real(a - b)), si = sgn(imag(a - b)); return sr ? sr < 0 : si < 0; }; if (flag) sort(begin(a), end(a), cmp_x); VP b(begin(a), begin(a)...
ALGO
0.997815
5.070516
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2020-10-30T17:28: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": "ed193260ba4b...
3f16f82a-1ea8-418d-ad81-2ac3cbf91281
ddeka0/CP
2018-2019/jump_game2.cpp
#include <bits/stdc++.h> using namespace std; #define INF 1e9 vector<int> Lazy; vector<int> t; vector<int> a; int N,Q; void lazy_update(int root, int ll, int rr) { if(Lazy[root] == -1) return; if(ll != rr) { Lazy[root*2] = Lazy[root*2+1] = Lazy[root]; } t[root] = Lazy[root]; Lazy[root] = -...
ALGO
0.999994
4.340924
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2018-07-25T17:48:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5b7f42660...
6a580677-0a25-4cc2-901a-11ab78403aec
taehhh8/CWork
cpp_work/0207work/SetExam/SetExam.cpp
#include <iostream> #include <set> // set는 자동적으로 데이터 정렬하고 중복도 없애준다. using namespace std; template <typename T> void PrintSetElement(set<T>& s) { cout << "["; for (typename set<T>::iterator itr = s.begin(); itr != s.end(); ++itr) //포인터 연산자를 제정의해서 마치 참조연산자처럼 쓰게해준다. { cout << *itr << " "; } c...
ALGO
0.983694
4.417166
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2022-01-18T02:10: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": "ff3063721c2...
7c68cb8f-fc7c-4739-ad5c-5ce3bef400bb
alexoz12v2/CUDALearning
src/1_array_sum_matmul/main.cpp
// Include C++ header files. #include <cstdint> #include <cstdlib> #include <random> #include <stdio.h> #include <chrono> #include <cmath> // Include local CUDA header files. #include "include/cuda_kernel.cuh" /********************** RESULTS *********************** * For array length of 1024, CPU takes ~3 microsecon...
ALGO
0.998601
4.980109
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-10-22T16:18: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": "b24297663944...
83cc351b-7e52-4a62-b921-a4c7810f7b51
ai5/gpsfish
osl/std/osl/move_probability/feature_.cc
/* feature.cc */ #include "osl/move_probability/feature.h" #include "osl/checkmate/checkmateIfCapture.h" #include <iostream> osl::move_probability:: Feature::~Feature() { } void osl::move_probability::PatternCommon:: updateCache(StateInfo& info) { for (int x=1; x<=9; ++x) { for (int y=1; y<=9; ++y) { c...
ALGO
0.966822
7.181664
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-07-02T20:31:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d3ea168d20...
f93b14ef-5272-442a-b3b3-9b6e915b4b1c
DEV-JSB/Programmers_Algorithm
AlgorythmTest/AlgorythmTest/LV0_ThrowBall.cpp
#include <string> #include <vector> using namespace std; int solution(vector<int> numbers, int k) { int answer = 0; // 2 씩 증감한다, idex 를 , // 2 씩 증감하는데 , numbers 의 index 를 넘어서면 0 번째 부터 다시 증감해야 한다. // // 반대로 말하면 k 번째로 공을 던지는 사람 -> k - 1 번째에 공을 받은 사람이다. // 즉 k - 1 만큼 index 를 2 증감시키면 될듯. ...
ALGO
0.999955
4.768614
{ "github_metadata": { "branch": "master", "commit_count": 398, "repo_created_at": "2022-04-27T15:47:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b87afc84...
eadb3bbc-38e5-4f2b-9513-d991d68bc015
Noymul-Islam/problems
Farthest Nodes in a Tree .cpp
#include<cstdio> #include<cmath> #include<iostream> #include<queue> #include<algorithm> #include<cstring> using namespace std; vector<int>G[30005],cost[30005]; struct data { int index,amount; }; data bfs(int source, int n); bool comp(data p, data q) { return p.amount>q.amount; } int main() { int t,n,cs...
ALGO
0.999808
4.385439
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-09-24T16:51: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": "e9b03b5af9...
4a3e1add-2031-45a7-9a3d-796309706e77
walafc0/tsar
platforms/tsar_generic_leti/tsar_leti_cluster/caba/source/include/tsar_leti_cluster.h
////////////////////////////////////////////////////////////////////////////// // File: tsar_leti_cluster.h // Author: <NAME> // Copyright: UPMC/LIP6 // Date : march 2013 // This program is released under the GNU public license ////////////////////////////////////////////////////////////////////////////// #ifndef SOCL...
TOOL
0.928107
5.826728
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-08-18T15:48: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": "91299aaeae...
88ccb967-be93-4614-8bcd-29466216ed12
Geant4/geant4
source/processes/hadronic/models/de_excitation/multifragmentation/src/G4StatMFMacroBiNucleon.cc
// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration...
TOOL
0.985183
4.63667
{ "github_metadata": { "branch": "master", "commit_count": 83, "repo_created_at": "2016-06-21T08:25:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 705, "forks": 340, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "8ffcde...
a52cb625-c153-4891-aaa6-69255d1c22d0
ASiuciak/ASD-Jablka
jablka.cpp
#include <iostream> #define BILLION 1000000000 int main() { int n, d; scanf("%d", &n); scanf("%d", &d); int zasieg_x[n + 1]; int lsyn[n + 1]; int psyn[n + 1]; int wszystkie[n + 1]; int zasieg_xplus1[n + 1]; zasieg_x[0] = 1; lsyn[0] = -1; psyn[0] = -1; wszystkie[0] = 1; ...
ALGO
0.999875
3.80504
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-04-25T18:57: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": "48898c64b0...
560755a5-cd27-4e76-a931-cbd3a818e6bf
samsalmeida/Problems
Uri/almost_shortest_path.cpp
#include <bits/stdc++.h> using namespace std; const int MAXN=550, INF=0x3f3f3f3f; typedef pair<int, int> ii; struct point{ int x, y, D; }; int n, m; int dist[MAXN], dist_[MAXN]; int check[MAXN], check_[MAXN]; point ed[10010]; map<ii, bool> del; vector<ii> graph[MAXN], graph_[MAXN]; void dijkstra(int u){ ...
ALGO
0.99998
3.680606
{ "github_metadata": { "branch": "master", "commit_count": 114, "repo_created_at": "2018-05-16T12:59: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": "16e33ad6...
f515c4b8-be5e-4793-8023-b6aef7372cce
jk-jung/problem-solving
codeforces/Educational Round 11x/R112_div2_F.cpp
#include <string.h> #include <stdio.h> #include <math.h> #include <map> #include <stack> #include <queue> #include <vector> #include <numeric> #include <iostream> #include <algorithm> using namespace std; typedef long long ll; typedef pair<int, int> pi; typedef vector<int> vi; #define mp make_pair #define pb e...
ALGO
0.999982
4.282264
{ "github_metadata": { "branch": "main", "commit_count": 1582, "repo_created_at": "2021-06-24T13:40:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "268e603e8...
38504401-e6aa-43eb-b0d9-6b527525eb81
hlmmd/huawei2019
CodeCraft-2019/Cross.cpp
#include <fstream> #include <iostream> #include <string> #include <vector> #include <sstream> #include "common.h" using std::unordered_map; using std::vector; using namespace std; //静态成员变量需要声明 std::vector<Cross> Cross::Crosses; void Cross::init() { readyCars.clear(), leftCars.clear(); carport.clear(); p...
ALGO
0.998998
3.620019
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2019-03-22T07:45:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9cf28362c...
2d4239cc-a02b-4f1f-9a12-9a4965a78b24
EdisoNewtong/Vector
cpp/design-Pattern/simpleFactory/main.cpp
#include <iostream> #include <vector> using namespace std; class Operator { public: virtual ~Operator() { } virtual int calculate(int a,int b) = 0; }; class Add : public Operator { public: virtual int calculate(int a,int b) override { return a + b; } }; class Minus : public Operator { public: virtual...
TOOL
0.986481
4.320125
{ "github_metadata": { "branch": "dev", "commit_count": 739, "repo_created_at": "2017-02-15T14:32:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "97a9ea63aae...
85a81fb6-6a1d-4ca1-87e2-268f73e7f1ff
xdeng7/redwood_open3d_3dreconstruction
Open3D/cpp/open3d/visualization/gui/Layout.cpp
// ---------------------------------------------------------------------------- // - Open3D: www.open3d.org - // ---------------------------------------------------------------------------- // The MIT License (MIT) // // Copyright (c) 2018 www.open3d.org // // Permissio...
TOOL
0.980083
7.708168
{ "github_metadata": { "branch": "main", "commit_count": 55, "repo_created_at": "2021-01-31T19:09:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "5fb418890b5...
d36afc09-1da0-4008-85e7-91b440db6e35
zhaoyunED/leetcode
DynamicProgramming/BestTimetobuyandSellStock.cpp
Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock), design an algorithm to find the maximum profit. //方法1 int maxProfit(vector<int> &prices) { if(prices.size() <=...
ALGO
0.999589
4.64257
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2015-05-09T08:28:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d58f9f92...
f01b49b5-53b2-40ff-94b0-64a40b069f33
cpmech/script-install-superlu
examples/example03.cpp
#include <iostream> #include <vector> #include "slu_ddefs.h" using namespace std; // This is the small 5x5 example used in the Sections 2 and 3 of the // Users' Guide to illustrate how to call a SuperLU routine, and the // matrix data structures used by SuperLU. int main(int argc, char **argv) try { cout << " ...
ALGO
0.982558
4.712424
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2023-09-27T22:35: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": "b2fc6496cc0...
700e14d6-bfc9-43e7-977b-637d1189205b
jewettaij/ndmansfield
src/hamiltonian.cpp
#include <cassert> #include "ndmansfield.hpp" #include "hamiltonian.hpp" // Right now the hamiltonian does nothing (yet) // This function calculates the (total) energy of the system double Hamiltonian::CalcEnergy(NDmansfield &ndmansfield) { long num_bends = 0; long num_twists = 0; for (long i=0; i+2 < ndma...
ALGO
0.958233
4.572239
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2017-05-03T04:19:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2a2999e87...
a862fee4-1b7c-4897-b373-c16c2ff12b51
arangodb/arangodb
3rdParty/boost/1.78.0/libs/unordered/examples/fnv1.hpp
// Copyright 2008-2009 <NAME>. // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // This code is also released into the public domain. // Algorithm from: http://www.isthe.com/chongo/tech/comp/fnv/ #include <string...
ALGO
0.97082
6.434498
{ "github_metadata": { "branch": "devel", "commit_count": 51986, "repo_created_at": "2011-10-26T06:42:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13878, "forks": 857, "issues": 743, "pull_requests": 38 }, "file_meta": { "content_id": ...
f2c77983-4844-46dd-85d4-fa2ddab64400
nibblerenush/Courses
Stepik/Программирование на языке C++ (продолжение)/5.3 - Метапрограммирование основы/Задача 7/main.cpp
#include <iostream> // IntList template <int ... Numbers> struct IntList; template <int H, int ... T> struct IntList<H, T ...> { static const int Head = H; using Tail = IntList<T ...>; }; template <> struct IntList<> {}; // IntCons template <int H, typename IL> struct IntCons; template <int H, int ... T> str...
TOOL
0.978624
4.354498
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2021-04-10T11:34:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6daa409b862...
1a4edf61-f72c-4da0-a09e-bdaa084b6b2d
zhongming-unice/misc-cpp
leetcode/list/mergeLists.cc
#include <iostream> #include <chrono> #include <map> #include <queue> #include <vector> #include "listStruct.h" using std::vector, std::multimap, std::priority_queue; ListNode *mergeListsMap(vector<ListNode *> &lists) { ListNode dummy(0); ListNode *tail = &dummy; multimap<int, ListNode *> mp; for (const auto ...
ALGO
0.999078
5.821064
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2021-01-25T02:18: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": "c1e79f9fe06...
ef86fd6c-52a1-4da7-90f2-36a779c2a527
SixDayCoder/3DRender
math3d/Matrix.cpp
#include "math3d/Matrix.h" Matrix::Matrix() { _11 = 1; _12 = 0; _13 = 0; _14 = 0; _21 = 0; _22 = 1; _23 = 0; _24 = 0; _31 = 0; _32 = 0; _33 = 1; _34 = 0; _41 = 0; _42 = 0; _43 = 0; _44 = 1; } Matrix::Matrix(real a1, real a2, real a3, real a4, real b1, real b2, real b3, real b4, real c1, real c2, real c3, real c4...
ALGO
0.97538
3.228067
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-06-26T07:15: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": "fb57596486...
7443c0cb-68b4-4d80-b89e-c36fc5b76088
ishandutta2007/codeforces-a
awakeanay/normal/1591/D.cpp
#include <iostream> #include <queue> #include <vector> #include <map> #include <set> #include <algorithm> #define int long long const int MAXN = 500005; int bit[MAXN]; void add(int x, int v) { x += 1; while(x < MAXN) { bit[x] += v; x += x&(-x); } } int sum(int x) { x += 1; int ret = 0; while(x ...
ALGO
0.999842
4.035227
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e384bcf8c0b7...
7ecdfbc7-170d-4417-8c9e-047768ecff34
PeiAllen/Code
Problems/Other/Bob's Binary Matching/main.cpp
#include "bits/stdc++.h" using namespace std; using ll = long long; using pii = pair<int,int>; using pll = pair<ll,ll>; template<typename T> int sz(const T &a){return int(a.size());} const int MN=3e5+1,BS=3000; ll fp(ll a, ll b, ll mod){ ll ans=1; for(ll i=1;i<=b;i<<=1){ if(b&i)ans=ans*a%mod; a=...
ALGO
0.999891
3.559274
{ "github_metadata": { "branch": "master", "commit_count": 392, "repo_created_at": "2019-07-31T20:11: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": "83527618...
92be77ee-ba36-47b7-8276-09dac81bdad3
JyotinderSingh/Algorithms
LeetCode/binary-tree-level-order-traversal-ii.cpp
// https://leetcode.com/problems/binary-tree-level-order-traversal-ii/ ///// PERFORM LEVEL ORDER TRAVERSAL AND REVERSE THE RESULT IN THE END ///// /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), rig...
ALGO
0.999993
6.426368
{ "github_metadata": { "branch": "master", "commit_count": 224, "repo_created_at": "2019-06-18T07:40:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 15, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2cb77b3...
f799a1e9-753f-410c-8b28-2ed127317904
MelvinDiaz/CompetitivePrograming
sliding-window/books.cpp
#include <iostream> using namespace std; int main() { int t; int n; cin >> n >> t; int total = 0; int maximo = 0; int arr[n]; for (int i = 0; i < n; ++i) cin >> arr[i]; int tAux = t; for (int i = 0; i < n; ++i) { if (tAux == 0) break; tAux -= arr[i]; if (tAux >= 0) { maximo++; ...
ALGO
0.999987
4.726129
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-07-22T20:08: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": "c769eeeb3621...
7f8aca4f-7403-4933-a5a2-4acd60044ba5
EPFL-LAP/dynamatic
lib/Transforms/ArithReduceStrength.cpp
//===- ArithReduceStrength.cpp - Reduce stregnth of arith ops ---*- C++ -*-===// // // Dynamatic is under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------...
ALGO
0.97183
6.2745
{ "github_metadata": { "branch": "main", "commit_count": 962, "repo_created_at": "2022-11-28T13:54:10.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 124, "forks": 34, "issues": 60, "pull_requests": 28 }, "file_meta": { "content_id": "a886b4...
4d66fe92-4f14-4825-b7b2-204632a74afc
darshan-trivedi-10/DSA-LeetCode-Question
add-two-numbers/add-two-numbers.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* addTwoNumbe...
ALGO
0.999981
6.204133
{ "github_metadata": { "branch": "main", "commit_count": 1053, "repo_created_at": "2022-05-26T10:54:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "11dc36d74...
1db1e721-5cf0-4106-a28f-eb440df7e078
tuogy/usaco-solutions
ditch.cc
/* USER: guobich1 TASK: ditch LANG: C++ */ #ifndef __clang__ #include <bits/stdc++.h> #endif #include <iostream> #include <fstream> #include <vector> #include <queue> using namespace std; int V, E; vector<int> adj[200]; int cap[200][200]; int rG[200][200]; int parent[200]; bool vis[200]; bool EK_bfs(int s, int ...
ALGO
0.999991
4.911499
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2020-08-03T10:46: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": "c9e15e663...
f3f7344b-fe30-436a-80f0-65a5cde8775b
Hayashi-Yudai/Programming-Problems
AtCoder/ABC/ABC061/B.cpp
#include <bits/stdc++.h> using namespace std; int main() { int roads[50][50]; for (int i = 0; i < 50; i++) { for (int j = 0; j < 50; j++) { roads[i][j] = 0; } } int n, m; cin >> n >> m; int a, b; for (int i = 0; i < m; i++) { cin >> a >> b; a--; b--; roads[a][b] = ...
ALGO
0.999968
3.838387
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2019-05-06T13:35:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3cde4fb04...
6ae1b8bd-5ed0-4844-aee7-5064235cdac1
emilyberlinghoff/CS3388
Assignment 3/bezier.cpp
#include <GLFW/glfw3.h> #include <vector> #include <cmath> #include <iostream> // Struct for a 2D point struct Point { float x, y; }; // Struct for a node (a point with optional control handles) struct Node : Point { bool hasHandle1 = false, hasHandle2 = false; // Flags to indicate control handles exist P...
TOOL
0.942181
8.133294
{ "github_metadata": { "branch": "main", "commit_count": 149, "repo_created_at": "2025-01-17T06:09:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "55ea51cddf...
a7409dc9-d6c9-43a5-9430-112f36a12b00
subratamondalnsec/Pw-cpp-code
23Graph/dpp/24path-with-maximum-probability_Leetcode-1514.cpp
/* Problem Link - https://leetcode.com/problems/path-with-maximum-probability/ By <NAME> */ #include <iostream> #include <vector> #include <list> #include <climits> #include <queue> #include <algorithm> #include <unordered_map> #include <unordered_set> using namespace std; class Solution {//same as dijkstra #define ...
ALGO
0.999971
6.218302
{ "github_metadata": { "branch": "main", "commit_count": 272, "repo_created_at": "2024-09-22T18:08:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "711d622be8...
69906427-ed1a-4287-a2ba-024b6289b355
parkdoyun/aglioolio_september
kev/220929/1744.cpp
#include <iostream> #include <queue> #include <algorithm> using namespace std; using ll = long long; int main(){ priority_queue<int> positives; // 큰게 먼저 priority_queue<int, vector<int>, greater<int>> negatives; // 작은게 먼저 int N; cin >> N; for(int i = 0; i < N; i++){ int n; cin >> n; ...
ALGO
0.999985
4.574105
{ "github_metadata": { "branch": "master", "commit_count": 340, "repo_created_at": "2022-09-01T13:14:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c6590c92...
db4006d2-1862-4b87-8d81-884220d5603b
mingbugsman/DSA-cpp
Graph/undirected-graph/AdjacencyListClass.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; class Graph { private: int V; // so luong dinh vector<vector<int>> adj; void DFSUtil(int v, vector<bool> &visited) { visited[v] = true; cout << v << " "; for (int u : adj[v]) { if...
ALGO
0.999964
5.400067
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2024-08-02T07:34:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b6a2a1f08...
93c65018-5119-451b-b4ea-144680d2665a
jannunzi/CS1500Summer2-2015
PolyLogicDiagram/PolyLogicDiagram.cpp
#include <iostream> using namespace std; class GateNode { protected: GateNode * input1 = NULL; GateNode * input2 = NULL; public: GateNode(){} GateNode(GateNode * input) { input1 = input; } GateNode(GateNode * input1, GateNode * input2) { this->input1 = input1; t...
ALGO
0.998818
4.382107
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2015-08-03T20:07:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b04439ae41...
feaaa3ad-09d2-4d72-baab-451508c26a3f
gautamkartike333/dsa_practice
Binary Search/BS on 1D Arrays/Find Peak el.cpp
Prob Link:-"https://leetcode.com/problems/find-peak-element/" Hint:- see multiple peaks can be their , so understand this by a graph of 'M' shape make 'M' shaped graph in NOTEBOOK , now see nums[mid] can be at any of these lines , now reduce the halves acc to conditions ki kis line par aaya hai , or ab peak chahiye to...
ALGO
0.999997
5.771387
{ "github_metadata": { "branch": "main", "commit_count": 71, "repo_created_at": "2025-01-14T10:16: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": "fcf02e2368b...
d41c0df6-172d-48a3-89a4-2fa48ecfc5ff
shashwat0105/CPP-Data-Structures-and-Algorithms
09 (Graph Algorithms)/Practice Problems/Leetcode and GFG/08) numberOfDistinctIslands.cpp
Follow up of number of Island Problem: Number of Distinct Islands (LC premium) https://leetcode.com/problems/number-of-distinct-islands/ Description: https://github.com/MAZHARMIK/Interview_DS_Algo/blob/master/Graph/Number%20of%20Distinct%20Islands GFG https://practice.geeksforgeeks.org/problems/number-of-distinct-is...
ALGO
0.999903
6.528648
{ "github_metadata": { "branch": "master", "commit_count": 225, "repo_created_at": "2021-01-23T10:22:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "45fbd905...
933167a4-90dc-47e7-96bd-243590bc5e5b
ishandutta2007/codeforces-h
heart_blue/normal/1374/E2.cpp
#include <cstdlib> #include <cctype> #include <cstring> #include <cstdio> #include <cmath> #include <algorithm> #include <vector> #include <string> #include <iostream> #include <sstream> #include <map> #include <set> #include <queue> #include <stack> #include <fstream> #include <numeric> #include <iomanip> #include <bi...
ALGO
0.99998
3.56144
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T02:01:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "16cdcc2a0879...
89453569-7fa6-4452-9ec1-7072a18b521a
JinxinXiong/Baruch_Cplusplus_Financial_Engineering
Level 1/1.5/1.5.4/Exercise1.5.4.cpp
//Exercise1.5.4.cpp //Basic C program that prints a number digit by digit by using the putchar() function. // //Author: <NAME> // // Preprocessor for include files #include <stdio.h> // C style I/O //function declaration //input is an integer which is then printed void printnumber(int num); int main() { printnu...
ALGO
0.999675
5.038817
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2019-04-10T03:10:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 38, "forks": 29, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c346702...
ac00a5a5-72e8-421d-b96f-6a2b6686004d
LatencyTDH/coding-competitions
codejam/q5.cpp
#include <bits/stdc++.h> using namespace std; void print_matrix(vector<vector<int>>& mat) { int n = mat.size(); for (int i = 0; i < n; i++) { for (int j = 0; j < n; ++j) { cout << mat[i][j] << " "; } cout << endl; } } void initialize(vector<unordered_set<int>>& rows, vector<unordered_set<int>>& cols, in...
ALGO
0.999803
5.238007
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2020-11-16T07:59:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0331800d5...
b3aa55e3-7e0e-47cc-ae8f-71836bd10446
vpk-11/IPMP
DSA Prep/Round 1/Sorting/Sort_02.cpp
// Merge sort #include <iostream> using namespace std; void merge(int arr[], int lb, int mid, int ub) { int k; int n1 = mid - lb + 1; int n2 = ub - mid; int L[n1], R[n2]; for (int i = 0; i < n1; i++) L[i] = arr[lb + i]; for (int j = 0; j < n2; j++) R[j] = arr[mid + 1 + j]; int i = 0; int j = 0; k = lb;...
ALGO
0.999976
5.449497
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2021-11-08T07:07:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5fb60664cf8...
69c21f6b-c346-4a9c-8ada-6e37a0030579
iamvks12022001/DSA--level-2
Stack and Queue/queue.cpp
#include<bits/stdc++.h> using namespace std; template<typename T> //in case of dynamic array class QueueUsingArray{ T *data; int nextindex; int firstindex; int size; int capacity; public: QueueUsingArray(int s){ data=new T[s]; capacity=s; nextindex=0; f...
ALGO
0.998254
3.476251
{ "github_metadata": { "branch": "master", "commit_count": 124, "repo_created_at": "2021-04-11T17:57: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": "2edd7359...
71f36071-3ea6-4f2d-81f8-cd457a1c11e5
Gaurav237/DSA
_11_LinkedList/23_ReverseLL/main.cpp
#include <bits/stdc++.h> using namespace std; struct Node{ int data; Node *next; Node(int d){ data = d; next = nullptr; } }; void printList(Node* head){ Node* curr = head; while(head != NULL){ cout << head->data << " "; head = head->next; } } // Naive // T...
ALGO
0.999971
5.386872
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-06-12T11:54: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": "47882a71e6...
b73576fe-6d36-489c-b158-6dc2bb44d8b4
blank-bit/blank
C++/matu/Student.cpp
// 设计一个学生类Student,包含学生学号(最长10位)、姓名(不用支持中文最长12位)、三门课程成绩等基本信息, // 计算每门课程学生的平均成绩。 // 需实现Student的display成员函数,依次输出学号 姓名 和三门课的成绩,每个输出以空格隔开 // 成员函数 average1 ,average2 ,average3 ,分别返回三门课的平均成绩。 // Student类的使用方法如下所示,在你的代码中除了实现Student类,还需引入以下代码: #include <iostream> #include <cstring> using namespace std; double sum1, sum2, su...
TOOL
0.900692
3.979518
{ "github_metadata": { "branch": "master", "commit_count": 75, "repo_created_at": "2019-11-27T09:00: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": "c52284442...
2fc7bd5d-1125-44f0-a623-133dd87c08d9
sanghvianurag/CSES
CSES Introductory Problems/CSESCreatingString.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define pob pop_back #define mp make_pair #define rep(i, a, b) for(int i=a;i<b;++i) #define repb(i, a, b) for(int i=a;i>b;--i) #define endl '\n' #define mod 1000000007 ...
ALGO
0.999914
3.563492
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2021-08-15T11:48: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": "29a965e077e...
eebceda5-7b2e-4d15-b840-2a0d8df00e6a
Yuan-Hsuan/Kattis
delimitersoup.cpp
#include<bits/stdc++.h> using namespace std; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); int T; cin >> T; for( int i = 0; i < T; i++ ){ int N; cin >> N; priority_queue<long long, vector<long long>, greater<long long>> canvas; for( int j = 0; j < N;...
ALGO
0.999694
4.27545
{ "github_metadata": { "branch": "main", "commit_count": 80, "repo_created_at": "2022-06-21T14:34: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": "e2fc94e89fc...
17de4b29-1e77-40ba-9407-01dbb3a76fd4
areian13/PS_BOJ
3. Gold/Gold 3/[G3] 32135 합성방진 [2].cpp
#include <iostream> #include <vector> #define FastIO ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr) using namespace std; bool isPrime(int n) { if (n <= 1) return false; if (n == 2) return true; for (int i = 2; i * i <= n; i++) { if (n % i == 0) ...
ALGO
0.999833
3.968285
{ "github_metadata": { "branch": "master", "commit_count": 231, "repo_created_at": "2024-02-21T06:31: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": "e5c4dfed...
27d2537c-5583-4c34-8d47-fa5b3a2da3a9
PeterLozanoRobles/Deber-Quinto-Repositorio
Deber 7.cpp
//Nombre: <NAME> //Curso: SOFTWARE 3-2 //Fecha: 2 de Noviembre del 2019 #include<iostream> #include<conio.h> using namespace std; void TamanioVector(); void IngresarDatos(); void OrdenarporburbujaE(int arreglo[], int n); void OrdenarporburbujaM (int arreglo[], int n); void intercambiar (int& x, int& y); void ordInterca...
ALGO
0.995802
3.923279
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-01-30T17:44: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": "1d6a9d0117...
d2fb371f-dd6e-478a-b749-96e9fa8226bf
taxijjang/algorithm
소마2차/2번.cpp
#include<iostream> #include<vector> #include<algorithm> #include<queue> #include<string> #include<set> #include<map> #include<cstring> #include<functional> #include<cmath> #include<stack> #define SIZE 300010 const int INF = 2000000000; using namespace std; typedef long long int ll; typedef pair<int, int> pii; typed...
ALGO
0.999988
3.752675
{ "github_metadata": { "branch": "master", "commit_count": 678, "repo_created_at": "2018-05-18T06:47: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": "da19f1d1...
dfb6b80a-a274-45fc-a005-69cdb089a01c
Gnaroshi/practice-algorithm-solvedac
With_Levels/Bronze/Bronze_2/5149.cpp
// problem: Map Interface // id: 5149 // time taken: #include <bits/stdc++.h> using namespace std; int main(void) { ios::sync_with_stdio(false); cin.tie(nullptr); int tc; cin >> tc; for (int tcc = 1; tcc <= tc; tcc++) { cout << "Data Set " << tcc << ":\n"; int n, m, x, y, ax, ay...
ALGO
0.999916
4.810923
{ "github_metadata": { "branch": "main", "commit_count": 476, "repo_created_at": "2024-03-13T08:59: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": "c9d913eb7a...
990f228b-6512-42fe-a2ba-f5e84437154e
praveen4698/competitiveProgrammingWithCpp
codeforcesB/longest path in a tree.cpp
#include<bits/stdc++.h> using namespace std; #define lp(i,n1,n2) for(int (i)=(int)(n1);(i)<(int)(n2);++(i)) #define lpr(i,n1,n2) for(int (i) =(int)(n1); (i) >= (int)(n2);--(i)) #define scan(a) scanf("%d",&a) #define scan2(a,b) scanf("%d %d",&a,&b); #define pb(a) push_back(a) #define mp(a,b) make_pair(a,b) #define PI 3....
ALGO
0.99808
3.466751
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2019-06-22T07:25: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": "aff69b5ee7...
1166f00d-36e1-4e0c-9d25-43ed77f157e4
darthsuogles/phissenschaft
algo/leetcode_147.cxx
#include <iostream> #include "ListNode.hpp" using namespace std; typedef LnkLstNode<int> ListNode; ListNode* insertionSortList(ListNode *head) { if (NULL == head) return NULL; auto ghost = new ListNode(INT_MIN); ghost->next = head; auto node = head, last = ghost; while (NULL != node) { a...
ALGO
0.999952
5.62447
{ "github_metadata": { "branch": "develop", "commit_count": 190, "repo_created_at": "2017-03-12T05:28:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "50e7742...
b9ddd002-a1a6-4ee1-b5af-5749f4306ff3
milanbankovic/isocert
morphi/group.h
#ifndef GROUP_H #define GROUP_H #include <numeric> #include "vector.h" #include "bitarray.h" #include "partition.h" #include "permutation.h" #include "assertions.h" #include "bitarray.h" #include "proof.h" namespace morphi { template<typename T> class Group { public: Group(size_t points, size_t max_elements) ...
ALGO
0.994486
6.389109
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2021-12-14T15:27:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "825c56c58...
6efbc84d-2bfb-4be9-9dbb-408ad4db6636
zhangzhangjjww/introduction-to-algorithm-
8-3b.cpp
#include<cstring> #include<iostream> using std::endl; using std::cout; using std::cin; void count_sort(char a[][20],int n,char b[][20]); bool test(char a[][20],int n); int main() { char p[10][20],p1[10][20]; for(int i=0;i!=10;++i) cin>>p[i]; for(int i=0;i!=10;++i) for(int j=0;j!=10;++j) ...
ALGO
0.999866
3.410897
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-05-27T08:32: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": "6a0cc5d96c...
3d82688a-033f-480f-ba33-5692beb98d36
adlternative/algorithm-Brush
454.cpp
// // Created by adl on 2020/11/27. // #include<bits/stdc++.h> using namespace std; class Solution { public: int fourSumCount(vector<int> &A, vector<int> &B, vector<int> &C, vector<int> &D) { int cnt = 0; int N = A.size(); unordered_map<int, int> Mab; unordered_map<int, int> Mcd; ...
ALGO
0.999839
5.940585
{ "github_metadata": { "branch": "main", "commit_count": 101, "repo_created_at": "2021-03-05T14:05:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "f8d1230dbc...
101116a9-94f1-4974-97e0-60db2b94d9ad
iSubhamSingh/DAA
NQueens.cpp
#include <iostream> #include <vector> using namespace std; // function to check if a queen can be placed in the current position bool isSafe(vector<vector<int > >& board, int row, int col, int n) { // check the row for (int i = 0; i < col; i++) { if (board[row][i]) { return false; ...
ALGO
0.999974
5.82487
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-06-22T11:04: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": "49791fcbe4...
0db5b68e-9910-4fb5-ae7c-d98b5d30aa7d
MelulekiDube/Q-Learning
CQLearningController.h
#pragma once #include "cdisccontroller.h" #include "CParams.h" #include "CDiscCollisionObject.h" #include <cmath> //Additions made to the existing code #include <vector> //parameters for the algorithm typedef unsigned int uint; class CQLearningController : public CDiscController { private: uint _grid_size_x; uint ...
ALGO
0.973556
3.576819
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-10-19T14:11: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": "b8882140c2...
e2b132e0-f879-4ef0-b168-3c17f84d9c97
Audreykacur/CPPProgramming
Labs/lab7/Question2.cpp
// // Created by <NAME> on 2/22/22. // /* Write a program that lets the user enter the total rainfall for each of 12 months of a year into an array of doubles. The program should calculate and display the total rainfall for the year, the average monthly rainfall, and the months with the highest and lowest amo...
TOOL
0.99517
6.466012
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2022-01-12T22:17: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": "68c7b9dcd...