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
da280d64-c73a-4aaf-aa50-b5c75388999f
Karmah24/Algorithms
Codeforces_Revisit/cf_domino_easy_version.cpp
#include <bits/stdc++.h> using namespace std; //================================================================ bool solve(int n, int m, int k) { if (n % 2 == 0 && m % 2 == 0) return k % 2 == 0; if (n % 2 == 0 && m % 2 != 0) { int v = (n * m) / 2 - k; return v >= n/ 2 && solve(n, m - 1, k); ...
ALGO
0.999948
5.77143
{ "github_metadata": { "branch": "main", "commit_count": 77, "repo_created_at": "2021-05-11T18:06: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": "a3f00da714c...
c7586ab3-6990-4d01-be2c-3648f8861841
LZ1DPN/SDR-cw-transmitter
si570xTX/old/New folder/ad9851xEK1A (2).ino
/* Revision 1.0 - Main code by <NAME> AD7C - www.ad7c.com Revision 2.0 - November 6th, 2013... ever so slight revision by VK8BN for AD9851 chip Feb 24 2014 Revision 3.0 - April, 2016 - AD9851 + ARDUINO PRO NANO + integrate cw decoder (by LZ1DPN) (uncontinued version) Revision 4.0 - May 31, 2016 - deintegrate cw deco...
TOOL
0.916685
4.896076
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2017-09-09T19:09:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "14b9c7b3c...
4b181643-2cd3-4e49-948a-cb3dd197457d
nomanhossainn/Data_Structures_Algorithms
Class7/Class Time Codes/02.cpp
#include<iostream> using namespace std; // int P[] = {200, 150, 100, 50, 300}; // Array of profits // int W[] = {3, 2, 1, 2, 5}; int P[] = {12,10,20,15}; int W[] = {2,1,3,2}; // Array of weights // Recursive function to solve the 0/1 knapsack problem int knapsack01(int C, int i) { // Base case: if capac...
ALGO
0.999992
5.75443
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2025-06-03T22:33:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4fd4f0820...
a2a159cf-932c-469b-a528-00828f672471
asgolovin/ising-model
src/evaluate.cpp
#include "evaluate.h" #include <cmath> #include <deque> #include <iostream> #include <thread> void evaluate(std::vector<double> parameters, int numBlocks, int size, MessageQueue<std::vector<double>> *queue) { double J = parameters[0]; // coupling constant double B = parameters[1]; ...
ALGO
0.990394
5.099
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2020-04-23T10:30: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": "61848ae08...
ccf32e4e-4d4f-4799-911b-73f62a68ab62
Harsh-pate1/u23ai125_OOP
assignment_3/6a_mean_friend.cpp
// Experiment 6a: Write a program to find mean of two numbers belonging to two different classes using friend function. #include <bits/stdc++.h> using namespace std; // Forward declaration of class B class B; class A { private: float numA; public: // Constructor to initialize numA A(float a = 0) : numA(a...
ALGO
0.997081
5.957508
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-11-27T06:11: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": "57aa59157997...
b8c2373e-656c-4578-9292-b378a4bc6051
7oSkaaa/LeetCode_DailyChallenge_2023
02- February/26- Edit Distance/26- Edit Distance (Nayra Mohammed).cpp
// Author: <NAME> #define sz(s) (int(s.size())) #define MemS(s, x) memset(s, x, sizeof(s)) int dp[500][500];//for memoization class Solution { public: /* - To make word1 equal to word2, we have the following options for string word1: * Replace a specific chara...
ALGO
0.999998
4.818208
{ "github_metadata": { "branch": "main", "commit_count": 6874, "repo_created_at": "2023-01-02T11:28:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 104, "forks": 86, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "cd1abc...
5c1db67c-c42f-4261-8c60-3ef580010e64
subodhnarayan/100DayofCoding
day446.cpp
-- -- -- -- -- -- -- -- -GFG - POTD - 07 / 04 / 2025 -- -- -- -- -- -- -- -- -- -- -- -- -- ------- Directed Graph Cycle Difficulty: MediumAccuracy: 27.88%Submissions: 467K+Points: 4 Given a Directed Graph with V vertices (Numbered from 0 to V-1) and E edges, check whether it contains any cycle or not. The graph is re...
ALGO
0.999966
6.126585
{ "github_metadata": { "branch": "main", "commit_count": 1744, "repo_created_at": "2024-05-01T06:51:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3c1ccf86f...
dc2a1695-64ea-4388-972f-90dbbe4990c6
cormackikkert/competitive-programming
CodeForces/Educational 88/C.cpp
#include <bits/stdc++.h> using namespace std; #define FOR(i,a,b) for (int i = (a); i < (b); ++i) #define F0R(i,a) FOR(i,0,a) #define ROF(i,a,b) for (int i = (b)-1; i >= (a); --i) #define R0F(i,a) ROF(i,0,a) using ll = long long; using ld = long double; ll INF = LLONG_MAX; using vi = vector<int>; using vll = vector<l...
ALGO
0.999863
3.896237
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2020-05-25T12:47: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": "58fdd66b1...
6eb7a08b-eb02-4880-a052-c7c4e86ab28b
dixmw34/Algorithm_PS
์ฝ”๋“œํฌ์Šค/#658_D.cpp
#include <iostream> #include <algorithm> #include <vector> #include <string> #include <stack> #include <queue> #include <deque> #include <cmath> #include <map> #include <unordered_map> #include <set> #include <climits> #include <string.h> #include <iomanip> #define INF 987654321 using namespace std; typedef pair<int...
ALGO
0.999892
4.203506
{ "github_metadata": { "branch": "master", "commit_count": 90, "repo_created_at": "2020-08-07T04:33:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "59de9f4d7...
3066ed92-c039-4649-8cdd-d0e2c28e1166
Hamirifou/linked_lists
main.cpp
#include "list.c" #include "list.h" #include "personne.h" #include "listpersonne.c" #include <stdio.h> #include <iostream> int main () { Liste* lp = creerliste (0, ecrirePersonne, comparerPersonne); bool fini = faux; while (!fini) { switch (menu () ) { case 0: fini = vrai; break; case 1 : { ...
TOOL
0.972411
3.567072
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2022-03-14T16:40: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": "e521f172c9...
748c22a6-16c8-4474-83b0-3f4cb22ee95d
ishandutta2007/codeforces-e
elegia/normal/1366/C.cpp
#include <bits/stdc++.h> #define LOG(FMT...) fprintf(stderr, FMT) #define fir first #define sec second using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector<int> vi; // mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); template <class T> istream& operator>>(i...
ALGO
0.999979
4.187437
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:34: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": "3307cef0c6c0...
c550ca1a-0151-4810-b183-61ad5168dc70
naoyat/topcoder
fileedit/2009/shakyou/453.5/neal_wu_250.cc
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits> #...
ALGO
0.999793
3.834193
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2009-04-15T11:58: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": "1087a6ee3...
5ab1991a-c72f-44ec-84b6-4916b41d6c8a
cms-sw/cmssw
RecoTracker/SingleTrackPattern/src/CosmicTrajectoryBuilder.cc
// // Package: RecoTracker/SingleTrackPattern // Class: CosmicTrajectoryBuilder // Original Author: <NAME>-INFN perugia #include <vector> #include <iostream> #include <cmath> #include "RecoTracker/SingleTrackPattern/interface/CosmicTrajectoryBuilder.h" #include "DataFormats/Common/interface/OwnVecto...
ALGO
0.984517
4.933849
{ "github_metadata": { "branch": "master", "commit_count": 251237, "repo_created_at": "2013-06-26T14:09:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1144, "forks": 4480, "issues": 947, "pull_requests": 108 }, "file_meta": { "content_id...
3ae2b1b2-3032-4ae2-a38c-842aab5d38b8
burningcherry97/AoC-2022
17/P1/program.cpp
#include <algorithm> #include <array> #include <fstream> #include <iostream> #include <utility> #include <vector> using namespace std; int main(int argc, char const *argv[]) { ifstream in{"input.txt"}; string gas_pattern; in >> gas_pattern; in.close(); // cout << gas; vector<array<char, 7>> cavern; cavern.pu...
ALGO
0.999933
3.954159
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2023-03-23T12:54: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": "3ff788858...
6c658cd4-e359-4416-aae9-93ce20e2d5ec
mehrab-abir/Data-Structures-and-Algorithms_CPP
Data Structures/Doubly_Linked_List/insert-at-head/insert-at-head.cpp
#define _CRT_SECURE_NO_WARNINGS #include<iostream> using namespace std; class Node { public: int value; Node* next; Node* prev; Node(int value) { this->value = value; this->next = NULL; this->prev = NULL; } }; //insert at head void insert_at_head(Node*& head, Node*& tail, int value) { Node* newnode = ne...
ALGO
0.999793
4.597079
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2025-05-05T23:50: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": "6dbd1ea5664...
75578880-e5ef-484c-b345-9afaca484ddf
vaniseth/Advanced-Programming
Binomial Tree and Heap/Q3_delete.cpp
#include <iostream> #include <list> #include <vector> using namespace std; NodePtr deleteMin() { NodePtr (curr = head); NodePtr (prevMin = nullptr); NodePtr (minPtr = nullptr); NodePtr (prevPtr = nullptr_; int min = 999999; while (curr != nullptr) { if (curr->data <= min) { ...
ALGO
0.999907
4.003091
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2023-05-03T18:13:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2120bfc6713...
9ec351a5-93d6-4b17-a251-63a0026bea67
wjhssfs/myLeetcode
300/367ValidPerfectSquare.hpp
// 367. Valid Perfect Square // Given a positive integer num, write a function which returns True if num is a perfect square else False. // Note: Do not use any built-in library function such as sqrt. // Example 1: // Input: 16 // Returns: True // Example 2: // Input: 14 // Returns: False class Solution { public: ...
ALGO
0.999608
5.569324
{ "github_metadata": { "branch": "master", "commit_count": 628, "repo_created_at": "2015-03-15T19:18:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4b4ae995...
f580e9f6-6e62-4c0b-902c-0f6ed0d6e9b8
Torivlu/Linguagem-C
exercicio 7 - lista 3.cpp
#include <stdio.h> int encontrarMaiorValor(int v[], int n) { int maior = v[0]; int posicao = 0; for (int i = 1; i < n; i++) { if (v[i] > maior) { maior = v[i]; posicao = i; } } return posicao; } int main() { int n; printf("Digite o n...
ALGO
0.999976
5.048434
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2024-11-25T00:19: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": "a129f7faae1...
e7fa7853-dde0-479b-9223-80f50e37c44a
cigar1920/testprogram
fdlibm1028/s_nexttoward.cop_p.cpp
#include "../ScDebug/scdebug.h" /* s_nexttoward.c * Special i387 version * Conversion from s_nextafter.c by <NAME>, Cygnus Support, * <EMAIL>. */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. * * Developed at SunPro, a Sun Microsys...
TOOL
0.97475
5.349789
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-01-06T13:12:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9a3129f78339...
133d9702-ef1d-4906-a08d-bce7898c13d7
diptomistry/AlgorithmCPP
algoD/extendedProblem.cpp
#include<bits/stdc++.h> using namespace std; // Define a structure to represent an edge between two regions. struct Edge { int region1, region2, latency; Edge(int r1, int r2, int lat) : region1(r1), region2(r2), latency(lat) {} // Overload the less-than operator for sorting edges by latency....
ALGO
0.999991
6.566885
{ "github_metadata": { "branch": "main", "commit_count": 53, "repo_created_at": "2023-07-29T17:57:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b31f676811a...
54a2a22d-fae6-4db3-8da9-186e24589329
Kalit31/cp-playground
AtCoder/BeginnerContests/190/C.cpp
#pragma GCC optimize("Ofast") #pragma GCC optimization("unroll-loops") #pragma GCC target("avx,avx2,fma") #include <bits/stdc++.h> using namespace std; #define ll long long int #define deb(x) cout << #x << " " << x << endl; #define mod 1000000007 #define fast std::ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NU...
ALGO
0.99998
3.852605
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2019-12-14T13:01:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f579c519c...
64ee01b1-5344-47d4-a98d-237dac01aec9
JINwonLEE/genuine
LeetCode/Word_Search2.cc
class Solution { public: int row; int col; vector<string> findWords(vector<vector<char>>& board, vector<string>& words) { vector<string> result; row = board.size(); col = board[0].size(); for (int i = 0; i < words.size(); i++) { for (int j = 0; j < row; j...
ALGO
0.999883
6.470097
{ "github_metadata": { "branch": "master", "commit_count": 264, "repo_created_at": "2017-10-08T10:46: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": "ba7288e8...
ec4eaf8f-ad54-4813-85b8-6a84bb8b3bfe
south37/atcoder
edu_dp/o/o.cpp
// ref. https://juppy.hatenablog.com/entry/2019/03/19/Educational_DP_Contest%28EDPC%29_M~P_Python_%E7%AB%B6%E6%8A%80%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0_Atcoder #include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <functional> #include <iomanip> #include <iostr...
ALGO
0.999983
4.287837
{ "github_metadata": { "branch": "master", "commit_count": 1210, "repo_created_at": "2019-08-04T11:48:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d162a94...
4cb9abb6-7699-4ac9-a696-76f4046b89e0
raghav-aditya/competitive_programming
Practice/CodeForces/Tree_painting_.cpp
/* Author: <NAME> [ zerojude ] INDIA */ // https://codeforces.com/contest/1187/problem/E #include <iostream> #include <bits/stdc++.h> using namespace std; #define int long long #define all(x) begin(x) , end(x) #define mask(i) (1LL << (i)) #define vi vector<int> #define vvi vector<vi> const int mod = pow(10,9)+7 ...
ALGO
0.998277
4.257366
{ "github_metadata": { "branch": "main", "commit_count": 48, "repo_created_at": "2023-10-01T08:55:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a09a1891731...
a5c90c71-a963-4fe9-8a9c-1a16a863f6d7
Marcos30004347/AzgardEngine
dependencies/ScalableVectorTriangulator/include/vec-t/shape.h
#ifndef UTILS_SHAPE_H #define UTILS_SHAPE_H #include <vector> #include <array> #include "math.h" struct point{ float x, y; int winding_number; std::array<float, 2> normal; std::array<float, 4> color; point(float _x, float _y ) { x = _x; y = _y; winding_number = 0; normal = {0.0f, 0.0f}; color = {0.0...
TOOL
0.933327
5.829616
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2020-08-22T03:08:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b9b10bcc33...
292cd576-6d2f-4d18-b11c-5885378ffe89
RobotLocomotion/drake
geometry/proximity/bvh.h
#pragma once #include <array> #include <memory> #include <stack> #include <utility> #include <variant> #include <vector> #include "drake/common/copyable_unique_ptr.h" #include "drake/common/drake_assert.h" #include "drake/common/drake_copyable.h" #include "drake/common/eigen_types.h" #include "drake/geometry/proximit...
ALGO
0.997766
6.889265
{ "github_metadata": { "branch": "master", "commit_count": 33726, "repo_created_at": "2014-01-26T16:11:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3630, "forks": 1305, "issues": 690, "pull_requests": 46 }, "file_meta": { "content_id":...
ca2b7501-0e81-443a-ba25-172756f9262f
Mann-Chandarana/Leetcode_Challenges
Sliding_Window/LTC13.cpp
/*-------- Medium -----------*/ /*- K Radius Subarray Averages -*/ //////// Question number 2090. #include <bits/stdc++.h> using namespace std; vector<int> getAverages(vector<int> &nums, int k) { int n = nums.size(); if (k == 0) return nums; vector<int> result(n, -1); if (n < 2 * k + 1) ...
ALGO
0.999845
5.36839
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2023-10-14T18:31: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": "00bd5688fc4...
4f936543-28b9-429b-a914-755e1da6df51
willcod/LeetcodeSolution
source/93.ๅคๅŽŸipๅœฐๅ€.cpp
/* * @lc app=leetcode.cn id=93 lang=cpp * * [93] ๅคๅŽŸIPๅœฐๅ€ */ #include "cpp_includes.h" // @lc code=start class Solution { public: vector<string> restoreIpAddresses(string s) { vector<string> res; int n = s.length(); for (int i = 1; i <= 3; i++) { for (int j = 1; j <= 3 && i ...
ALGO
0.999795
6.125914
{ "github_metadata": { "branch": "master", "commit_count": 338, "repo_created_at": "2020-08-16T07:48: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": "06425738...
41fa54bc-43ed-47b6-b6eb-4d27c2d50e13
QianMo/GPU-Gems-Book-Source-Code
GPU-Gems-2-CD-Content/Image-Oriented_Computing/Ch_37_Octree_Textures_on_the_GPU/src/liboctreegpu/MgcBox3.cpp
// Magic Software, Inc. // http://www.magic-software.com // Copyright (c) 2000-2002. All Rights Reserved // // Source code from Magic Software is supplied under the terms of a license // agreement and may not be copied or disclosed except in accordance with the // terms of that agreement. The various license agreemen...
TOOL
0.989852
3.476839
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2018-04-21T15:43:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1080, "forks": 449, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "4789...
b6ab37d8-1153-4639-bee4-a70393c39ec7
nepda/ds-ha
ha-4/src/main.cpp
/** * Datenstrukturen SS2012 - Hausaufgabe 4 * // main.cpp * * ACHTUNG! * Die Umwandlung der Zahlen in integer-Werte in der Methode DyaTreeMapper::str2int() * funktioniert (noch) nicht so wie gewuenscht. Es entstehen komische Zahlen, vermutlich einfach * zu beheben. * * @author <NAME> 247041 <<EMAIL>> ...
ALGO
0.987363
3.846371
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2012-05-04T10:13: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": "33f3cdc7a...
c1000a7c-16f5-481d-bd58-c4ab0abbf3a5
abhi-si/DSA-gfg
Difficulty: Easy/Closest Strings/closest-strings.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function template for C++ class Solution{ public: int shortestDistance(vector<string> &s, string word1, string word2) { int i1 = -1; int i2 = -1; int minDistance = INT_MAX; for (int ...
ALGO
0.999962
5.739498
{ "github_metadata": { "branch": "main", "commit_count": 257, "repo_created_at": "2024-06-04T17:53: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": "5f6c7c4852...
6fb2836a-dbed-430c-8177-8b2cee98d4f7
hieugomeister/ASU
CPPIOHAD/9780672335679_TYCPP-7E_Code/Chapter 21/21.7 BinarySortPredicate/21.7 BinarySortPredicate/21.7 BinarySortPredicate.cpp
#include <algorithm> #include <string> using namespace std; class CompareStringNoCase { public: bool operator () (const string& str1, const string& str2) const { string str1LowerCase; // Assign space str1LowerCase.resize (str1.size ()); // Convert every character to the lower case tran...
ALGO
0.99916
5.864748
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2017-05-12T03:17:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "499a015d64...
11e7e79e-cc22-4e82-beae-4e4902b81ebb
Prajjwalkr1999/Codes
Competitive coding/Codechef/Long Challenge/july_chefinaswaps.cpp
#include<bits/stdc++.h> using namespace std; #define int long long int #define P pair<int,int> #define pb push_back #define F first #define S second const int N=15; int pr[N]; vector<int> primes; void sieve() { int i, j; for (i = 2; i < N; i++) { if (!pr[i]) { primes.pb(i); for...
ALGO
0.999969
3.729305
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-10-22T09:07: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": "7c96979cad...
719eb23d-ca36-4e18-872e-cdd9d703bdb1
rjenez/W266-final-project
data/programming-homework-dataset-plagiarism-detection/src/B2017/Z4/Z1/student1551.cpp
/B2017/2018: Zadaฤ‡a 4, Zadatak 1 #include <iostream> #include <stdexcept> #include <tuple> #include <cmath> #include <vector> #include <new> #include <memory> #include <algorithm> const double pi=4*atan(1); const double epsilon=pow(10,-10); class Kugla { double x,y,z,r; public: explicit Kugla(double r = ...
ALGO
0.975156
4.714407
{ "github_metadata": { "branch": "main", "commit_count": 125, "repo_created_at": "2022-02-09T00:45:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "acb32d6391...
6f8475a5-18a5-43e0-a4ef-53f6e581c24d
StalinMazaEpn/ejercicios_cpp
ejercicio_ordenamiento.cpp
#include <iostream> #include <time.h> using namespace std; void burbuja(int TAM, int lista[]); void imprimir(int TAM, int lista[]); void insercion(int lista[], int TAM); void seleccion(int TAM, int lista[]); void shell(int TAM, int lista[]); void quickSort(int lista[], int left, int right); void makeheap ( int lista[...
ALGO
0.999955
5.010668
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2018-11-07T01:36:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "890ba26ec...
ac544843-a291-4dac-9170-aeca24bc688d
darrenleeleelee1/Detailed_Router_Verifier
src/verifier.cpp
#include <iostream> #include "ds.hpp" #include "verifier.hpp" #include <deque> bool verifier::checkSegmentOverlapping(Layout *layout){ bool pass = true; std::vector<std::vector<std::vector<Grid>>> grid; grid.resize(layout->width+1); for (int i = 0; i <= layout->width; i++) { grid[i].resize(layou...
TOOL
0.979752
4.80163
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2023-02-09T03:19:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2dc875bf902...
1a30ac96-d80b-4971-b22e-56d550d46267
ishandutta2007/codeforces-s
ssrs_/normal/696/D.cpp
#include <bits/stdc++.h> using namespace std; long long INF = 1000000000000; int MAX = 10000; int count_substring(string s, string t){ int N = s.size(); int M = t.size(); if (N < M){ return 0; } else { int ans = 0; for (int i = 0; i <= N - M; i++){ if (s.substr(i, M) == t){ ans++; ...
ALGO
0.999858
4.220126
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fb4070347948...
ed521eee-0a9a-48e1-9968-9a06f74c494f
darkscyla/Marching-Squares
marchingCubes/src/MarchingSquares.cpp
// Internal Includes #include "MarchingSquares.h" #include "Node.h" #include "Edge.h" // Standard includes #include <iostream> namespace marching_squares { /** * Converts the binary array to a single int * * @param arr Array containing the bool values * @param size The size if the array (see array decay) * * @...
ALGO
0.999932
6.923466
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2021-01-30T13:41:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "321c0f36c...
eaf2130d-8eb7-4a43-8948-13c067394881
SnehaBakshi14/LeetCode
1730-special-array-with-x-elements-greater-than-or-equal-x/special-array-with-x-elements-greater-than-or-equal-x.cpp
class Solution { public: //Approach 1 for + binary serach // int specialArray(vector<int>& nums) { // sort(begin(nums), end(nums)); // int n = nums.size(); // for(int x = 0; x <=n; x++) { // int i = lower_bound(begin(nums), end(nums), x) - begin(nums); // ...
ALGO
0.999984
5.445592
{ "github_metadata": { "branch": "main", "commit_count": 437, "repo_created_at": "2024-05-23T10:10: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": "ebb38ad046...
e10eec15-b7f8-4a3c-832f-3dde6b6038e0
RaulitoGC/competitive-programming
online-judge/tca-2020/contest-9/L.cpp
#include <bits/stdc++.h> using namespace std; #define test() cerr<<"Hello Family"<<"\n" #define sz(array) (int)array.size() #define mset(array,value) memset(array,value,sizeof(array)) // [0] or [-1] #define mp make_pair #define pb push_back #define fi first #define se second #define popb pop_back #define exist(um, v...
ALGO
0.999803
3.985528
{ "github_metadata": { "branch": "master", "commit_count": 480, "repo_created_at": "2015-03-03T01:01: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": "ff8b7ba1...
16bc3ed0-c28d-4ae3-8520-08240c5aa80c
Jitender-52/Leetcode
0238-product-of-array-except-self/0238-product-of-array-except-self.cpp
class Solution { public: // Runtime: 16 ms, faster than 59.62% of C++ online submissions for Product of Array Except Self. // Memory Usage: 27.5 MB, less than 13.83% of C++ online submissions for Product of Array Except Self. vector<int> productExceptSelf(vector<int>& nums) { int n = nums.size...
ALGO
0.999966
6.450333
{ "github_metadata": { "branch": "main", "commit_count": 3177, "repo_created_at": "2023-01-06T06:22:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a1225573b...
7034c00d-2790-4750-8a77-3ce0828dc755
LyuPallu/Cartoonifier
Cartoonifier_Desktop/Cartoonifier_Desktop/blurs.cpp
//#include "StdAfx.h" #include <stdio.h> #include "stdlib.h" #include <tchar.h> //#include <cv.h> #include "C:/opencv/build/include/opencv/cv.h" #include "C:/opencv/build/include/opencv2/opencv.hpp" #include <C:/opencv/build/include/opencv/highgui.h> #include <C:/opencv/build/include/opencv2/highgui.hpp> #include <mat...
TOOL
0.946458
3.79388
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-08-29T05:46: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": "f21902ddbb...
380c140d-c40a-4931-946b-01fbcb690d22
vbonnici/grafe-sim
analysis/data/p01267/s385620640.cpp
#include <bits/stdc++.h> using namespace std; #define LOG(...) fprintf(stderr,__VA_ARGS__) //#define LOG(...) #define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);++i) #define RFOR(i,a,b) for(int i=(int)(b-1);i>=(int)(a);--i) #define REP(i,n) for(int i=0;i<(int)(n);++i) #define RREP(i,n) for(int i=(int)(n-1);i>=0;--i) #d...
ALGO
0.999483
3.287502
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-07-10T13:21: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": "7b9913c3181...
9b9854e3-bbba-4bcc-a3b8-9841c681dd24
dedobbin/set_demo
src/strategy/handrolled_binary_search.cpp
#include <algorithm> #include "strategy/handrolled_binary_search.h" int find_place_to_insert(const std::vector<std::string> &list, std::string element) { int low = 0; int high = list.size() -1; while (low <= high){ int mid = low + (high-low)/2; if (list[mid] == element){ retur...
ALGO
0.999506
6.091492
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2024-05-12T19:57:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f0bec7abf...
b8b012ed-45a4-4f63-90ed-ca115158c184
bilgili/Voreen
modules/base/processors/volume/volumecombine.cpp
/*********************************************************************************** * * * Voreen - The Volume Rendering Engine * * ...
ALGO
0.909647
6.950685
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2013-12-13T11:13:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 23, "forks": 17, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "abdd8c4...
18ce524e-276a-41d9-bbfb-7bdf8eb3eed6
CrisLayB/Redes_Lab02
fletcherchecksum/FletcherChecksum.cpp
/********************* * Universidad del Valle de Guatemala * Redes - Secciรณn 10 * Laboratorio 2 * * C++ (Receptor) * * Autores: [ * <NAME>, * <NAME> * ] ********************/ #include <fstream> #include <iostream> #include <vector> #include <bitset> #include <algorithm> #include <string> #includ...
WEB
0.9166
5.497534
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2023-07-30T02:15:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a78123fc80d...
977c44fc-4f0d-410f-8baf-165bec957250
kaylwin/RRT-2D-Rotation
ui/helper.cpp
#include <memory> #include <random> #include <iostream> #include <box2d/b2_world.h> #include <box2d/b2_body.h> #include <box2d/b2_polygon_shape.h> #include <box2d/b2_fixture.h> #include <box2d/b2_joint.h> #include <box2d/b2_distance_joint.h> #include <box2d/b2_gear_joint.h> #include <box2d/b2_time_of_impact.h> #include...
ALGO
0.997644
4.022915
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-01-31T00:54: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": "7f2409c443a4...
609dbea6-1bee-47cc-b19c-b3faf7bde45f
MadG0blin359/CPP-CodeGlitch
Practice DSA/DSA Lab/Lab Tasks/Task 10/task1.cpp
#include <iostream> using namespace std; class Node { public: int data; Node* left; Node* right; Node(int d) : data(d), left(NULL), right(NULL) {} }; class AVL { Node* root; int getHeight(Node* node) { if (node == NULL) return -1; int leftHeight = getHeight(node->left); int rightHeight = getHeight(nod...
ALGO
0.997487
5.387097
{ "github_metadata": { "branch": "main", "commit_count": 128, "repo_created_at": "2024-06-09T09:10:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "97a1bed671...
b1311c9f-869e-4977-a58d-c0bfcee5f947
giavothoi/code-ATBMTT
vigenere_12.cpp
#include<bits/stdc++.h> using namespace std; string arr = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; string autokey(string s,string key){ string t = ""; string k = ""; k = key; int j=0; for(int i =0;i<s.length()-key.length();i++){ k += s[i]; } for(int i=0;i<s.length();i++){ int p = s[i]-'A'; int q = k[i]-'A'; int ...
ALGO
0.999989
4.327477
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-04-22T16:37:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1854005960...
a2fc1bc0-5b8d-4166-a3b6-5a281bffedd3
sibasish14/Competitve_Programming
Competitve_Programming/Codechef/SnackDown 2018/SNCK1A19/ARRGRAPH.cpp
#include<bits/stdc++.h> #define mod 1000000007 #define F first #define S second using namespace std; typedef long long int ll; int prime[]={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47}; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int t; cin>>t; while(t--) { ...
ALGO
0.999893
3.373868
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2018-03-16T14:05:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "28d3bb385...
33bdf432-e73b-453d-9e52-593869016f68
vmarcin/FIT-projects
avs/proj2/proj/parallel_builder/tree_mesh_builder.cpp
/** * @file tree_mesh_builder.cpp * * @author <NAME> <<EMAIL>> * * @brief Parallel Marching Cubes implementation using OpenMP tasks + octree early elimination * * @date 15.12.2019 **/ #include <iostream> #include <math.h> #include <limits> #include <omp.h> #include "tree_mesh_builder.h" TreeMeshBuil...
ALGO
0.995056
5.858813
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-08-19T14:20: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": "61afd00a17e4...
0abff7dc-7081-4294-93ec-b41558417e46
alanglk/KISA_LOP
GeneticAlgorithm/src/GA_testing/Mutation/swap_testing.cpp
#include "IO.hpp" #include "memory.hpp" #include "LOP.hpp" #include "GA/mutation.hpp" #include <iostream> #include <memory> #include <stdio.h> #include <string.h> #include <chrono> int test(int n_test, char *file1, char *file2){ printf("Ejecutando tests del operador swap...\n"); int *solution = NULL, *ma...
TEST
0.961052
4.626262
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2025-01-14T17:37:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9531b090a5a...
75b78503-d925-4e26-90a6-1ca63302cb97
JeongSeoJin/arduino
robot_arm_v3/multiStepperTest/multiStepperTest.ino
// MultiStepper.pde // -*- mode: C++ -*- // Use MultiStepper class to manage multiple steppers and make them all move to // the same position at the same time for linear 2d (or 3d) motion. #include <AccelStepper.h> #include <MultiStepper.h> const int step1 = 2; const int step2 = 3; const int step3 = 4; const int d...
TOOL
0.965151
7.559637
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2020-11-14T15:48:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8b79c10b02...
4a13d173-b5c7-4d91-bb23-7945e254e62d
gdpande97/CSE240C
Sim3/ChampSim_CRC2/example/asdrp.cc
//////////////////////////////////////////// // // // LIME replacement policy // // // //////////////////////////////////////////// //////////////////////////////////////////// // // // ...
ALGO
0.988114
3.516615
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2022-01-27T21:21: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": "25269fa189e...
9219bfd7-7ddf-4e90-97d4-7f3d7f1016c6
sachuverma/DataStructures-Algorithms
Leetcode Daily Challenge/September-2021/15. Longest Turbulent Subarray.cpp
/* Longest Turbulent Subarray ========================== Given an integer array arr, return the length of a maximum size turbulent subarray of arr. A subarray is turbulent if the comparison sign flips between each adjacent pair of elements in the subarray. More formally, a subarray [arr[i], arr[i + 1], ..., arr[j]] ...
ALGO
0.999941
5.899727
{ "github_metadata": { "branch": "master", "commit_count": 1430, "repo_created_at": "2020-10-07T10:08:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2049, "forks": 541, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "03...
67128859-8a3b-4c08-b04f-41901a7bb846
parasjain99/Cryptography-Lab
Lab_4/vigenere.cpp
#include<bits/stdc++.h> using namespace std; string encrypt(string s, string key){ string ans = ""; int len = key.length(); for(int i=0;i<s.length();i++){ if (s[i] >= 'a' and s[i] <= 'z'){ char ch = (((s[i] - 'a') + (key[i % len] - 'a')) % 26) + 'a'; ans += ch; } ...
ALGO
0.999747
4.423736
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-01-31T10:48: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": "8f481d806a74...
06b33009-9bfe-4a6a-a03c-6558545a217b
paulbovbel/frontier_exploration
frontier_exploration/src/frontier_plugin.cpp
#include <pluginlib/class_list_macros.h> #include <frontier_exploration/frontier_plugin.h> #include <exploration_server/base_plugin.h> #include <visualization_msgs/Marker.h> #include <list> #include <vector> PLUGINLIB_EXPORT_CLASS(frontier_exploration::FrontierPlugin, exploration_server::BasePlugin) namespace fronti...
ALGO
0.968704
6.293054
{ "github_metadata": { "branch": "melodic-devel", "commit_count": 196, "repo_created_at": "2014-03-07T19:43:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 280, "forks": 132, "issues": 27, "pull_requests": 2 }, "file_meta": { "content_id...
f456479a-ba4c-4ed2-8a90-9e59e271d300
RonyK/SEACOW
TrialWavelet/TrialWavelet/mmt.h
#pragma once #ifndef _caMMT_ #define _caMMT_ #include <iostream> #include <vector> #include <type_traits> #include "iterators.h" #include "bitstringstream.h" #include "array.h" namespace caWavelet { #define SIGN(val) ((val >= 0) ? 1 : -1) namespace caDummy { namespace data2D_sc8x8 { class caMMT_mmt_deserial...
ALGO
0.927786
4.928579
{ "github_metadata": { "branch": "master", "commit_count": 372, "repo_created_at": "2019-12-16T05:48:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bfc4cae8...
607c143c-92a6-465b-89e1-811eff8146ac
siddharthrajaraja/Algorithms-Data_Structures
Data Structures/windowsDLL.cpp
// This is a Doubly Linked List program for basic DLL operations // Author: <NAME> #include<bits/stdc++.h> using namespace std; #define instructions cout<<"ENTER CHOICES :\n1)PUSH-BACK\n2)PUSH-FRONT\n3)POP-BACK\n4)POP-FRONT\n5)EMPTY\n6)PRINT-LIST\n7)PRINT-REVERSE\n"; typedef long long ll; typedef struct node{ node...
ALGO
0.993276
4.156946
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2019-05-13T14:11:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9b621815a...
58abdc7e-79c4-4f79-8a41-a9884422d6a2
xyuan/HOFlow
src/master_element/MasterElementUtils.cpp
/*------------------------------------------------------------------------*/ /* HOFlow - Higher Order Flow */ /* CFD Solver based ond CVFEM */ /*------------------------------------------------------------------------*/ #include "ma...
ALGO
0.950364
6.359654
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2019-06-04T20:02:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b25099419...
45279493-2957-4b12-b8c9-c1ae3a0c5898
mateusgondim/lux
src/shapes/sphere.cpp
#include "shapes/sphere.h" #include <cmath> #include <algorithm> #include "core/util.h" #include "core/math.h" #include "core/vec2.h" #include "core/vec3.h" #include "core/transform.h" #include "core/rgb_spectrum.h" #include "core/ray.h" namespace lux { bool Sphere::intersect(const Ray & ray, float * phit, ...
ALGO
0.946337
6.413388
{ "github_metadata": { "branch": "master", "commit_count": 43, "repo_created_at": "2021-04-02T20:06:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "18a8f652b...
30b8913b-c30a-44c9-95e2-b2badb8c2848
makifay/Problem-Solutions-using-CPP
Dynamic_Programming_/Word_Break_.cpp
// Word Break Problem // Check whether the input string can be seperated into sequence of dictionary words // Dynamic Programming Approach #include <string> #include <iostream> #include <algorithm> #include <vector> #include <unordered_set> bool wordBreak(std::string s, std::vector<std::string>& wd) { // wd: wo...
ALGO
0.996923
5.506322
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2021-06-22T17:38:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4fe02e2d6bd...
cb7d0b16-cbef-4ddb-aeac-9e1289f0ead7
viren-sureja/Love-Babbar-450
01_array/29_trap_rain_water_problem.cpp
/* link: https://practice.geeksforgeeks.org/problems/trapping-rain-water-1587115621/1 */ // ----------------------------------------------------------------------------------------------------------------------- // // here we keep left max and right max at that point to get how much max water can be hold at curr...
ALGO
0.999937
6.801379
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2021-03-21T14:17:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 356, "forks": 169, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "ca6b1...
ad8179fd-d719-446a-a944-5260f0571775
falk-dev/maratona-de-programacao
PCPI/Aula 02 - STL/Beecrowd/2929 - Menor da Pilha/main.cpp
/* Link da questรฃo: https://judge.beecrowd.com/pt/problems/view/2929 2929 - MENOR DA PILHA | RESOLVIDO EM C++ Author: falk.dev Complexidade: */ #include <bits/stdc++.h> using namespace std; #define dbvector(vector) \ { \ cout << #vector << " = "; \ for (auto &...
ALGO
0.999596
5.399857
{ "github_metadata": { "branch": "master", "commit_count": 128, "repo_created_at": "2024-03-14T14:32:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "caae2e76...
c5fdd846-2566-4dfb-b053-573b97dc8deb
neha-mundase20/DSA_Problems_GFG
leadersInAnArray.cpp
/*Leaders in an array EasyAccuracy: 29.94% Submissions: 595K+ Points: 2 Given an array A of positive integers. Your task is to find the leaders in the array. An element of array is a leader if it is greater than or equal to all the elements to its right side. The rightmost element is always a leader. Example 1: Inp...
ALGO
0.99997
4.324751
{ "github_metadata": { "branch": "main", "commit_count": 233, "repo_created_at": "2024-01-28T11:01:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9aefdfef05...
0ef0a414-4ac3-4a88-8755-1d6fcd36507e
DanyArctic/research
RecipeFinder/RecipeFinder.cpp
#include <algorithm> #include <iostream> #include <vector> int main () { std::vector <std::string> ingredients_recipe_1 {"ะ™ะพะณัƒั€ั‚", "ะšะพะบะพัะพะฒะพะต ะผะพะปะพะบะพ", "ะกะฐั…ะฐั€ะฝะฐั ะฟัƒะดั€ะฐ", "ะšะพะบะพัะพะฒะฐั ัั‚ั€ัƒะถะบะฐ", "ะกะตะผ<NAME>", "ะœะฐะฝะณะพ ะบะพะฝัะตั€ะฒะธั€ะพะฒะฐะฝะฝะพะต"}; std::string user_input; //std::cin >> user_input; std::getline(std::c...
ALGO
0.990132
4.477831
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2020-03-20T08:49:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "48e60e993...
61b3d39f-ea2d-4aa8-aa5a-846e1f7a96ac
akashisonlinenow/apna-college-dsa-sheet
SQ_161.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 maxLength(string s) { // dp approach // refer gfg practice utube.. stack<int> st; st.push(-1); // thi...
ALGO
0.998436
5.084021
{ "github_metadata": { "branch": "master", "commit_count": 119, "repo_created_at": "2023-01-25T15:48: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": "3abd3106...
9ac47db1-3a35-4f6d-9eca-6d828ec715fb
WOI-Core/woi-grader-archive
Camp2/Spotifired/Solutions/Spotifired.cpp
#include <bits/stdc++.h> typedef long long ll; using namespace std; int main(){ ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); // Number of queries ll q; cin >> q; while(q--){ // M: target number of houses to burn ll n; cin >> n; // Binary search for the number o...
ALGO
0.999883
4.009785
{ "github_metadata": { "branch": "main", "commit_count": 109, "repo_created_at": "2025-06-17T12:20:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d6c4ad63df8...
37255c10-e36e-4574-8f55-e35e045405f1
ctlab/itmo_parsat
core/sat/prop/Prop.cpp
#include "core/sat/prop/Prop.h" namespace core::sat::prop { bool Prop::propagate(lit_vec_t const& assumptions) { lit_vec_t dummy; return propagate(assumptions, dummy); } uint64_t Prop::sequential_propagate( Minisat::SimpSolver& prop, search::USearch search_p, const prop_callback_t& callback) { search::Sear...
ALGO
0.995846
6.384371
{ "github_metadata": { "branch": "dev", "commit_count": 231, "repo_created_at": "2022-08-02T16:18:03.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f5360f006ed7...
750497c0-ea4a-4b58-8642-e0814e2c1f68
l0andr/amedian
amedian_calc.cpp
#include "amedian_calc.h" #include <vector> #include <algorithm> using namespace std; template <typename T> T partition(vector<T>& arr, int low, int high) { T pivot = arr[high]; int i = low - 1; for (int j = low; j <= high - 1; j++) { if (arr[j] <= pivot) { i++; swap(arr[i],...
ALGO
0.999939
5.316617
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2023-01-21T03:22: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": "5291b14487e...
06d7e6d7-209a-40a6-91d2-09ce56058b98
ustcyyw/algorithm
luogu/stack_queue/pq/CF923B.cpp
/** * @Time : 2023/12/30-10:29 AM * @Author : <EMAIL> * @E-mail : <EMAIL> * @Github : https://github.com/ustcyyw * @desc : */ /* * ็”จไธ€ไธชๆœ€ๅฐไผ˜ๅ…ˆ้˜Ÿๅˆ— ๆŒ‰้›ชไบบ็š„ๅฝ“ๅ‰ไฝ“็งฏๆŽ’ๅบ * ่ฎฐๆธฉๅบฆ็š„ๅ‰็ผ€ๅ’Œไธบst, ็ฌฌiๅคฉๅ †่ตทๆฅ็š„้›ชไบบๅˆฐ็ฌฌjๅคฉ็š„ไฝ“็งฏๆƒ…ๅ†ตๅฆ‚ไฝ• * 1.ๅฆ‚ๆžœๆฒกๆœ‰่žๅŒ–ๅฎŒ ๅ…ถไฝ“็งฏไธบ a[i] - (sum[j] - sum[i - 1])ใ€‚่ฟ™ไธ€ๅคฉๅ…ถ่žๅŒ–็š„ไฝ“็งฏไธบ t[j] * 2.ๅฆ‚ๆžœๅทฒ็ป่žๅŒ–ๅฎŒ ้‚ฃไนˆๆˆชๆญขๅˆฐ็ฌฌj-1ๅคฉ็š„ๆ—ถๅ€™ ่ฟ˜ๆฒก่žๅŒ–ใ€‚ๅ› ไธบๅทฒ็ป่žๅŒ–็š„้›ชไบบ ไปŠๅคฉๅฐฑไธๅฟ…่€ƒ่™‘ไบ† * ๆˆชๆญข็ฌฌj...
ALGO
0.99995
4.1648
{ "github_metadata": { "branch": "main", "commit_count": 162, "repo_created_at": "2024-11-11T07:09: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": "7e10d6b007...
1ab63fb7-dee8-45d5-9490-f632040be3be
vicb0/Marathon-Problems
BeeCrowd/1339 - O Cubo Mรกgico do Avรด/1339.cpp
#include <bits/stdc++.h> #define lli long long int; #define ibs ios_base::sync_with_stdio(false); #define cti cin.tie(NULL); using namespace std; void rotate(int x); void F(); void FB(); void B(); void BB(); void R(); void RB(); void L(); void LB(); void U(); void UB(); void D(); void DB(); char cube[6][3][3]; int...
ALGO
0.99988
3.21879
{ "github_metadata": { "branch": "main", "commit_count": 56, "repo_created_at": "2022-02-12T14:42: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": "e8af2741a5e...
5518931a-1fec-4405-be90-fd3e2e2fa8f6
al3phnull/garbage
laplace.cpp
#include <stdio.h> #define nx 100 #define ny 80 double u [nx][ny]; int i, j, k, n; void initialize() { for (i = 0; i < nx; i++) { for (j = 0; j < ny; j++) { u[i][j] = 0.0; } } } void boundaries() { for (n = 0; n <= ny; n++) { u[0][n] = nx; } } v...
ALGO
0.999511
4.151493
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2013-03-29T13:51:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e11021cf95...
8641cfd7-76ec-4cc8-98a0-7c4984bf4ba6
youngh0/CProgramming
haming_code.cpp
/******************************* * ์†Œํ”„ํŠธ์›จ์–ดํ•™๋ถ€ 20171707 ์ฐจ์˜ํ˜ธ * Problem : * Haming code * *****************************/ #include<iostream> #include<algorithm> #include<cmath> using namespace std; int checkPariti(int par,int arr[]){ //check pariti bit int count = 0; if(par == 1){ for(int i = ...
ALGO
0.99977
4.00548
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2020-03-14T11:00: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": "8a86d1eef...
196fa735-a6ea-464d-b247-6de43d9a4f04
Dragonfire3900/Multi_Dim_Analysis
OGDF_Mods/src/ogdf/basic/graph_generators/operations.cpp
/** \file * \brief Implementation of graph operations * * \author <NAME> * * \par License: * This file is part of the Open Graph Drawing Framework (OGDF). * * \par * Copyright (C)<br> * See README.md in the OGDF root directory for details. * * \par * This program is free software; you can redistribute it a...
ALGO
0.977528
6.521719
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2020-11-08T01:47: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": "f0259cd7952...
be4826bf-9b68-45d1-8029-bf46a45f823f
intel/hyperscan
src/util/container.h
/* * Copyright (c) 2015-2017, Intel Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the f...
TOOL
0.954962
3.531297
{ "github_metadata": { "branch": "master", "commit_count": 1317, "repo_created_at": "2015-09-21T21:58:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5051, "forks": 748, "issues": 163, "pull_requests": 29 }, "file_meta": { "content_id": "...
88420192-490f-448e-85c6-9bde245eed6e
Shriram2005/ALL-PRACTICE-CODES
DSA C/Selection_sort.cpp
#include <iostream> using namespace std; void selectionSort(int array[], int n) { int i, j, minIndex; for (i = 0; i < n - 1; i++) { minIndex = i; for (j = i + 1; j < n; j++) { if (array[j] < array[minIndex]) { minIndex = j; } ...
ALGO
0.999983
5.197569
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-08-16T16:58: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": "91b21d449b19...
dcf44d8d-25f8-4dae-b867-a2562ad29574
Ayu-hack/GeeksforGeeks-POTD-Solution
May 2025/Meeting Rooms III(12 May).cpp
class Solution { public: int mostBooked(int n, vector<vector<int>> &meetings) { sort(meetings.begin(), meetings.end()); vector<int> cnt(n, 0); int maxi = 0, ans = 0; priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>> initial; priority_queue...
ALGO
0.999991
5.547921
{ "github_metadata": { "branch": "main", "commit_count": 866, "repo_created_at": "2024-09-11T13:15:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 31, "forks": 97, "issues": 15, "pull_requests": 0 }, "file_meta": { "content_id": "086ce67...
e6c8e9ad-b24f-416c-b9b2-c08570dbbe2e
alioshag/Cplusplus
I/samples/isprime-while.cpp
#include <iostream> #include <cstdlib> #include <climits> //for INT_MAX using namespace std; int main() { int n; //uninitialized variable do { cout << "Please type an integer in range 2 to " << INT_MAX << " inclusive: "; cin >> n; ...
ALGO
0.965095
3.319621
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2016-05-04T16:17:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f86bed42e1...
a585717e-0c8c-453b-b21a-8f026b1b4cd7
j-tone/Homework_5
EX05_04/EX05_04/Source.cpp
#include <iostream> #include <string> #include <vector> #include <stack> #include <ctime> #include <cstdlib> using namespace std; template<typename T> void shuffle(vector<T> & v) { int count = 0; //used to keep track of how many valid times gone through the loop vector<bool> eva(v.size(), 0);//used to keep track of ...
ALGO
0.974478
3.81901
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2014-06-10T07:01: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": "db507a9ebc...
f1e725ae-e79b-4281-9c7c-23103dfa766a
intrinsicD/basics_lab
libs/bcg_library/geometry/plane/bcg_plane.h
// // Created by alex on 02.12.20. // #ifndef BCG_GRAPHICS_BCG_PLANE_H #define BCG_GRAPHICS_BCG_PLANE_H #include "math/vector/bcg_vector.h" #include "math/matrix/bcg_matrix.h" #include "math/bcg_pca.h" namespace bcg { template<int N> struct Plane { VectorS<N> normal; bcg_scalar_t distance; plane() : no...
ALGO
0.996661
6.821717
{ "github_metadata": { "branch": "basics_lab", "commit_count": 183, "repo_created_at": "2021-03-02T09:37:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e699...
44833b42-994a-455b-a408-9741676fe16b
ishandutta2007/codeforces-g
gyz_gyz/normal/242/E.cpp
#include <cstdio> #include <cstring> #include <iostream> using namespace std; const int maxn=1e5+10; struct SegmentTree { int sum[maxn<<2]; int tag_rev[maxn<<2]; int tag_set[maxn<<2]; int tag_reset[maxn<<2]; int n; #define ls (o<<1) #define rs ((o<<1)|1) #define mid ((l+r)>>1) void Mark_Set(int o,int l,int r) ...
ALGO
0.998642
4.830534
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:55:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "569d39edeee1...
da0d3b79-e511-4d8b-b76d-5bc050976f0f
alpha74/iLC
E/Equal_Row_and_Column_Pairs.cpp
// Return number of row and col pairs which are equal // https://leetcode.com/problems/equal-row-and-column-pairs/description/int equalPairs(vector<vector<int>>& grid) { map<vector<int>,int> freq ; int n = grid.size(), m = grid[0].size() ; int ret = 0 ; // Rows for(int i = ...
ALGO
0.999961
6.439073
{ "github_metadata": { "branch": "main", "commit_count": 860, "repo_created_at": "2021-10-24T17:42:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "401c1c7148...
a267e975-a6fb-4a0f-a0ea-851847329f28
ishandutta2007/codeforces-r
ronnie007/normal/1325/C.cpp
#include<iostream> #include<stdio.h> #include<algorithm> #include<cmath> #include<vector> #include<string> #include<map> #include<queue> #include<stack> #include<iomanip> #include<set> using namespace std ; #define MAXN 100007 int n ; vector < pair < int , int > > v[ MAXN ] ; int sz[ MAXN ] ; int ord[ MAXN ] ; int tp...
ALGO
0.999952
3.890315
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:58:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a4d2052af75d...
25bbcb62-226f-4ae4-bf71-c165c7c803a2
Aryanprakashh/StriversSheetChallenge
Medium/Subset Sum Problem/subset-sum-problem.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 func(int ind,vector<int> &arr,int target,vector<vector<int>> &dp){ if(ind==0) return target==arr[0]; if(target==0) return 1; ...
ALGO
0.999592
5.600993
{ "github_metadata": { "branch": "main", "commit_count": 780, "repo_created_at": "2023-06-07T07:36:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cdd30b70c4...
ef44c62f-d856-4665-baad-a1490617fe8f
sakirhussain51/PW_Skills_PPT
PW_Skills_Assignment_03/Q2.cpp
#include<bits/stdc++.h> using namespace std; void sum4_Target(int nums[],int target,int n){ sort(nums,nums+n); set<vector<int>> s; vector<vector<int>> output; for(int h=0;h<n;h++){ for (int i = h+1; i < n-1; i++){ int j = i + 1; int k = n - 1; ...
ALGO
0.999966
4.619031
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2023-06-24T16:17:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b139878a8...
480a2e4d-193a-45a9-9627-76c3a278b319
Jaivrat12/Practicals
OOPs Practicals/2.cpp
/* <NAME> find largest, second largest and third largest in a given array */ #include <iostream> using namespace std; int main() { int size; cout << "Enter size of array: "; cin >> size; int arr[size]; cout << "Enter elements of the array: "; for (int i = 0; i < size; i++) { cin >> arr...
ALGO
0.999973
4.437094
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2021-11-21T16:15:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2d687d339e...
2038a376-60cb-430b-896e-b3b997ed067d
NVIDIA/cutlass
tools/util/include/cutlass/util/reference/device/gemm_planar_complex.h
/*************************************************************************************************** * Copyright (c) 2017 - 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * * Redistribution and use in source and binary forms, with or without * modification, are p...
ALGO
0.909454
7.542389
{ "github_metadata": { "branch": "main", "commit_count": 667, "repo_created_at": "2017-11-30T00:11:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8078, "forks": 1336, "issues": 322, "pull_requests": 54 }, "file_meta": { "content_id": "b1...
97d3673e-4faa-4ea0-b27a-bba3386dcef8
Kawser-nerd/CLCDSA
Source Codes/CodeJamData/15/64/8.cpp
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <cassert> #include <algorithm> #include <string> #include <vector> #include <deque> #include <map> #include <set> using namespace std; #define eprintf(...) fprintf(stderr, __VA_ARGS__) #define pb push_back #define mp make_pair #define s...
ALGO
0.999986
3.821738
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-09-30T05:38:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 8, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "f9a08f14...
40b5a13a-ef19-448d-aa49-d083a67e4baa
degurii/BOJ
prob_1000-9999/9934_์™„์ „ ์ด์ง„ ํŠธ๋ฆฌ.cpp
/* ๋ฌธ์ œ ์ƒ๊ทผ์ด๊ฐ€ ์ข…์ด์— ์ ์€ ์ˆœ์„œ๊ฐ€ ๋ชจ๋‘ ์ฃผ์–ด์กŒ์„ ๋•Œ, ๊ฐ ๋ ˆ๋ฒจ์— ์žˆ๋Š” ๋นŒ๋”ฉ์˜ ๋ฒˆํ˜ธ๋ฅผ ๊ตฌํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์„ ์ž‘์„ฑํ•˜์‹œ์˜ค. ์ž…๋ ฅ ์ฒซ์งธ ์ค„์— K (1 โ‰ค K โ‰ค 10)๊ฐ€ ์ฃผ์–ด์ง„๋‹ค. ๋‘˜์งธ ์ค„์—๋Š” ์ƒ๊ทผ์ด๊ฐ€ ๋ฐฉ๋ฌธํ•œ ๋นŒ๋”ฉ์˜ ๋ฒˆํ˜ธ๊ฐ€ ๋“ค์–ด๊ฐ„ ์ˆœ์„œ๋Œ€๋กœ ์ฃผ์–ด์ง„๋‹ค. ๋ชจ๋“  ๋นŒ๋”ฉ์˜ ๋ฒˆํ˜ธ๋Š” ์ค‘๋ณต๋˜์ง€ ์•Š์œผ๋ฉฐ, ๊ตฌ๊ฐ„ [1,2K)์— ํฌํ•จ๋œ๋‹ค. ์ถœ๋ ฅ ์ด K๊ฐœ์˜ ์ค„์— ๊ฑธ์ณ์„œ ์ •๋‹ต์„ ์ถœ๋ ฅํ•œ๋‹ค. i๋ฒˆ์งธ ์ค„์—๋Š” ๋ ˆ๋ฒจ์ด i์ธ ๋นŒ๋”ฉ์˜ ๋ฒˆํ˜ธ๋ฅผ ์ถœ๋ ฅํ•œ๋‹ค. ์ถœ๋ ฅ์€ ์™ผ์ชฝ์—์„œ๋ถ€ํ„ฐ ์˜ค๋ฅธ์ชฝ ์ˆœ์„œ๋Œ€๋กœ ์ถœ๋ ฅํ•œ๋‹ค. */ /* solution: 1, 2, 4, 8, ... (2^(k-1))๋ฒˆ์งธ ์›์†Œ๊ฐ€ (๊ฐ€์žฅ ๋ฐ‘์—์„œ๋ถ€ํ„ฐ)๊ทธ ...
ALGO
0.999759
4.467243
{ "github_metadata": { "branch": "master", "commit_count": 281, "repo_created_at": "2017-11-22T21:34:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "fd68afab...
056aebeb-7830-42d1-a45b-ca0833aabd49
doitcodingtest/C
๊ทธ๋ž˜ํ”„/1916_์ตœ์†Œ๋น„์šฉ๊ตฌํ•˜๊ธฐ.cpp
#include <iostream> #include <vector> #include <queue> #include <limits.h> using namespace std; typedef pair<int, int> edge; static int N, M; static vector<int> dist; static vector<bool> visited; static vector < vector <edge> > mlist; int dijkstra(int start, int end); int main() { ios::sync_with_stdio(false); ...
ALGO
0.999987
4.048855
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2022-07-13T03:02:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 27, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "568d50a7...
4beb8ee4-f95a-4b27-aea8-d4676380a86f
SR-Sunny-Raj/Hacktoberfest2021-DSA
30. CPP Programs/Knapsack_using_DP.cpp
#include <iostream> using namespace std; int max(int x, int y) { return (x > y) ? x : y; } int knapSack(int W, int w[], int v[], int n) { int i, wt; int K[n + 1][W + 1]; for (i = 0; i <= n; i++) { for (wt = 0; wt <= W; wt++) { if (i == 0 || wt == 0) K[i][wt] = 0; else if (w[...
ALGO
0.99996
4.430973
{ "github_metadata": { "branch": "master", "commit_count": 2783, "repo_created_at": "2020-05-08T05:36:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 236, "forks": 982, "issues": 3, "pull_requests": 161 }, "file_meta": { "content_id": "7...
a8ba24f1-e1be-47ca-b439-3ee292b02581
dwmkFD/AtCoderSubmit
ABC099/D.cpp
#include <algorithm> #include <iostream> #include <numeric> #include <vector> #include <string> #include <bitset> #include <tuple> #include <cmath> #include <map> template<typename T> bool chmax( T &a, const T &b ) { if ( a <= b ) { a = b; return ( true ); } else { return ( false ); } } template<typename T> bool chmin...
ALGO
0.999958
4.630906
{ "github_metadata": { "branch": "master", "commit_count": 863, "repo_created_at": "2019-03-31T23:20: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": "16db3264...
173f2d2f-fbe5-48ef-b0b9-8f2ee4beccb3
gun0317/Algorithm-Problems
BaekJoon/4963 ์„ฌ์˜ ๊ฐœ์ˆ˜.cpp
#include <iostream> #include <queue> #include <string.h> #define pair pair <int, int> #define boundary newR < h && newC < w && newR>=0 && newC>=0 using namespace std; int moves[][2] = { {-1,0},{1,0},{0,-1},{0,1},{-1,-1},{1,1},{1,-1}, {-1,1} }; int map[60][60], visited[60][60], ans, w, h; queue <pair> q; void BFS() { ...
ALGO
0.9999
3.710019
{ "github_metadata": { "branch": "master", "commit_count": 104, "repo_created_at": "2018-08-04T11:35:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2fc7bbe7...
e7d510ad-6ed1-4478-8a57-9e42fcc9b6ba
ankush-b223/Mastering-DSA-cpp
Design a special Stack/Source.cpp
#include<limits.h> #include<stack> using namespace std; class SpecialStack { // Define the data members. stack<int> stck; int mini; public: //constructor SpecialStack() { this->mini = -1; } /*----------------- Public Functions of SpecialStack -----------------*/ public: /...
ALGO
0.999936
4.912095
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-03-27T16:15: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": "f54600545f04...
4b5c6a3a-df0e-43dc-a751-11b363e5c516
kangyijie5473/AC_list
2017Winter/LintCode/64.cpp
class Solution { public: /* * @param A: sorted integer array A which has m elements, but size of A is m+n * @param m: An integer * @param B: sorted integer array B which has n elements * @param n: An integer * @return: nothing */ // ไฝ ๅฐฑๆ˜ฏ่ฟ™ๆ ท๏ผŒไธ€ๅฅ่ฏๅฐฑๅ‡ป่ดฅๆˆ‘ๆ‰€ๆœ‰็š„้˜ฒๅค‡ใ€‚ // ็„ถๅŽๅฐฑไธขไธ‹ๆˆ‘ใ€‚ ...
ALGO
0.999972
4.540112
{ "github_metadata": { "branch": "master", "commit_count": 127, "repo_created_at": "2017-07-17T01:30: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": "fea9714e...
695e2340-d3c1-41c4-8385-1f700b8efd20
2018331109/LeetCode_March_2024
Day-22_LikdedList.cpp
/* 234. Palindrome Linked List Given the head of a singly linked list, return true if it is a palindrome or false otherwise. */ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr...
ALGO
0.997695
6.169222
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2024-03-01T06:25: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": "6c1f60ebe8c...
c7f9667c-d1de-43af-8752-3e828378624a
ngandhi369/LRU-LFU-cache
LRU.cpp
#include <SFML/Graphics.hpp> #include <iostream> #include <thread> #include <mutex> struct Node { int key; int value; Node* next; }; class LinkedList { private: Node* head; sf::RenderWindow& window; sf::Font font; sf::Text text; public: LinkedList(sf::RenderWindow& win) : head(nullptr...
ALGO
0.975623
5.685194
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2023-07-13T18:16:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a191633b72...
531f83a1-581a-458a-bf8b-b4dc7c9ad87f
alemutn/CUVL_LABORATORIO_I
Punto/main.cpp
#include <iostream> #include <math.h> using namespace std; struct ST_PUNTO { int x; int y; }; void cargaPunto(ST_PUNTO &punto){ cout << "Ingrese componente x:"; cin >> punto.x; cout << "Ingrese componente y:"; cin >> punto.y; return; } /* X - X1 = Y - Y1 ------ ------ X2 - X1 Y2 -...
ALGO
0.999002
3.835953
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2020-04-26T21:56:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f9703054a...
47863bf6-d64e-4852-94d4-6294215b9e40
NHERI-SimCenter/SimCenterBackendApplications
modules/performUQ/SimCenterUQ/nataf_gsa/lib_armadillo/armadillo-10.1.0/include/armadillo_bits/fn_eigs_gen.hpp
// Copyright 2008-2016 <NAME> (http://conradsanderson.id.au) // Copyright 2008-2016 National ICT Australia (NICTA) // // 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://www.apache.or...
ALGO
0.991709
5.978821
{ "github_metadata": { "branch": "master", "commit_count": 3406, "repo_created_at": "2019-05-24T00:35:51.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8, "forks": 36, "issues": 1, "pull_requests": 3 }, "file_meta": { "content_id": "da0eea2...