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
b90f22f3-9c3e-4007-8077-4b6717726744
ishandutta2007/codeforces-l
love.zy/normal/713/D.cpp
#include <iostream> #include <cstring> #include <stack> #include <vector> #include <set> #include <map> #include <cmath> #include <queue> #include <cstdio> #include <cstdlib> #include <climits> #include <deque> #include <bitset> #include <algorithm> using namespace std; const double eps=1e-10; const double pi=3.1...
ALGO
0.999399
4.095218
{ "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": "657d5ae6ae93...
3e1d3a10-b341-49c7-b0fa-ed21ae37c033
jemin9312/Problem-Solving
BOJ/1347_미로만들기.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <vector> #include <queue> #include <string> #include <cmath> #include <set> #include <algorithm> using namespace std; typedef struct { int row; int col; int dir; }User; int n, f_cnt; vector<char> v; char map[101][101]; bool check[101][101]; int dx...
ALGO
0.999981
3.755846
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2020-01-20T04:13: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": "aed89c0f5...
e7fae4d1-bb3e-47e5-a6ae-492b6f5b054a
mirinta/leet_code
greedy/1798_maximum_number_of_consecutive_values_you_can_make.cpp
#include <algorithm> #include <vector> /** * You are given an integer array coins of length n which represents the n coins that you own. The * value of the ith coin is coins[i]. You can make some value x if you can choose some of your n * coins such that their values sum up to x. * * Return the maximum number of ...
ALGO
0.999937
6.382624
{ "github_metadata": { "branch": "master", "commit_count": 1725, "repo_created_at": "2023-04-09T12:48:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "31fd40d...
0d89fab5-6186-4023-b001-43ded360e958
srivastavaman641/Competitive-Coding
hackerearth-wordsandtrees.cpp
#include<bits/stdc++.h> #define ll long long int #define s(a) scanf("%d",&a) #define sl(a) scanf("%lld",&a) #define ss(a) scanf("%s",a) #define w(t) while(t--) #define f(i,n) for(int i=0;i<n;i++) #define fd(i,n) for(int i=n-1;i>=0;i--) #define p(a) printf("%d",a) #define pl(a) printf("%lld",a) #define ps(a) printf("%s"...
ALGO
0.99993
3.637815
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-07-10T14:19: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": "c504e0371e...
7fdd5b4d-bbbf-4d49-886d-55e17fd8c653
Kevin-White/Homework
Code/C++/2437Homework/Assignment_3/functions.cpp
//******************************************************************** //Name: <NAME> //Class: COSC 2437 Fall21 //Instructor: <NAME> //Assignment 3 //Date:10/04/2021 //Program description: Make Functions for the to minipulate nodes //********************************************************************* #include <iostre...
TOOL
0.980585
5.682955
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2021-10-14T15:49:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "538b8b950dc...
282edabf-1d32-4edc-8f18-e79f4271fb8f
linkumokunn/code_la
CSES/1336.cpp
/* ============================================================================= /\ \ / /\ |\ /| |=========== / \ \ / / \ | \ / | | / \ \ / / \ | \ / | | / \ | / \ | \...
ALGO
0.999744
3.269386
{ "github_metadata": { "branch": "main", "commit_count": 104, "repo_created_at": "2021-11-23T02:23:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3acd1874c7...
0a0c460f-af59-4b87-ba70-aba198251dcc
WhiZTiM/coliru
Archive/6d435c5558d701515f4891279be8807f/main.cpp
/** * Problem 12 * ---------- * The sequence of triangle numbers is generated by adding the natural numbers. * So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. The * first ten terms would be: * 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ... * * Let us list the factors of the first seven triangle ...
ALGO
0.999937
6.315838
{ "github_metadata": { "branch": "master", "commit_count": 42630, "repo_created_at": "2016-04-21T16:34: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": "3e973a...
aba2c1d0-db41-4cbc-ba08-2cd259ef4af4
debashishc/advent-of-code
2024/src/day04/day04.cpp
#include "day04.hpp" #include "fileReader.hpp" #include <iostream> int64_t Day04::solvePart1(const std::vector<std::string>& input) { // TODO: Implement solution for part 1 const std::string word = "XMAS"; int64_t count = 0; const int wordLength = word.length(); const size_t rows = input.size(...
ALGO
0.998142
5.662947
{ "github_metadata": { "branch": "main", "commit_count": 75, "repo_created_at": "2020-12-03T03:10: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": "bffd924370a...
7d95bb08-1ee5-4a40-8199-d317a1f68cbf
sgchoi5/algorithm
28.8_code_snippet.cpp
// 코드 28.8 간선을 구분하는 깊이 우선 탐색의 구현 // 그래프의 인접 리스트 표현 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] = counter++; // 모든 인접 정점을 순회하면서 for (int i = 0; i < adj[here]...
ALGO
0.995503
4.086963
{ "github_metadata": { "branch": "master", "commit_count": 96, "repo_created_at": "2017-02-03T14:56: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": "4cfd17626...
62146d71-fa8b-462f-903f-afae18f22ecf
ethz-asl/voxblox
voxblox/src/alignment/icp.cc
/* * Software License Agreement (BSD License) * * Point Cloud Library (PCL) - www.pointclouds.org * Copyright (c) 2010, <NAME>, Inc. * Copyright (c) 2012-, Open Perception, Inc. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted ...
ALGO
0.996604
7.079524
{ "github_metadata": { "branch": "master", "commit_count": 1478, "repo_created_at": "2016-04-13T09:07:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1476, "forks": 367, "issues": 64, "pull_requests": 12 }, "file_meta": { "content_id": "1...
9c5a1650-c619-4afa-9dd3-6df53de9f4e0
DHEERAJHARODE/Hacktoberfest2024-Open-source-
matrix_exponentation.cpp
const int m = 2; typedef long long ll; #define forc(i, a, b) for(int i = (int)a; i < int(b); i++) class Matrix{ public: ll mat[m][m]; void init(){ mat[0][0] = k; mat[0][1] = 1; mat[1][0] = l; mat[1][1] = 0; } Matrix operator * (const Matrix &p){ Ma...
ALGO
0.999937
3.717773
{ "github_metadata": { "branch": "main", "commit_count": 945, "repo_created_at": "2020-10-03T04:58:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 473, "forks": 3840, "issues": 177, "pull_requests": 1367 }, "file_meta": { "content_id": "...
65bc6d3b-4578-468c-9c8f-9327c6a57f89
jlgm/Algo
cf/764A.cpp
#pragma comment(linker, "/STACK:16777216") #include <bits/stdc++.h> using namespace std; #define ms(ar,a) memset(ar, a, sizeof(ar)) #define fr(i,j,k) for (int (i) = (j); (i) < (k); (i)++) #define db(x) cout << (#x) << " = " << x << endl; #define pb push_back #define mp make_pair #define X first #define Y second type...
ALGO
0.999721
3.000526
{ "github_metadata": { "branch": "master", "commit_count": 182, "repo_created_at": "2016-12-22T03:58:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7525e4b1...
42aa26eb-d6c6-45f4-9ce5-fb858f2d3df8
gabrielmorete/Competitive-Programming
Code Forces Rounds/educational/#100/c.cpp
#include "bits/stdc++.h" using namespace std; #define pb push_back #define fst first #define snd second #define fr(i,n) for (int i = 0; i < n; i++) #define frr(i,n) for (int i = 1; i <= n; i++) #define endl '\n' #define gnl cout << endl #define chapa cout << "oi meu chapa" << endl #define dbg(x) cout << #x ...
ALGO
0.999911
3.81605
{ "github_metadata": { "branch": "master", "commit_count": 846, "repo_created_at": "2019-09-05T15:57:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "31b86e5a...
38963de3-5f2f-48e6-9e2d-a179f9385bb1
Duncanbj01/Theory-of-Algorithms
Theory of Algorithms/PA2/GreedyIntervals.h
#include "Interval.h" #include "IntegerComparator.h" #include <vector> #include <algorithm> using namespace std; #ifndef GREEDYINTERVALS_H_ #define GREEDYINTERVALS_H_ class GreedyIntervals { private: struct sort_by_start { bool operator()(const Interval &arg1, const Interval &arg2) const { return arg1.start <...
ALGO
0.999871
5.639525
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2024-02-19T18:10: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": "43a1f9e77...
cf937641-f441-49cf-94fb-893dcc20787a
olik369/SSipCpp
이것이 코딩테스트다/chp12.구현 문제[기출]/연습장/main.cpp
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> using namespace std; //문제 1번 //int solution(int A, int B) { // long long AB = (long long)A * (long long)B; // int result = 1; // while (AB != 1) { // if (AB % 2 == 1) result++; // AB /= 2; // } // return result; //} //문제 2번 vector<int> B; int solution(vector...
ALGO
0.999334
3.900684
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2021-07-29T06:23: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": "16628fbd4...
3350fb1c-44af-4cf6-92d0-1e2a21cee6f4
tori209/Algorithm_Solving_List
알고스팟(종만북)/수치해석/FOSSIL.cpp
/* FOSSIL 문제: <NAME> 입력: 테스트 케이스 수 c (50 이하) 볼록 껍질에 포함된 점의 수 n, m (1 이상 100이하) 두 볼록 껍질에 포함된 점의 좌표 (x, y)가 시계 반대 방향 순서대로 제시됨. (x,y는 0 이상 100 이하, 소수점 2자리까지 표기된 실수) ※ 세 점 이상이 일직선 상에 놓이는 경우는 없다. 출력: 두 볼록 껍질이 겹치는 부분의 남북 최대 폭. (오차 범위 10^-7) 겹치지 않을 경우 0 출력. */ #include <iostream> #include <iomanip> #include <v...
ALGO
0.999972
4.356614
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2022-05-02T15:22: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": "fc7f0d210...
5db28fb1-54eb-4218-8401-e1e814377163
koritafei/leetcode
array/304.range-sum-query-2-d-immutable.cpp
/* * @lc app=leetcode id=304 lang=cpp * * [304] Range Sum Query 2D - Immutable * * https://leetcode.com/problems/range-sum-query-2d-immutable/description/ * * algorithms * Medium (45.91%) * Likes: 2218 * Dislikes: 236 * Total Accepted: 200.1K * Total Submissions: 435.9K * Testcase Example: '["NumMat...
ALGO
0.999545
7.159566
{ "github_metadata": { "branch": "main", "commit_count": 72, "repo_created_at": "2021-02-24T02:09: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": "3b38a46a0ff...
512beea8-8e0a-42e7-8765-39c278332e52
HyejinMa/BaekJoon
Problem/1436.cpp
#include <iostream> using namespace std; void p1436(){ int N, count = 0, shom = 665; // count는 숫자가 666 만족할때 하나씩 올림, shom은 while문에서 숫자 올려지는애 cin >> N; // 영화의 제목 몇번째? // 할 거: 숫자 1씩 올려서 666 연속돼있는지 보기 // 666 1666 2666 ... 6660 6661 ...6666 .. 6669 7666 ... while (count != N) { shom++; int check = 0; int tmp ...
ALGO
0.999762
3.768333
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2021-01-27T04: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": "020cf45c64...
bff896cc-b15f-40d5-8961-61076d17520e
mostafa-saad/MyCompetitiveProgramming
Olympiad/POI/official/2008/code/szk/prog/szkb3.cpp
/************************************************************************* * * * XV Olimpiada Informatyczna * * * * Zadanie: Szkla...
ALGO
0.999961
3.810621
{ "github_metadata": { "branch": "master", "commit_count": 439, "repo_created_at": "2017-02-05T22:26:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 415, "forks": 85, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eada5...
5a05d544-02ff-4814-beef-40dfb7b4d9d5
coldmate/CPSC-2430
Homeworks/hw4/test1/hashTable.cpp
#include "hashTable.h" #include <iostream> #include <vector> using namespace std; // constructor covidDB::covidDB(int m){ v = vector<vector<string>>(m); this->tableSize = m; } // hash function int covidDB::getIndex(string dataEntry){ int ascii = 0; int size = dataEntry.size(); for(int i =...
ALGO
0.98744
4.070628
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-18T21:53: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": "5bc2a2018464...
d2d5048b-ec64-4901-a680-91fbb460a27c
AlbertMukhammadiev/UniversityHomeworks
First_semester/Homework_1/task_4/task_4.cpp
// task_4.cpp: определяет точку входа для консольного приложения. // #include "stdafx.h" #include <iostream> #include <cstdlib> using namespace std; int main() { cout << "Enter two numbers, please:" << endl; int a = 0; int b = 0; cin >> a >> b; int incompleteQuotient = 1; if (b == 0) { cout << "ERROR" << en...
ALGO
0.996687
3.876434
{ "github_metadata": { "branch": "master", "commit_count": 473, "repo_created_at": "2015-10-31T16:35:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8ae965bc...
d13a8000-d0a1-43b8-a12a-b087c97c7a03
ishandutta2007/codeforces-i
i_love_tanya_romanova/normal/695/A.cpp
//#pragma comment(linker, "/STACK:16777216") #include <fstream> #include <iostream> #include <bitset> #include <cstring> #include <string> #include <complex> #include <cmath> #include <set> #include <vector> #include <map> #include <queue> #include <cstdio> #include <stack> #include <algorithm> #include <list> #include...
ALGO
0.999977
3.616186
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T05:39: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": "359af2e9c68a...
0bb7cae1-273b-4d08-99c5-6bc092b0bab0
divyajain11/c-cpp
staircasepattern.cpp
/* Staircase detail This is a staircase of size n=4 # ## ### #### Its base and height are both equal to n. It is drawn using # symbols and spaces. The last line is not preceded by any spaces. Write a program that prints a staircase of size n.*/ #include <iostream> using namespace std; void staircase (int n) { ...
ALGO
0.999656
4.787516
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2021-01-18T07:32: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": "229bd05a863...
d16694e8-fdad-40e0-a8dd-7481e736fe3e
xueliuxing28/SoftRender
SoftRender/Public/Vector3.h
#pragma once #include <iostream> #include <windows.h> template<class T> class Vector3 { public: T x, y, z, w; Vector3<T>(T fx, T fy, T fz); Vector3<T>(T fx, T fy, T fz,T fw); Vector3<T>() { x = y = z = 0; w = 1; } Vector3<T> operator + (const Vector3<T>& right) const; Vector3<T> operator - (const V...
TOOL
0.991221
3.741027
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-11-18T08:44:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 61, "forks": 14, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "11fbea0e3a...
2050a39c-eb45-4ab5-9aaa-c7a610eaf6b2
gatorliu/Algorithm_Notes
Problems/zeroJudge/f162.cpp
// https://zerojudge.tw/ShowProblem?problemid=f161 #include <iostream> #include <vector> using namespace std; typedef long long ll; ll K, Ans = 0, tmpAns; int M,N, food; // int G[55][300005] = {0}; //前綴和矩陣 segmention fault 太大了!! int main() { ios::sync_with_stdio(0);cin.tie(0); cin >> K >> M >> N; vector< ...
ALGO
0.999977
3.388092
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2021-01-05T09:49:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6539a5e37ad...
95776173-e3dc-446f-bb05-481aa354d3da
NUbots/NUbots
module/vision/GreenHorizonDetector/src/GreenHorizonDetector.cpp
/* * MIT License * * Copyright (c) 2019 NUbots * * This file is part of the NUbots codebase. * See https://github.com/NUbots/NUbots for further info. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal ...
ALGO
0.911097
6.916102
{ "github_metadata": { "branch": "main", "commit_count": 9901, "repo_created_at": "2014-09-08T21:30:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 33, "forks": 17, "issues": 64, "pull_requests": 67 }, "file_meta": { "content_id": "5c111e...
894661f5-fa8b-488d-9d95-725a120461d9
Anik-Modak/OnlineJudgeProblemSolution
CodeforcesProblems/Sail.cf.cpp
//Anik_Modak #include<bits/stdc++.h> using namespace std; int main() { long long t, sx, sy, ex, ey; cin>>t>>sx>>sy>>ex>>ey; string s; cin>>s; if(sx == ex && sy == ey) { cout<<0<<endl; return 0; } long long e, w, u, n; e = w = u = n = 0; if(sx < ex) e = abs(sx...
ALGO
0.999986
3.414303
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-04-03T18:58:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fd9c6c464...
7fbc0bc5-d7ef-49a7-844a-96a9feca61cd
TPOJL/UJ_Projects
NumericMethods/FAD2/FAD2.cpp
#include <iostream> #include <cmath> #include <iomanip> #include "funkcja.h" using namespace std; class Dzet { public: double val, dx, dy, dxx, dxy, dyy; Dzet() : val(0.0), dx(0.0), dy(0.0), dxx(0.0), dxy(0.0), dyy(0.0) {} Dzet(double v, double dx_, double dy_, double dxx_, double dxy_, double dyy_) ...
ALGO
0.99914
4.55717
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2025-05-10T10:36: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": "aa07509fd78...
78c30885-63fe-45e5-b3ed-14dd9eca8ac3
rhkdguskim/Study
Algorithm/C++/백준/구현/치킨배달.cpp
#include <iostream> #include <vector> #include <tuple> #include <unordered_set> namespace std { template<> struct hash<tuple<int, int>> { size_t operator()(const tuple<int, int>& t) const { auto [x, y] = t; return hash<int>()(x) ^ hash<int>()(y); } }; } using namespace ...
ALGO
0.999866
4.066894
{ "github_metadata": { "branch": "main", "commit_count": 795, "repo_created_at": "2022-09-16T13:31: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": "1f48aa0b8a...
0ada35e4-2534-460b-9d70-200ef99016ec
Guspyth/Agusnurfajri.Algoritma.struktur.data
PTM8/Tugas/Pertemuan 8-1_loket_tiket.cpp
#include <iostream> using namespace std; // Struktur node untuk linked list struct Node { string nama; Node* next; }; // Inisialisasi head dan tail antrian Node* front = nullptr; Node* rear = nullptr; // Fungsi untuk menambahkan ke antrian (enqueue) void enqueue(string nama) { Node* baru = new Node; ...
ALGO
0.992284
5.810976
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-12-27T18:22: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": "fae695bdd012...
660e669f-e6a1-47e1-addb-576b570c3b61
n4rd0/ProgrammingAdvent
AoC2019/D13/usr.cpp
#include <iostream> #include <fstream> #include <stdexcept> #include <string> #include <vector> #include <chrono> #include <sstream> enum INST { ADD = 1, MULT, IN, OUT, JMP_TRU, JMP_FLS, LS, EQ, REL, END = 99, ALL_INPS = 0b11110011, }; std::vector<long> parse() { std::...
ALGO
0.998487
4.349479
{ "github_metadata": { "branch": "master", "commit_count": 236, "repo_created_at": "2019-11-21T14:58:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "413c7b3e...
17d839a2-ac20-4fcb-9dab-bc93d845cc64
ishandutta2007/codeforces-h
heltion/normal/1548/B.cpp
#include <bits/stdc++.h> using namespace std; using LL = long long; int main() { cin.tie(nullptr)->sync_with_stdio(false); int t; for (cin >> t; t; t -= 1) { int n; cin >> n; vector<LL> v(n); for (LL& x : v) cin >> x; vector<LL> d(n); for (int i = 1; i < n; i ...
ALGO
0.999818
3.960175
{ "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": "d003f58c8d03...
d633852d-54c7-4f87-a958-b5365a30c8a3
Rahul-kumar-Pandey/DSA
stack&queues/2.implementQ.cpp
class Queue { int * arr; int start, end, currSize, maxSize; public: Queue() { arr = new int[16]; start = -1; end = -1; currSize = 0; } Queue(int maxSize) { ( * this).maxSize = maxSize; arr = new int[maxSize]; start = -1; end = -1; currSize = 0; } void pus...
ALGO
0.997968
4.687462
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2025-06-21T08:03: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": "1b5a494644c...
e80695ad-5143-4ad1-acc7-acf65a5420f3
ttyang/sandbox
sandbox/la/boost/la/custom/matrix_minus_4_4.hpp
//Copyright (c) 2009 <NAME> and <NAME>, Inc. //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) #ifndef BOOST_LA_CUSTOM_MATRIX_MINUS_4_4_HPP_INCLUDED #define BOOST_LA_CUSTOM_MATRIX_MINUS_4_4_HPP_INCLUDED //This file w...
ALGO
0.956959
6.040848
{ "github_metadata": { "branch": "trunk", "commit_count": 20907, "repo_created_at": "2013-10-11T03:08:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "44d8f64...
41cf8c1a-dda9-4c19-8d99-ee737bed167d
fraguela/dparallel_recursion
include/dparallel_recursion/parallel_stack_recursion.h
/* dparallel_recursion: distributed parallel_recursion skeleton Copyright (C) 2015-2020 <NAME>, <NAME>, <NAME>. Universidade da Coruna Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http:/...
ALGO
0.993989
5.348913
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2016-12-13T12:20:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e24fc17ce3...
bf181390-24ae-4eae-b31b-b53c4f36a19a
yuan-ie/Engineering-Computation-II
week_10/merge_v0.cpp
#include<iostream> #include<vector> using namespace std; class merge_sort{ public: vector<float> buffer; void insert(float x){ buffer.push_back(x); } void push_front(float x){;} void print_all(){ for (int i = 0 ; i<buffer.size() ; i++) cout << buffer[i] << endl; ...
ALGO
0.99994
5.127897
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2023-10-16T18:57: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": "b75392b9911...
f293e16d-ce2a-432c-aab5-87fa9e92a036
johnathan398/AI
AI.Core/LinearAlgebra/Matrix.h
#pragma once #include "../Stdafx.h" #include <stdarg.h> using namespace System; namespace AI { namespace Core { namespace LinearAlgebra { template<class T> class Matrix; template<class T> class MatrixRow { public: MatrixRow<T>(Matrix<T>* m, int row_index) { _matrix = m; _row_...
TOOL
0.924806
5.710144
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2014-07-29T20:44: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": "4c942fe6c...
4e960195-ce34-40e3-8d89-7ae345b887e9
sarcilav/analisis-numerico
algoritmos/ecuaciones_una_sola_variable/busquedas_incrementales.cc
/* <NAME> <EMAIL> 2009 */ #include <stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> #include <limits.h> #include <assert.h> #include <stdarg.h> #include <string> #include <sstream> #include <iostream> #include <fstream> #include <iterator> #include <algorithm> #include <vector> #include <d...
ALGO
0.999914
3.749914
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2008-12-02T11:37:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 57, "forks": 23, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5c968d6...
99074638-5710-493f-a900-9290d4e0ddef
mansi0829/dsa
trash/Array/ReverseTheArray.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int arr[n]; // if the arr[n] is declared before then it gets the garbage value of n for (int i = 0; i < n; i++) { cin >> arr[i]; } // one way to reverse string is to traverse it in reverse order // for (int...
ALGO
0.999977
4.769973
{ "github_metadata": { "branch": "main", "commit_count": 108, "repo_created_at": "2022-04-06T09:06: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": "14bdaaf240...
fefe4df1-b449-488a-8d06-ac158bd1787e
juanjosalco/Codeforces_Training
DP/E-Knapsack_2.cpp
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <limits> #include <cmath> #include <cstring> using namespace std; typedef long double ld; typedef long long int lli; typedef pair<lli, lli> pii; typedef vector<lli> vi; #define endl '\n' #define fi first #define se second #defin...
ALGO
0.999986
4.898129
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2023-03-18T18:21: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": "e0421ced395...
19fdfdb2-6180-4d68-9eeb-07a395bbfb83
ssj-gz/Competitive-Programming
contests/codechef-august-2019b/football.cpp
// <NAME> (ssjgz) - 2019-08-03 #include <iostream> #include <vector> #include <cassert> using namespace std; template <typename T> T read() { T toRead; cin >> toRead; assert(cin); return toRead; } int main(int argc, char* argv[]) { // Completely trivial - just follow the instructions XD cons...
ALGO
0.999541
4.057749
{ "github_metadata": { "branch": "main", "commit_count": 6590, "repo_created_at": "2022-04-27T12:08: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": "d0a96c2f0...
7f76acaf-92d4-4e46-b41e-5243334197ea
MasonSu/leetcode
puzzle/heap/ReorganizeString.cpp
// Given a string S, check if the letters can be rearranged so that two characters // that are adjacent to each other are not the same. // If possible, output any possible result.  If not possible, return the empty string. // Example 1: // Input: S = "aab" // Output: "aba" // Example 2: // Input: S = "aaab" // Out...
ALGO
0.99987
5.273908
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2017-02-08T01:42: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": "517179367...
bc857d12-dfca-42e8-a60c-17afc2f30085
AsukaXX/id
id/sort.cpp
#include"sort.h" bool judgeletter(char c) { if (c >= 'a'&&c <= 'z' || c >= 'A'&&c <= 'Z' || c == '_') return 1; else return 0; } bool judgenumber(char c) { if (c >= '0'&&c <= '9') return 1; else return 0; } inline int stringtoint(const string s) { int i = 0; istringstream ss(s); ss >> i; return i; } S...
ALGO
0.996722
3.402704
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-04-21T09:35:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "691697bd9d...
b0910423-30a9-4f2f-b1e6-41f057c7a893
Wizmann/ACM-ICPC
Leetcode/Algorithm/cpp/01508-Range Sum of Sorted Subarray Sums.cc
const int MOD = 1'000'000'000 + 7; struct Node { int ptr; int tot; bool operator < (const Node& other) const { return tot > other.tot; } }; class Solution { public: int rangeSum(vector<int>& nums, int n, int left, int right) { priority_queue<Node> pq; for (int i = 0; i...
ALGO
0.999995
5.647997
{ "github_metadata": { "branch": "master", "commit_count": 3480, "repo_created_at": "2011-12-19T02:04:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 63, "forks": 29, "issues": 97, "pull_requests": 0 }, "file_meta": { "content_id": "b93d...
8b5cc38e-bded-4f05-a5bd-9f20619df427
ahmadadil950/CS103-lectures
05/gcd.cpp
/* simple program to "brute force" the gcd of two positive integers. */ #include <iostream> using std::cin; using std::cout; int main() { int a,b; cout << "Enter two integers: "; cin >> a >> b; /* now compute the gcd. we will start with the largest possible * value for the gcd and count backwards until we find ...
ALGO
0.999859
4.338191
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2020-03-03T20:57: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": "ba67d0a24...
1fe098d1-f1fe-4ddb-b39d-a459b13a080e
CesarChaMal/ExerciseCpp
Exercise/Exercise.cpp
// Exercise.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <string> int main(int nNumberofArgs, char* pszArgs[]) { // the outer loop std::cout << "This program sums multiple series\n" << "of numbers. Terminate each sequence\n" << "by entering a neg...
ALGO
0.975754
3.871685
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-12-23T20:57:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f79e0f3a0c...
cc37253f-8468-4ed3-ab85-9269800726cc
yuhenghuang/Leetcode
src/2435_PathsinMatrixWhoseSumIsDivisiblebyK.cpp
#include <local_leetcode.hpp> class Solution { public: int numberOfPaths(vector<vector<int>>& grid, int k) { constexpr int mod = 1e9 + 7; int m = grid.size(); int n = grid[0].size(); int dp[m][n][k]; memset(dp, 0, sizeof(dp)); int sum = grid[0][0]; dp[0][0][sum % k] ...
ALGO
0.999889
6.314131
{ "github_metadata": { "branch": "master", "commit_count": 196, "repo_created_at": "2020-03-22T11:12: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": "7af3b2e8...
94a26b72-9595-45df-b673-014a15f4b82c
leanprover/lean3
src/library/constructions/constructor.cpp
/* Copyright (c) 2016 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Author: <NAME> */ #include "kernel/instantiate.h" #include "kernel/inductive/inductive.h" #include "library/app_builder.h" #include "library/trace.h" #include "library/inductive_compile...
ALGO
0.919829
6.355687
{ "github_metadata": { "branch": "master", "commit_count": 13725, "repo_created_at": "2013-07-17T00:42:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2156, "forks": 218, "issues": 58, "pull_requests": 0 }, "file_meta": { "content_id": "a...
37508e0a-c86d-4478-91c4-25457ce68f22
kindpark/Algorithm_Baekjoon
백준/Gold/3190. 뱀/뱀.cc
#include<iostream> #include<cstdio> #include<queue> #define SNAKE -1 #define APPLE 1 using namespace std; char turn[10001]; int N, K, L, map[101][101], d[]={0,1}, head[2];//head's x y bool canMove(int, int); void changeDir(int &, int &, char &); int main(){ char ch; int i, dx, dy, time; for(scanf("%d%d",&N,...
ALGO
0.999888
3.159766
{ "github_metadata": { "branch": "master", "commit_count": 496, "repo_created_at": "2023-10-10T12:04: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": "44d28e98...
0f2f402e-871f-42d2-99b6-9c66c5dd1638
kipr/opencv
modules/videostab/src/motion_stabilizing.cpp
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
ALGO
0.998728
6.319757
{ "github_metadata": { "branch": "master", "commit_count": 7094, "repo_created_at": "2013-01-27T01:06:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 152, "forks": 340, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "3e5a...
e585b952-931b-4d18-8b75-b776c43e6638
sr-sahed/CSE-Projects
Programming-Languages/C-C++/Competitive-Programming/breadth-first-search.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; void bfs(vector<vector<int>> &graph, int start) { vector<bool> visited(graph.size(), false); queue<int> q; visited[start] = true; q.push(start); while (!q.empty()) { int node = q.front(); q.pop(); ...
ALGO
0.999958
6.269508
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-03-02T10:30: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": "81443c7aa806...
b195389f-168c-47eb-a9b4-ab5d3e7b72ff
salanvoj/active-3d-mapping
private/plan_rays_greedy.cpp
#include <boost/chrono.hpp> #include <cmath> #include <mex.h> #include <omp.h> #include <queue> #include <vector> namespace { class Timer { private: typedef boost::chrono::high_resolution_clock Clock; typedef Clock::time_point Time; typedef boost::chrono::duration<double> Duration; Time start; public:...
ALGO
0.999979
5.898039
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2018-01-22T16:17:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0bbdaa09e...
1eedd0a0-8efd-4697-87fe-8df42dfc6bfd
Roooooobin/Leetcode-Problems
HDU最短路/main.cpp
#include <bits/stdc++.h> #define INF 0x3f3f3f3f using namespace std; const int MAXN = 107; typedef long long LL; typedef vector<int> VI; int n, m; int cost[MAXN][MAXN]; int dist[MAXN]; void init(int n) { for(int i=1; i<=n; i++){ for(int j=1; j<=n; j++){ cost[i][j] = INF; } } } in...
ALGO
0.999973
3.811489
{ "github_metadata": { "branch": "master", "commit_count": 153, "repo_created_at": "2020-01-05T03:27: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": "9a6809ea...
bef9f705-2885-4d8e-ae13-eba126b32d65
i-am-shank/CNinjas_CBlocks_Cplusplus
07. Striver - problems/GraphCodeBeyond/L6/01_kruskalsAlgo.cpp
#include <bits/stdc++.h> using namespace std; typedef pair<int, pair<int,int>> pp; class DSU { private: vector<int> parent; vector<int> size; public: DSU(int n) { for(int i=0; i<=n; i++) { parent.push_back(i); // Self-parent size.push_back(1); // Self-component } } int findParent(int n) { if(n == p...
ALGO
0.999943
4.415871
{ "github_metadata": { "branch": "main", "commit_count": 119, "repo_created_at": "2021-09-15T17:18: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": "5aba6527d1...
a63c7eba-7bc9-4993-bef7-263799499aca
lydrainbowcat/tedukuri
配套光盘/例题/0x60 图论/0x67 Tarjan算法与有向图连通性/Priest John's Busiest Day/POJ3683_sol_1.cpp
#include<iostream> #include<cstdio> #include<cstring> #include<queue> using namespace std; const int u = 2010, w = 3000010; int ver[w], Next[w], head[u], dfn[u], low[u], c[u], s[u], ins[u]; int ver2[w], Next2[w], head2[u], val[u], deg[u], opp[u]; int S[u], T[u], D[u], ex[w], ey[w]; int n, m, tot, tot2, num, t, p, e; qu...
ALGO
0.999963
3.475534
{ "github_metadata": { "branch": "master", "commit_count": 140, "repo_created_at": "2018-03-18T01:24:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2487, "forks": 607, "issues": 15, "pull_requests": 0 }, "file_meta": { "content_id": "a1...
a9874464-f23e-4a41-9ea0-df19ff2cc4ca
open-airlab/VTNMPC-Autonomous-Wind-Turbine-Inspection
WTI_catkin/NMPC_code_generator/ros_acado_bridge/ACADOtoolkit/examples/code_generation/mpc_mhe/kite_carousel.cpp
/* * This file is part of ACADO Toolkit. * * ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization. * Copyright (C) 2008-2014 by <NAME>, <NAME>, * <NAME>, <NAME>, <NAME>. * Developed within the Optimization in Engineering Center (OPTEC) * under supervision of <NAME>. All rig...
ALGO
0.999431
5.560137
{ "github_metadata": { "branch": "main", "commit_count": 64, "repo_created_at": "2022-05-10T08:14:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 30, "forks": 4, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "86ae57c7cad...
adac1986-e4cd-42d5-87a3-9ae37c7eb0b8
DhruboRoyUtsab/Algorithms
QuickSort2.cpp
#include<iostream> using namespace std; // Function to print the elements of the array void printArray(int arr[], int size) { for (int i = 0; i < size; i++) { cout << arr[i] << " "; } cout << endl; } // Function to partition the array into two halves int partition(int arr[], int low, int high) { ...
ALGO
0.999993
6.244435
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-04-14T18:38: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": "3cec5e423409...
b6c61c42-0849-43eb-95a9-7900b48b65b7
AleksandarTulic/Arhitektura-Racunara
Projektni_2/ZAD5/hybrid.cpp
#include <iostream> #include "mpi.h" #include <stdio.h> #include <cstdlib> #include <chrono> #include <time.h> #include <vector> #include <algorithm> #include <omp.h> using namespace std; void merge(int *arr, int size, int *p) { int i = 0; int j = size / 2; int k = 0; while ( i < size / 2 && j < size ){ if ( a...
ALGO
0.999873
4.540274
{ "github_metadata": { "branch": "main", "commit_count": 92, "repo_created_at": "2020-11-21T20:21:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bc10d84b7e3...
c595c544-6297-4b48-a8b2-ba5a4c25572f
BuseVarkan/algorithms_take_home_exams
the2.cpp
#include "the2.h" #include <cmath> // You may write your own helper functions here void counting_sort_ascending(int arr[], int n, int k, long & numberOfIterations, int temp_digit_list[]){ int C[k+1]; int B[n]; for(int i=0; i<=k; i++) { C[i]=0; } for(int j=0; j<n; j++) {...
ALGO
0.999816
4.848172
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2023-02-28T11:29: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": "690d41604b3...
43c58bf4-394a-405b-8c43-eb85bfa7b4b9
spats94/aoc2023
day2/main.cpp
#include <iostream> #include <string> #include <fstream> #include <vector> #include <regex> struct Balls { std::string color = ""; int count = 0; }; struct Round { std::vector<Balls> balls; }; struct Game { std::vector<Round> rounds; }; void read_game(std::string game_raw, Round& round) { const std::regex...
ALGO
0.996523
5.253533
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-12-04T07:14:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f0ac4bb6a2...
fc196fed-8e2d-44ed-8034-4b2d604a3ec9
TiluramSahu/Data-Structure-and-Algorithms
03_swap_alternatives.cpp
#include <iostream> using namespace std; // Function to swap alternate elements in the array void swapAlternte(int arr[], int size){ for(int i=0; i<size; i+=2){ // Increment by 2 to get alternate elements if(i+1<size){ // Check to ensure the next element exists swap(arr[i], arr[i+1]); // Swap t...
ALGO
0.999942
5.925365
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2025-01-24T18:41: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": "01fd547519b...
76423a09-1f64-46a6-882d-b057087d26c7
mm786-mustafa/Disaster-Response-App
EmergencyTree.h
// EmergencyTree.h //emergencies in city tree #ifndef EmergencyTree_h #define EmergencyTree_h #include <iostream> #include <string> using namespace std; class EmergencyTree { private: struct Node { string emergency; Node* left; Node* right; Node(const string& value) : emer...
ALGO
0.980882
4.185003
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-18T18:55: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": "0ed048dee74e...
513cff50-5331-47fa-9704-f2154b828749
ELPSYCONGER/MyWorks
Mergesort.cpp
#include <stdio.h> #include <windows.h> #include <malloc.h> #include <string.h> #include<stdlib.h> #define N 16 void MergeData(int* arr, int left, int mid, int right, int* tmp) { int begin1 = left; int end1 = mid; int begin2 = mid; int end2 = right; int count = left; while ((begin1 < end1) && (begin2 < end2))...
ALGO
0.999954
4.125273
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2019-09-06T08:47:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "34f516947...
790e06c5-057e-4843-8d71-34113ad4c6ed
virrrex/Competitive-Coding
calculus.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define ff first #define ss second #define ll long long #define f(i,n) for(int i = 0; i < n; i++) #define F(i,n) for(ll i = 0; i < n; i++) #define fx(i,x,n) for(int i = x; i < ...
ALGO
0.999982
4.635795
{ "github_metadata": { "branch": "master", "commit_count": 438, "repo_created_at": "2020-10-13T17:27: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": "d63040a2...
a5275bc7-6b0a-4432-bf3a-fb33ad3b083f
peterschussheim/programming_principals_practice
src/ch23/try_this.cpp
#include <iostream> #include <map> #include <string> #include "Mail.h" //------------------------------------------------------------------------------ // find name of the sender in a Message; // return true if found // if found, place sender's name in s: bool find_from_addr(const Message* m, std::string& s); //----...
TOOL
0.944771
5.063266
{ "github_metadata": { "branch": "master", "commit_count": 317, "repo_created_at": "2020-01-16T18:51: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": "063b9bfa...
57d72f31-61d8-4439-a2e8-14c2379012ff
RayCorleone/ChineseChess
Project/src/genmoves.cpp
#include "define.h" #include "pregen.h" #include "position.h" // 棋子保护判断 bool myPosition::ifProtected(int sd, int sqSrc, int sqExcept) const { // 参数"sqExcept"表示排除保护的棋子(指格子编号),考虑被牵制子的保护时,需要排除牵制目标子的保护 int i, sqDst, sqPin, pc, x, y, nSideTag; mySlideMask* lpsmsRank, * lpsmsFile; // 棋子保护判断包括以下几个步骤: nSi...
ALGO
0.999157
3.222309
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-09-10T15:02: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": "688f715499a3...
3a26feea-2539-43c6-9041-0b1c44e7e86e
JimmyCarter5417/leetcode
cpp/0409. Longest Palindrome.cpp
// Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters. // This is case sensitive, for example "Aa" is not considered a palindrome here. // Note: // Assume the length of given string will not exceed 1,010. // Example: // In...
ALGO
0.999961
5.351806
{ "github_metadata": { "branch": "master", "commit_count": 617, "repo_created_at": "2017-10-04T16:00:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "160e8981...
e95e9d03-2f84-460b-a18d-f8a9c1a11b03
pearlrathour/Data-Structures-and-Algorithms
DSA/Dynamic Programming/Grid & 1D/Maximum_sum_nonadj.cpp
#include <bits/stdc++.h> using namespace std; //Memoization O(n), O(n) int sub(int i, int sum, vector<int>& dp, vector<int>& nums){ if(dp[i]!=-1) return dp[i]; if(i<0) return 0; if(i==0) return dp[i]=nums[i]; int pick=nums[i] + sub(i-2,sum,dp,nums); int nonpick=sub(i-1,sum,dp,nums); return d...
ALGO
0.999984
4.35008
{ "github_metadata": { "branch": "main", "commit_count": 92, "repo_created_at": "2022-09-30T09:32:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4757273381c...
5ec5b80b-ee45-4cec-b1f7-2d9b286218d0
mayametodieva/SDA-FMI-2021
Additional tasks/2019-2020/Left profile/Source.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; struct Node { Node* left; Node* right; int value; Node(int value) { this->value = value; this->left = NULL; this->right = NULL; } }; class BST { public: B...
ALGO
0.999988
5.117545
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-12-12T20:08: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": "a4d21390805d...
2ed32b3f-e6ec-462d-9a79-30b5b4d7732a
williewillus/advent_of_code_2018
src/day16.cpp
#include "util.h" #include <algorithm> #include <array> #include <deque> #include <sstream> enum opcode : uint8_t { ADDR, ADDI, MULR, MULI, BANR, BANI, BORR, BORI, SETR, SETI, GTIR, GTRI, GTRR, EQIR, EQRI, EQRR, }; using state = std::array<uint32_t, 4>; static state parse_state(const std::string& s) ...
ALGO
0.996726
5.919456
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2018-12-01T04:50: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": "875190175...
4e1232b4-7e3b-4715-a8cc-c040553d7631
vasucp1207/Comptetive-Programming
math/Finding Prime Factors/583 - Prime Factors.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define f first #define s second #define send {ios_base::sync_with_stdio(false);} #define help {cin.tie(NULL);} ll gcd(ll x,ll y){return y?gcd(y,x%y):x;} ll lcm(ll x, ll y){return x * (y / gcd(x, y));} bool flag[10000000]; vector<int> primes; void...
ALGO
0.999928
4.160745
{ "github_metadata": { "branch": "main", "commit_count": 275, "repo_created_at": "2021-09-18T17:20: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": "adbe310b72...
e56b4400-ed8d-4d02-8d2b-0b111fcde824
leonardoaraujodf/dsa
solutions/cpp/1143/solution.cpp
class Solution { public: string text1; string text2; // Top down // Time complexity: O(n * m) // Space complexity: O(n * m) int longestCommonSubsequence2(string text1, string text2) { this->text1 = text1; this->text2 = text2; vector<vector<int>> memo(text1.size(), vector<...
ALGO
0.999997
6.107422
{ "github_metadata": { "branch": "main", "commit_count": 54, "repo_created_at": "2024-05-01T23:01: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": "75d6267fe26...
358878a5-28bf-4046-8e02-4e0cbcb19057
aayeshat/FYS4150-Project3
src/09/main9a.cpp
#include "Penningtrap.hpp" #include <iostream> #include <string> #include <iomanip> #include <armadillo> using namespace arma; using namespace std; int main() { int t0 = 0; double t = 100.; double N = 100000.; double dt = t / N; double B0 = 96.5; double V0 = 9.65e8; double d = 10e4; ...
ALGO
0.999573
5.107621
{ "github_metadata": { "branch": "main", "commit_count": 86, "repo_created_at": "2021-09-30T20:40:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "089e803b954...
95adbacb-5f02-448d-aad5-e36351df88f3
ishandutta2007/codeforces-m
maxplus/normal/620/D.cpp
#define first f #define second s #include <iostream> #include <cmath> #include <map> #undef first #undef second using namespace std; int64_t n, m, dif, a1, a2, a1a, a1b, a[3000], b[3000]; pair<int64_t, int64_t> a2a, a2b; map<int64_t, int64_t> s; map<int64_t, pair<int64_t, int64_t>> d; int main() { cin >> n; ...
ALGO
0.99998
3.389397
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-06T01:03:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "601b999f3264...
acabbd93-2e53-4351-a2cb-a78f8ae3c588
wo315/peercode
hw2/mass_spring_1455.hpp
/** * @file mass_spring.hpp * Implementation of mass-spring system using Graph */ #include <chrono> #include <fstream> #include <thread> #include "CME212/Color.hpp" #include "CME212/Point.hpp" #include "CME212/Util.hpp" #include "Graph.hpp" // Gravity in meters/sec^2 static constexpr double grav = 9.81; /** Cus...
ALGO
0.996466
5.997801
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2021-04-06T02:47:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3107e9e660...
00062d93-d771-43f1-a03c-aa6ed1fd60c6
liuq901/code
HYSBZ/hy_1544.cpp
#include <cstdio> #include <cstdlib> #include <cstring> struct data { int num,d; int a[4]; }; struct data g[200001],ls[200001],xyz[200001],yzx[200001],zxy[200001]; int w1[200001],w2[200001],w3[200001],map[200001][6]; int main() { void sort(int,int,int,int,int); int i,j,k,n,m,p,q,aim,len; int ans[6],total...
ALGO
0.999947
3.194016
{ "github_metadata": { "branch": "master", "commit_count": 108, "repo_created_at": "2013-09-18T08:58:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6ac4b04d...
a247578a-88dd-45e5-9d90-167f1ff6657e
ishandutta2007/codeforces-v
vercingetorix/normal/1749/D.cpp
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <ctype.h> #include <queue> #include <cstring> #include <set> #include <bitset> #include <map> #include <chrono> #include <random> #include <unordered_map> #include <stdio.h> using namespace std; typedef long long ll; typedef long do...
ALGO
0.999934
4.324642
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:31: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": "8e3b48649f2e...
2c721a8c-a906-49fd-b7e8-5088a61abdc1
YangFengCodeCode/practice
practice-91/practice-91/Test.cpp
#define _CRT_SECURE_NO_WARNINGS 1 #include<iostream> #include<string> #include<vector> using namespace std; //using namespace std; //int main() { // int w, h, count = 0; // cin >> w >> h; // vector<vector<int>> v; // v.resize(w); // for (auto& e : v) // { // e.resize(h, 1); // } // // ...
ALGO
0.999394
3.577109
{ "github_metadata": { "branch": "main", "commit_count": 87, "repo_created_at": "2023-05-31T13:18: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": "8f9e87c1af5...
eb44db3b-6c4e-4526-a53a-4f233c0f0f1d
itoatoi/baekjoon
baekjoon/baekjoon/개념강의_예제_당근마킷_승원이.cpp
//#include <iostream> //#include <queue> //using namespace std; //const int dy[4] = {-1, 0, 1, 0}; //const int dx[4] = {0, 1, 0, -1}; //int n, m, sy, sx, ey, ex, a[104][104], visited[104][104], y, x; //int main() //{ // ios_base::sync_with_stdio(false); // cin.tie(NULL); cout.tie(NULL); // cin >> n >> m; // ...
ALGO
0.999699
4.418773
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2022-04-27T04:53: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": "fd858571909...
b6796ea8-4077-4277-b2fb-a35656de2780
bioexcel/bioexcel-exascale-co-design-benchmarks
GROMACS/nonbonded_benchmark/gromacs_source_code/src/gromacs/mdlib/settle_cuda.h
/* * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2019, by the GROMACS development team, led by * <NAME>, <NAME>, <NAME>, and <NAME>, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. * * GROMACS is f...
ALGO
0.990896
5.585102
{ "github_metadata": { "branch": "master", "commit_count": 83, "repo_created_at": "2019-07-08T11:04:32.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0df1d07f72...
c057d6df-e35b-4f41-aff9-70884e4d9f1a
Mhamuda/CSE3242-Operating_System_and_System_Programming_Lab
SJF.cpp
// Shortest Job First(SJF) Scheduling Algorithm: (Non-Preemptive) #include "bits/stdc++.h" using namespace std; #define ll long long #define pb push_back int main() { freopen("SJFinput.txt", "r", stdin); ll n, i, j, k, l, burst; string proc; cin >> n; vector<ll> waitingTime(n), turnaroundTime(n)...
ALGO
0.999878
4.169206
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2023-02-19T14:20:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0be64377628...
fdbbb0a8-e302-4506-be87-cfe99f9c6490
liulin2012/myLeetcode
RomantoInteger.cpp
/* * Given a roman numeral, convert it to an integer. * * Input is guaranteed to be within the range from 1 to 3999. */ class Solution { public: int romanToInt(string s) { int result = 0; string::iterator iter = s.begin(); while (*iter != 'I' && *iter != 'V' && iter != s.end()) { ...
ALGO
0.999656
5.625272
{ "github_metadata": { "branch": "master", "commit_count": 67, "repo_created_at": "2015-02-12T18:32: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": "b90ae22ca...
bfdc165d-3cc4-42d7-86c7-5086162430d1
raincross7/code-similarity
codes/train_code/problem116/problem116_457.cpp
#include <bits/stdc++.h> #define fast \ ios::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL) #define int long long #define endl '\n' #define all(a) (a).begin(),(a).end() #define Unique(A) (A).resize(distance((A).begin(),unique(al...
ALGO
0.999967
4.24967
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5c473fe5ca20...
45cc64b2-4757-495e-a496-19b7a10d8dd8
Pxguin/cpp
codeforces/contests/1501_to_2000/1942/farm_game.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define F0R(i, a) for (int i = 0; i < (a); i++) ll mod = 998244353; const int MAX_N = 1e6; ll fac[MAX_N+1], inv[MAX_N+1]; ll exp(ll a, ll b) { ll res = 1; while (b) { if (b&1) {b--; res = (res*...
ALGO
0.999947
5.08458
{ "github_metadata": { "branch": "main", "commit_count": 352, "repo_created_at": "2024-01-02T19:14: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": "4d9a1e3b91...
da96e039-2541-473a-bbe1-814b3efc8443
crespo2014/cpp-exam
ch06/unit6.cpp
/* * unit6.h * * Created on: 2 Dec 2014 * Author: lester */ #include <deque> #include <string> #include <iostream> #include <functional> #include <algorithm> using namespace std; template<class T> void print(T start, T end) { for ( ;start != end; ++start) { std::cout << *start << " "; ...
ALGO
0.996741
6.251844
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2014-11-17T18:37: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": "52b4af713...
ac637f17-9a17-49c8-b2ae-d4837c154f91
shab-am/DSA
twoArrayIntersection.cpp
#include<iostream> using namespace std; void printIntersection(int arr1[], int arr2[], int size1, int size2) { for (int i = 0; i < size1; i++) { for (int j = 0; j < size2; j++) { if (arr1[i] == arr2[j]) cout << arr2[j] << " "; } } cout << endl; } int main() { ...
ALGO
0.999871
5.374934
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2024-09-09T16:26: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": "92b57e879ef...
77a26d67-e35f-471a-86b9-cae002ecac74
BaptisteHudyma/MonteCarloTreeSearch
games/tictactoe.cpp
#include "tictactoe.hpp" namespace MCTS { //set player tokens const char Game_State::_playerMarkers[3] = {' ', 'X', 'O'}; float Game_State::get_score() const { int winner = this->get_winner(); if(winner < 0) return 0; else if (winner == 0) return 0.5; ...
ALGO
0.948259
3.927951
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2021-05-07T22:13:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "723c889e4...
508a90a2-a717-4514-beec-b24c1aea851d
GustavoDomingosO/kNN-In-CPP
main.cpp
#include<iostream> #include<string> #include<vector> #include "DataStructure/DataPoint.h" #include "KNearestNeighbor/KNearestNeighbor.h" double euclidianDistance(const DataPoint& _trainingData, const DataPoint& _testData){ std::vector<double> characteristicsTrain = _trainingData.getCaracteristicas(); std::vec...
ALGO
0.964708
5.665602
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-10-31T01:54: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": "f964e8c63bce...
1cbd5d90-dc08-49df-91d5-58519488c106
PTSVU/VUZ
sem-1/proc-prog/2/2.2.cpp
#include <iostream> using namespace std; int main() { double a, x, w; cout << "x= "; cin >> x; cout << "a= "; cin >> a; if (abs(x) < 1 and abs(x) != 0) { w = a * log(abs(x)); if (a != 0) { cout << "w= " << w << endl; } else { ...
ALGO
0.999709
3.826679
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2023-10-14T16:37:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2a40cfdf90...
45c83084-8983-4bce-8805-8c7951885a3f
apache/doris
be/src/olap/rowset/segment_v2/segment_iterator.cpp
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may...
TOOL
0.966597
6.016909
{ "github_metadata": { "branch": "master", "commit_count": 26499, "repo_created_at": "2017-08-10T12:13:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13962, "forks": 3497, "issues": 2697, "pull_requests": 616 }, "file_meta": { "content_i...
fe997531-9534-461c-851e-465632962f44
KATRIN-Experiment/Kassiopeia
KGeoBag/Source/Extensions/Mesh/Navigation/Source/KGNavigableMeshElementSorter.cc
#include "KGNavigableMeshElementSorter.hh" namespace KGeoBag { void KGNavigableMeshElementSorter::ApplyAction(KGMeshNavigationNode* node) { //in this function we distribute the mesh located in a node //to its children if the children intersect the elements if (node->HasChildren()) { //get the list...
ALGO
0.994968
5.810542
{ "github_metadata": { "branch": "main", "commit_count": 376, "repo_created_at": "2013-03-04T20:26:25.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 50, "forks": 29, "issues": 9, "pull_requests": 2 }, "file_meta": { "content_id": "45a858582...
4dd28794-5143-41cf-bba9-8ea656f771f2
abhinavg2002/LeetCode-and-GFG-Solutions
Count Special Numbers - GFG/count-special-numbers.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 countSpecialNumbers(int n, vector<int> a) { unordered_map<int,int> m; for(auto x:a)m[x]++; int ans=0; ...
ALGO
0.999569
5.896862
{ "github_metadata": { "branch": "main", "commit_count": 1548, "repo_created_at": "2022-04-12T08:25: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": "e3b2568fd...
3edd02bf-8be0-4290-9468-6dd9262fc85a
rranjik/ideal-octo-barnacle
1722-MinimizeHammingDistanceAfterSwapOperations.cpp
class Solution { public: vector<vector<int>> adjl; void dfs(int i, unordered_multiset<int>& c, vector<int>& ci, const vector<int>& s){ v[i] = true; c.insert(s[i]); ci.push_back(i); for(const auto& j : adjl[i]){ if(!v[j]) dfs(j, c, ci, s); } } vector<bo...
ALGO
0.999965
5.805849
{ "github_metadata": { "branch": "master", "commit_count": 1637, "repo_created_at": "2018-11-29T16:48:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e358c84...
c6f4a412-ce93-4166-b9d8-2309a434f345
tahanebti/tnlib
algorithms/STL Algorithms/algorithms_test/permutation_test.cpp
std::vector<int> numbers = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; // rotate - rotate the container (like a belt) // More @ https://e...content-available-to-author-only...e.com/w/cpp/algorithm/rotate std::rotate(numbers.begin(), numbers.begin() + 1, numbers.end()); std::cout << "rotate "; ...
ALGO
0.971957
5.21307
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2019-04-17T15:17:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "791489d7f...
db12a51d-050f-4892-8811-f7291662bcea
kukania/SIGMOD23_APX-FTL
algorithm/APXFTL/translation_functions/bf.cpp
#include "./bf.h" #include <math.h> #define ABS(a) (a<0? -a:a) #define EPSILON 0.00000000001f static inline double func(double x, uint32_t member, float target_fpr){ return pow(x, member)+member*(target_fpr-1)*x-(target_fpr*member-member+1); } static inline double deriv_func(double x, uint32_t member, float target_...
ALGO
0.99933
3.897418
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2022-07-12T07:54:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8831c4aa6...
be7a4605-38eb-4b12-bf5c-ce37fa49a948
rahulhalderAERO/nusSU2_Aeroelasticity-Code-Base
SU2_CFD/src/solver_direct_heat.cpp
/*! * \file solution_direct_heat.cpp * \brief Main subrotuines for solving the heat equation * \author <NAME>, <NAME> * \version 5.0.0 "Raven" * * SU2 Lead Developers: Dr. <NAME> (<EMAIL>). * Dr. <NAME> (<EMAIL>). * * SU2 Developers: Prof. <NAME>'s group at Stanford University. * ...
ALGO
0.999429
3.455061
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2020-02-27T08:29:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1c9ff9aeb...
b2c86f95-becd-459e-a7ae-9282648f3076
niloyahmedrasel/Dsa-Problem-Solving
Binary Search/Minimum Number of Days to Make m Bouquets.cpp
//https://leetcode.com/problems/minimum-number-of-days-to-make-m-bouquets/description/ class Solution { public: int getMaxDay(vector<int>bloomDay){ int maxDay = 0; for(int i = 0;i<bloomDay.size();i++){ maxDay = max(maxDay,bloomDay[i]); } return maxDay; } bool g...
ALGO
0.999996
5.729391
{ "github_metadata": { "branch": "main", "commit_count": 61, "repo_created_at": "2024-08-16T17:25:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7329538e5bb...
39f8acee-3015-4d59-8290-6c5f8c5321fe
HassnHamada/CP-Solutions
101911C.cpp
#include <bits/stdc++.h> // #include <chrono> using namespace std; // using namespace std::chrono; // typedef long long int ll; const int N = 2e5 + 10; int arr[N]; int gcd(int a, int b) { return b ? gcd(b, a % b) : a; } int lcm(int a, int b) { return 1ll * a * b / gcd(a, b); } bool ok(int n) { bool ret ...
ALGO
0.999979
3.75295
{ "github_metadata": { "branch": "master", "commit_count": 84, "repo_created_at": "2022-02-11T19:29:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "e6ae027bd...
9f2d0b34-9a46-4dfa-bad3-e9868ccf4330
X1-McFly/SDC_Arduino_Code
arduino1.ino/arduino1.ino
/* * Bearing Ball Sorting Machine * By <NAME>, <NAME>, and <NAME> * * * Uses an Arduino Mega 2560 to control servos, solenoids, and sensors * to sort different types of bearing balls (Steel, Brass, Nylon) * based on color detection. * * Begin program by connecting to the Arduino Serial Monitor and sending ...
ALGO
0.988759
4.98763
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2025-04-02T21:35:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "ee5e9228e6f...
67b5a50d-66f0-4fec-aed4-e14f61dd9dbc
RealNykson/JNIWrapperResults
net/minecraft/client/searchtree/IdSearchTree.cpp
#include "IdSearchTree.hpp" std::string IdSearchTree::mapping = "gug"; jclass IdSearchTree::jClass = { nullptr }; JNIHelper::JNIField<jobject,IdSearchTree> IdSearchTree::additionOrder_s = { "a", "Ljava.util.Comparator;" }; JNIHelper::JNIField<ResourceLocationSearchTree,IdSearchTree> IdSearchTree::resourceLocationSearc...
ALGO
0.937392
3.043293
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2025-01-18T03:16: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": "f1cb970f8e...