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 |
|---|---|---|---|---|---|---|---|
e90ac26d-df5a-4585-ad64-e2f1347d8164 | poppyla0104/Concordances | BST.h | /*<NAME>
Instructor: Dr.Stiber
Course: CSS343
Program 1: BST class
This is a Binary search tree class which each node of the BST contains
a keyword and linked list that stores its context. The class can inserts tree's
node, deletes and displays the BST.
*/
#pragma once
#include "List.h"
#include <string>
cl... | ALGO | 0.994644 | 4.294953 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2021-03-30T03:17: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": "5a1991cf9a85... |
2fd3f825-4f82-4b34-b290-c3d7996df800 | giorzang/CP-Algorithm | Contest02/B.cpp | #pragma GCC optimize("O3")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#ifndef Zang_LOCAL
#define debug(x...) "giORZang"
#else
#define _NTH_ARG(_1, _2, _3, _4, _5, _6, N, ...) N
#define _FE_0(_CALL, ...)
#define _FE_1(_CALL, x) _CALL(x)
#define _FE_2(_CALL, x, ...) _... | ALGO | 0.999957 | 4.303894 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-11-04T15:15: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": "8d124462b01f... |
98d5b8eb-3d25-4c58-80a0-951137f94bf9 | Anjum219/LeetCode-Top-Interview-Questions-Easy-Collection- | Array/rotate_array.cpp | #include<bits/stdc++.h>
#define ll long long int
using namespace std;
void rotate(vector<int>& nums, int k) {
int n = nums.size();
k = k % n;
int temp;
for( int i = 0; i < n/2; i++ ){
temp = nums[i];
nums[i] = nums[n-1-i];
nums[n-1-i] = temp;
}
for( int i = 0; i < k/2... | ALGO | 0.999974 | 4.931873 | {
"github_metadata": {
"branch": "master",
"commit_count": 34,
"repo_created_at": "2021-01-05T10:20:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "21b06aa9e... |
dfcda23a-8e82-4694-b1e6-45f91e78acc6 | KhoiBui16/28Tech_Code_Online | Data structure algorithm/Source Code DSA Contest/Graph-DoThi/B21_KiemTraChuTrinhTrenDoThiVoHuong.cpp | #include <bits/stdc++.h>
using namespace std;
const int maxn = 1001;
vector<int>v[maxn];
bool ok[maxn];
bool DFS(int s , int par)
{
ok[s] = true;
for(int x : v[s])
{
if(!ok[x])
{
if(DFS(x , s)) return true;
}
else if(x != par) return true;
}
return false;... | ALGO | 0.999817 | 3.684434 | {
"github_metadata": {
"branch": "main",
"commit_count": 104,
"repo_created_at": "2024-01-13T13:33:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d7a2b2d796... |
f4369b68-8835-4895-9a6e-b5a7dde16648 | jeongmin-seo/littering_detection | ActionDetection/main.cpp | /**************************************************************************
* Title : Online Multi-Camera Multi-Target Tracking Algorithm
* Author : <NAME>
* Initial Date : 2013.08.29 (ver. 0.9)
* Version Num. : 1.0 (since 2016.09.06)
* Description :
* The implementation of the paper named "Online Scheme ... | ALGO | 0.995383 | 5.321729 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2017-05-31T05:23: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": "e49070099... |
598cb869-dc19-49c2-a05b-3da09de8a427 | DCMTK/dcmtk | ofstd/libsrc/ofthread.cc | /*
*
* Copyright (C) 2000-2021, OFFIS e.V.
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
*
* OFFIS e.V.
* R&D Division Health
* Escherweg 2
* D-26121 Oldenburg, Germany
*
*
* Module: ofstd
*
* Author: <NAME>
*
... | TOOL | 0.919592 | 6.627979 | {
"github_metadata": {
"branch": "master",
"commit_count": 11154,
"repo_created_at": "2017-09-09T08:35:42.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 801,
"forks": 329,
"issues": 0,
"pull_requests": 11
},
"file_meta": {
"content_id": "89... |
5b59467f-22df-45f2-89cf-85c8be5cd1ad | heojoung2/Algorithm | 연산자 끼워넣기.cpp | #include<iostream>
#include<vector>
#include<cmath>
using namespace std;
vector<int> number;
int op[4],depth=0;
int max_val = -1000000000;
int min_val = 1000000000;
void DFS(int index, int sum)
{
if (index == depth)
{
if (sum > max_val)
max_val = sum;
if (sum < min_val)
min_val = sum;
return;
}
for (... | ALGO | 0.999986 | 3.394003 | {
"github_metadata": {
"branch": "master",
"commit_count": 36,
"repo_created_at": "2018-01-21T07:18: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": "84e001192... |
b41005d0-e08e-4b09-b072-11ad4fd01514 | nguyentrongvanviet/competitive-programming | 2022/CP/MATRIX/astr.cpp | /*
author : <NAME>
class 11T2 Le Khiet High school
Nick name : Billyisme
My life have changed so much since I met you.
May be I am not the one who is suitable for you , I know how stupidly I am but please give me a chance I won't let you down. Believe me :( I hate the moment I lost you so much .
*/
#include<bits/st... | ALGO | 0.999985 | 4.010371 | {
"github_metadata": {
"branch": "main",
"commit_count": 104,
"repo_created_at": "2023-11-07T16:18:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b8adf58abf... |
62c92b3d-c714-4b03-b00e-80f4d11e1d53 | Sabuj-Kumar/MyCodes | Spoj Online/Dynamic Problem/LCS/Spoj TRIP - Trip.cpp | #include<bits/stdc++.h>
#define pi acos(-1)
#define ll long long
#define ull unsigned long long
#define db double
#define ldb long double
#define pii pair<int,int >
#define pll pair< ll,ll >
#define ft first
#define sd second
#define pb push_back
#define pf push_front
#define sc( n ) scanf("%d",&n)
#define sl( n ) scan... | ALGO | 0.999959 | 3.941785 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2021-07-13T16:40:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5894fc3fc89a... |
1ec5fc55-4aa9-42e5-bc5e-e256810c5fa8 | wedddy0707/enshu3_1 | implementation/openfst/inc/haikuFst.cpp | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <wchar.h>
#include <fst/fstlib.h>
#include <locale.h>
#include <iostream>
#include <set>
#include <map>
#include <string>
#include "utils.h"
#include "symbol.h"
bool is_kireji(const std::wstring& word) {
if (word==L"や" or
word==L"かな" or
... | ALGO | 0.953695 | 4.478666 | {
"github_metadata": {
"branch": "master",
"commit_count": 65,
"repo_created_at": "2020-04-14T02:49:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d3659918a... |
2a1b7432-142c-48e8-b1f2-0c7264f8e108 | Ananya-dut/C_Language | doublylink1.cpp | #include<stdio.h>
#include<stdlib.h>
typedef struct node {
int data;
struct node * next;
struct node * prev;
} s;
s * head,*temp,*newp,*ptr;
void display(s * head) {
if(head == NULL) {
printf("Empty List!\n");
}
temp = NULL;
temp = head;
while(temp != NULL) {
pr... | ALGO | 0.992455 | 4.114089 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-02-01T17:34: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": "b64adb5de693... |
eec0c5b3-d445-4695-9247-6ae25d802bd1 | dijasila/QECC | include/UFHeuristic.hpp | #pragma once
#include "Code.hpp"
#include "Decoder.hpp"
#include "TreeNode.hpp"
#include "Utils.hpp"
#include <cstddef>
#include <functional>
#include <memory>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
namespace std {
template <>
struct hash<std::pair<std::size_t, std::si... | ALGO | 0.998035 | 6.341076 | {
"github_metadata": {
"branch": "main",
"commit_count": 785,
"repo_created_at": "2024-12-20T00:52: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": "88cae423ef... |
ea4b2e41-2495-4241-908a-73b48bed0e4d | Duva-01/Ingenieria-Informatica-ADE | 2 curso/1 cuatrimestre/Estructura de Datos/Examen/Examen ED/Enero2018.cpp | // Enero2018.cpp : <NAME>
//
#include <iostream>
#include "bintree.h"
using namespace std;
/*
Ejercicio 1:
(a) La definición priority_queue<int>::iterator p; es correcta. <-- Falso
(b) Dado un árbol binario cuyas etiquetas están organizadas como un AVL, puedo
recuperarlo de forma unívoca a partir ... | ALGO | 0.997311 | 4.157946 | {
"github_metadata": {
"branch": "main",
"commit_count": 38,
"repo_created_at": "2023-07-01T15:58: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": "5f5563c8b46... |
65d5d0d5-5fb7-4310-9080-3b79efd57b36 | Xilinx/llvm-aie | llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp | ///===- SimpleLoopUnswitch.cpp - Hoist loop-invariant control flow ---------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===--------------------------... | ALGO | 0.963467 | 3.55498 | {
"github_metadata": {
"branch": "aie-public",
"commit_count": 502463,
"repo_created_at": "2024-04-22T18:55:00.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 154,
"forks": 25,
"issues": 9,
"pull_requests": 59
},
"file_meta": {
"content_id":... |
9725bbc7-896a-428e-bbf8-05dcc322f717 | SMU-Ubicomp-Lab/PupilwareM | Pupilware/PupilwareCore/Helpers/math/Ransac.cpp | #include "Ransac.h"
namespace pw
{
int Ransac::num_samples_circle( int nsample, int ngood, double p )
{
if(nsample == ngood) return 1;
return ((int)(ceil(log(p)/log(1.-pow((double)ngood/nsample,3)))));
}
void Ransac::getThreeRandomPoints( int max_num, int* out_random_nums )
{
int index = 0;
while (index ... | ALGO | 0.999175 | 5.491962 | {
"github_metadata": {
"branch": "master",
"commit_count": 181,
"repo_created_at": "2016-05-23T22:10:40.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 3,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "f8407249a... |
be26bf75-ebcb-4c2b-8dbb-f0bdd4a670ed | anuwu/Competitive-Programming | InterviewBit/Graphs/Possibility_of_Finishing_Courses.cpp | typedef enum _nodestat
{
UN, VIS, TED
} nodestat ;
bool dfsCyc (int node, vector<vector<int>> &adj, vector<nodestat> &vis)
{
vis[node] = VIS ;
for (int i = 0 ; i < adj[node].size() ; i++)
if (vis[adj[node][i]] == VIS || (vis[adj[node][i]] == UN && dfsCyc (adj[node][i], adj, vis)))
... | ALGO | 0.99979 | 4.783092 | {
"github_metadata": {
"branch": "master",
"commit_count": 67,
"repo_created_at": "2020-06-20T18:49:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7b3a6df38... |
8e4f0636-9e20-444e-89b7-16c1bd90cdef | fj0rdingz/Competive_Programming | contests/雑多/old_rep/agc040a.cpp | #include <cstdio>
#include <queue>
#include <iostream>
#include <bits/stdc++.h>
#include<stdio.h>
#include<string.h>
#include<fstream>
#define F firstg
#define S second
#define R cin>>
#define Z class
#define ll long long
#define ln cout<<'\n'
#define in(a) insert(a)
#define pb(a) push_back(a)
#define pd(a) printf("%.... | ALGO | 0.999645 | 3.067741 | {
"github_metadata": {
"branch": "master",
"commit_count": 89,
"repo_created_at": "2020-04-01T13:04: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": "7468a70f7... |
21cd388c-4419-4799-a6cd-c997f59d17fb | srbcheema1/algo | ques/contests/snackdown/snackdown_nov_3/two.cpp | #include<bits/stdc++.h>
using namespace std;
#define dout if(debug and (debug_test == 0 or _t == debug_test) ) cerr<<" "
#define endl "\n"
#define int long long
#define substring(i,j) substr(i,(j-i+1)) // both i,j are included
#ifdef ONLINE_JUDGE
#define DEBUG 0.0
#else
#define DEBUG 1
#endif
int debug = DEBUG;// it ... | ALGO | 0.999574 | 4.819631 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2018-08-20T20:51:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b341f99a0... |
fdba216d-0154-49c9-8392-b4511dd460dc | EarthRabbit/Practice | 백준/Silver/9184. 신나는 함수 실행/신나는 함수 실행.cc | #include <iostream>
using namespace std;
int numset[51][51][51];
int w(int a, int b, int c){
if(a < 0 || b < 0 || c < 0){
a = 0;
b = 0;
c = 0;
}
if(numset[a][b][c]) return numset[a][b][c];
else{
if(a <= 0 || b <= 0 || c <= 0){
return numset[0][0][0];
... | ALGO | 0.999898 | 4.054098 | {
"github_metadata": {
"branch": "main",
"commit_count": 86,
"repo_created_at": "2023-01-14T23:30: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": "5d95c8ae795... |
d4e72934-20c5-4b83-a609-ffe5835982cb | ainiazzah/Aini-Azzah_006_Praktikum-1 | Tugas modul 1.4.cpp | #include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
int MatriksA[5][5], MatriksB[5][5], hasil[5][5];
int a, b, c, m, n, p, q, jumlah = 0;
cout<<"Jumlah baris Matriks A = ";
cin>>m;
cout<<"Jumlah kolom Matriks A = ";
cin>>n;
cout<<"Jumlah baris Matriks B = ";
cin>>p;
cout<<"Jumlah kol... | ALGO | 0.997435 | 4.080663 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-03-02T01:19:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6d69a970bf59... |
c14ef412-66be-4bab-a84b-9ecc02d45a5f | Seaqqull/maze | Source/MDGen/MazeGen.cpp | // Fill out your copyright notice in the Description page of Project Settings.
#include "MazeGen.h"
#include "MDGen.h"
#include <algorithm>
#include "MazeGenerationLogic.h"
MazeGen::MazeGen() :
_sizeMazeX(0),
_sizeMazeY(0),
_sizeRoomXY(0),
number_vertices(0)
{
}
MazeGen::MazeGen(int sizeMazeX, int sizeMaze... | ALGO | 0.96879 | 3.679657 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2017-05-10T09:09:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a5f41b317... |
75212cc3-9a17-4538-96bd-ba5399e10c07 | crescent-moon-visibility/crescent-moon-visibility | visibility.cc | // MIT, @ebraminio and @hidp123
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstdint>
#include "thirdparty/astronomy.h"
#define STB_IMAGE_WRITE_IMPLEMENTATION
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#include "thirdparty/stb_image_write.h"
#pragma GCC ... | TOOL | 0.973955 | 5.518133 | {
"github_metadata": {
"branch": "main",
"commit_count": 155,
"repo_created_at": "2022-08-27T10:00:16.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 11,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4af4399d37... |
77153cb0-5f63-4eb0-b722-4391b6bd0026 | xtozero/Study | C++Templates/src/TemplateStudy/16_Traits_and_Policy_Classes/TAPC_06.cpp | #include <iostream>
#include <numeric>
template<typename T>
class AccumulationTraits;
template<>
class AccumulationTraits<char>
{
public:
typedef int AccT;
static AccT zero( )
{
return 0;
}
};
template<>
class AccumulationTraits<short>
{
public:
typedef int AccT;
static AccT zero( )
{
return 0;
}
};
tem... | ALGO | 0.99943 | 6.363891 | {
"github_metadata": {
"branch": "master",
"commit_count": 80,
"repo_created_at": "2017-02-12T12:33:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "21fb4961f... |
f5949f5f-3718-4e32-94c7-9f71d6a1aa91 | joeyflores/EDA-2022-II | SkipList/source/skip_list/concurrent_skip_list.hpp | #include <string>
#include <fstream>
#include <vector>
#include <algorithm>
#include <iterator>
#include <stdio.h>
#include <math.h>
#include <iterator>
#include <limits>
#include <mutex>
#include <map>
#include<thread>
#include <atomic>
#include <random>
#include <stdlib.h>
#include <chrono>
using namespace std;
na... | ALGO | 0.999659 | 3.735997 | {
"github_metadata": {
"branch": "main",
"commit_count": 26,
"repo_created_at": "2022-08-28T17:32: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": "d474db0616c... |
477ebccc-11c1-4c36-b114-f546b9ac39df | Weizliert/YES | 5.4.cpp | #include<iostream>
#include <string>
#include <algorithm>
#include <map>
using namespace std;
bool check(char c) {
if (c >= '0' && c <= '9') return true;
if (c >= 'A' && c <= 'Z') return true;
if (c >= 'a' && c <= 'z') return true;
return false;
}
void SpeechPatterns() {
map<string, int> res;
string str;
g... | ALGO | 0.99972 | 3.615872 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2021-01-10T11:59: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": "60534291380... |
eb6c1925-e625-4c93-b88f-dd8720ba469a | Yosuamuliawan19/algorithm-bank | Algorithms/binary_search/d.cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll tc, n, c, arr[100010];
int main (){
cin.tie(NULL);
ios_base::sync_with_stdio(false);
cin >> tc;
while (tc--){
cin >> n >> c;
for (int i=0;i<n;i++){
cin >> arr[i];
}
sort(arr... | ALGO | 0.999997 | 3.86037 | {
"github_metadata": {
"branch": "main",
"commit_count": 745,
"repo_created_at": "2021-05-27T16:21:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ec9acfac3b... |
64930a97-5274-4815-a2be-e438c60f2105 | robotbuf/Algorithm | 250305/알파벳과 사칙연산/calculations-with-alphabet.cpp | #include <iostream>
#include <string>
#include <vector>
#include <unordered_map>
#include <climits>
#include <algorithm>
using namespace std;
string expr;
vector<char> variables;
unordered_map<char, int> assignedValues;
int maxResult = INT_MIN;
int evaluateExpression() {
vector<int> nums;
vector<char> ops;
... | ALGO | 0.999987 | 5.380664 | {
"github_metadata": {
"branch": "main",
"commit_count": 237,
"repo_created_at": "2025-03-02T04:07: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": "44eab50989... |
eb0df1a9-006d-422c-81b0-200cd9931b1e | RahulScripted/CodeChef | CodeChef-Problems/Rating 1000 To 1400/Rating 1200 To 1400/AdaAndDishes.cpp | // Chef Ada is preparing N dishes (numbered 1 through N). For each valid i, it takes Ci minutes to prepare the i-th dish. The dishes can be prepared in any order. Ada has a kitchen with two identical burners. For each valid i, to prepare the i-th dish, she puts it on one of the burners and after Ci minutes, removes it ... | ALGO | 0.999846 | 4.358629 | {
"github_metadata": {
"branch": "main",
"commit_count": 63,
"repo_created_at": "2024-09-18T00:27:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6b171654d09... |
d6c0a7b8-d42a-4c49-ad16-9fe317a95005 | monali24u/65290 | dataStructure/moderate/findSubSequence.cpp | #include<iostream>
using namespace std;
int findLeftSorted(int A[], int size)
{
for(int i=1; i<size-1; i++)
{
if(A[i-1] > A[i])
{
return i-1;
}
}
return size-1;
}
int findRightSorted(int A[], int size)
{
for(int i=size-2; i>=0; i--)
{
if(A[i] > A[i+1])
{
return i+1;
}
... | ALGO | 0.999834 | 3.925942 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2017-08-05T18:47: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": "2e35f0b1d... |
00ce2b7d-33fc-4472-afeb-79a6f40981df | root-project/root | tmva/tmva/inc/TMVA/DNN/Functions.h | // @(#)root/tmva/tmva/dnn:$Id$
// Author: <NAME> 20/06/16
/*************************************************************************
* Copyright (C) 2016, <NAME> *
* All rights reserved. *
* ... | ALGO | 0.967781 | 3.851655 | {
"github_metadata": {
"branch": "master",
"commit_count": 93033,
"repo_created_at": "2013-06-27T10:46:59.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2899,
"forks": 1363,
"issues": 467,
"pull_requests": 269
},
"file_meta": {
"content_id"... |
146c96ba-148a-45a7-a148-357074c08240 | jpcoding/posterization_mitigation | include/utils/qcat_ssim.hpp | #ifndef SZ_QCATSSIM_HPP
#define SZ_QCATSSIM_HPP
#include <cstdio>
#include <cstdlib>
#include <cstdint>
#include <cstring>
#include <cmath>
#include <omp.h>
#define K1 0.01
#define K2 0.03
// Code from Sheng Di's QCAT repository.
namespace PM
{
template <class T>
double SSIM_1d_calcWindow(T *data, T *other,... | ALGO | 0.994999 | 3.503526 | {
"github_metadata": {
"branch": "main",
"commit_count": 34,
"repo_created_at": "2024-12-16T17:47: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": "b584c16b6d8... |
cf03c905-f5bc-4293-ad93-fc3b7157b07f | rays2pix/Label-Propagation | code/dpsel.cpp | /***********************************************************************
*
* UNIVERSVM IMPLEMENTATION
* Copyright (C) 2005 <NAME> Max Planck Institute for Biological Cybernetics
*
* Includes parts of LUSH Lisp Universal Shell:
* Copyright (C) 2002 <NAME>, <NAME>, AT&T Corp, NECI.
*
* Includes parts of lib... | ALGO | 0.999958 | 4.350288 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2016-01-18T15:25:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e548c5f6cb... |
4597bfb4-8824-40c9-9fbf-5c319120b50c | zhengdong914/LFP-Decoding | include/dpss.h | /*
Copyright (c) 2010 <NAME>
This file is part of DPSS.
DPSS is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
DPSS is distributed in the h... | ALGO | 0.998941 | 5.392829 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2018-12-27T09:29: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": "a037b6b88c... |
97a5a9f1-3cf7-4e92-a7c5-2cdbf240499f | rahdirigs/CGVR-Lab | 08.cpp | #ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
#include <iostream>
using namespace std;
int xmin, xmax, ymin, ymax;
int xvmin, xvmax, yvmin, yvmax;
int n;
struct LineSegment {
int x1, y1, x2, y2;
};
LineSegment ls[10];
const int TOP = 1;
const int BOTTOM = 2;
const int RIGHT = 4;
const... | ALGO | 0.999943 | 5.011829 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2021-12-14T09:16: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": "fcd2b2a762a... |
1b0e1b0c-1eba-46fb-a412-badd96acf0b4 | rryanliu/ruyi_reference | range_queries/seg_tree.h | #include <vector>
/**
*
* Minimalist seg tree.
* Point add, range sum.
* Does not support lazy propogation.
* Many variations of non-lazy seg tree exist, such as
* - point update range query (this one)
* - range update point query
* O(N) initialization.
* O(log N) queries.
* Is not sparse or dynamic.
* Top-... | ALGO | 0.999447 | 7.33532 | {
"github_metadata": {
"branch": "main",
"commit_count": 29,
"repo_created_at": "2025-05-25T03:44:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "575d7cc82f5... |
0f1d37f1-07e6-404b-93aa-00b4c8b06007 | firemancha/Algorithm | Baekjoon/1000~1999/[1059]좋은 구간/solution.cpp | #include <iostream>
#include <set>
using namespace std;
#define endl "\n"
set<int> s;
int L, N, lower, upper, res;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> L;
res = 0;
s.insert(0);
for (int i = 0; i < L; i++) {
cin >> N;
s.insert(N);
}
cin >> N;
set<int>::ite... | ALGO | 0.999953 | 3.778121 | {
"github_metadata": {
"branch": "main",
"commit_count": 2137,
"repo_created_at": "2021-05-17T12:51: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": "171c8c7fd... |
9dcf6695-a852-426e-b27f-edc7c00d7be3 | Moonshot-SEP/files-for-AT | CPPTest.cpp | #include <iostream>
#include <string>
#include <vector>
using namespace std;
// Define an enum class called Fruit
enum class Fruit {
Apple,
Banana,
Orange
};
// Define a function that takes a Fruit enum class value and prints its name
void printFruitName(Fruit fruit) {
switch (fruit) {
case F... | TOOL | 0.99261 | 6.418552 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2024-04-03T14:07:34.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b6217dd7666c... |
1a8692fa-f9d0-4f82-87af-7090d0e16325 | bioconductor-source/assorthead | inst/include/powerit/simple.hpp | #ifndef POWERIT_SIMPLE_HPP
#define POWERIT_SIMPLE_HPP
#include "core.hpp"
#include <numeric>
/**
* @file simple.hpp
*
* @brief Power iterations for a simple array.
*/
namespace powerit {
/**
* Perform power iterations on a diagonizable matrix to find the first eigenvalue/vector.
* This overload generates a st... | ALGO | 0.999896 | 7.063904 | {
"github_metadata": {
"branch": "devel",
"commit_count": 37,
"repo_created_at": "2024-08-18T22:25:58.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ce2fc32460f... |
4577a0b4-4f0d-4dc6-a67b-8af9338efcb2 | Octobug/notes | algorithms_and_data_structures/leetcode/dynamic_programming/h_00132_palindrome_partitioning_2/main.cpp | #include <iostream>
#include <vector>
#include "array.h"
using namespace std;
class SolutionOrigin
{
public:
int minCut(string s)
{
int len = s.size();
bool palin[len + 1][len];
for (int i = 0; i < 2; i++)
for (int j = 0; j < len; j++)
palin[i][j] = true;
... | ALGO | 0.999864 | 4.912572 | {
"github_metadata": {
"branch": "main",
"commit_count": 1765,
"repo_created_at": "2021-01-27T06:21:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 11,
"pull_requests": 0
},
"file_meta": {
"content_id": "83897ba4... |
8b2250cb-07f9-4b5e-8f5f-a619b5ea19ec | osamahatem/CompetitiveProgramming | Codeforces/101102K. Topological Sort.cpp | /*
* 101102K. Topological Sort.cpp
*
* Created on: Jun 20, 2018
* Author: <NAME>
*/
/*
* This would've been a simple problem if it wasn't for the fact that we're
* given the missing edges instead of the existing ones. We can use a set to
* hold all unvisited nodes, and use it, along with binary search ov... | ALGO | 0.999994 | 5.101919 | {
"github_metadata": {
"branch": "master",
"commit_count": 125,
"repo_created_at": "2017-12-09T14:02:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0e91312b... |
75ede595-d146-4dc2-a30c-2fe5761a7454 | zeustrojancode/Zeus | source/common/fs.h | #pragma once
/*
Инструменты для работы с файловой системой.
*/
#if !defined FS_ALLOW_FILEMAPPING
# error FS_ALLOW_FILEMAPPING not defined!
#endif
namespace Fs
{
//Flags for _fileToMem
enum
{
# if(FS_ALLOW_FILEMAPPING > 0)
FTOMF_WRITE_ACCESS = 0x1, //Open file for writing.
# endif
FTOMF_SHARE_WRIT... | TOOL | 0.935438 | 5.465755 | {
"github_metadata": {
"branch": "translation",
"commit_count": 14,
"repo_created_at": "2011-05-13T22:18:30.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1496,
"forks": 695,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "... |
3c4f3e36-72e7-487b-876e-43f469e7505c | mihailrc/selfDrivingCarTerm3 | pathPlanning/src/traffic.cpp | //
// Created by <NAME> on 9/10/17.
//
#include <vector>
#include "vehicle.h"
#include "traffic.h"
Traffic::Traffic(std::vector<Vehicle> vehicles, double lane_width, double speed_limit, double search_radius,
double reference_vehicle_position, double time_delay) {
this->vehicles = vehicles;
th... | ALGO | 0.999355 | 6.244012 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2017-09-11T00:40: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": "33912f3c2c... |
44875f56-3330-4391-9bbf-a72243579844 | chronopilferer/2024-study | 20240324_pmh/impain.cpp | #include "opencv2/opencv.hpp"
#include <iostream>
using namespace std;
using namespace cv;
void main() {
Mat image(300, 500, CV_8UC1, Scalar(255)); // (300, 500) 크기의 배열을 선언하고 255로 초기화
Point2f center(250, 150), pts[4];
Size2f size(200, 80);
RotatedRect rot_rect(center, size, 60);
circle(image, rot_rect.center, 1,... | ALGO | 0.967601 | 5.668914 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2024-03-11T03:29:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ae5a509bbe5a... |
62f16717-69b3-4d95-98b5-c98d3c273cb3 | ncrookston/segmented | algorithm/for_each.hpp | #ifndef SEGMENTED_ALGORITHM_FOR_EACH_HPP
#define SEGMENTED_ALGORITHM_FOR_EACH_HPP
#include "segmented_iterator_traits.hpp"
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/utility.hpp>
#include <algorithm>
namespace segmented
{
template <typename T, typename F> F for_each(T it, T end,... | TOOL | 0.955597 | 6.769976 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2013-10-12T15:56: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": "9cfb5accc... |
9f474f24-2b4b-44b6-88e2-c22f6bf1ed16 | kira-bezuhla/induvidual_tasks | fix_and_run/game.cpp | #include<iostream>
#include<time.h>
#include<conio.h>
#include<iomanip>
#include<vector>
#include<Windows.h>
using namespace std;
bool CheckSameSymbols(char[], int, int, vector<int>);
bool CheckLength(char[], int);
int main()
{
SetConsoleCP(1251);
SetConsoleOutputCP(1251);
//cout << " а б в г д е ё ж з и й к л м н о... | ALGO | 0.995197 | 3.33689 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2021-05-24T14:18: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": "fc87a9f58c... |
d944a6d8-05a3-4d01-9c45-278904459f49 | WhiZTiM/coliru | Archive/336a534172d6abe17b91a2cb614dc97e-c96156d6cc95286981b0e9deef2eefae/main.cpp | #include <bitset>
using namespace std;
bitset<96> bitset_to_string(bitset<32> addr, bitset<64> wdata)
{return bitset<96>{addr.to_string<char>() + wdata.to_string<char>()};}
template<size_t N1, size_t N2>
std::bitset<N1+N2> bitwise_copy(std::bitset<... | TOOL | 0.98035 | 5.262056 | {
"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": "176c5d... |
bb57e1d0-94ed-41c2-9409-890dd3d8f484 | ravi4all/CPP_DSA_April | Tree/TopView.cpp | #include<iostream>
#include<queue>
#include<map>
using namespace std;
struct Node
{
int data;
struct Node* left, *right;
int distance;
Node(int data) {
this->data = data;
left = right = NULL;
}
};
void topView(Node* root) {
if(root == NULL) {
return;
}
queue<Nod... | ALGO | 0.999991 | 4.984679 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2022-04-24T09:57:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c2c84c7cfa0... |
4be83c12-a5a7-4827-8420-d123eff59ef8 | sequencing/isaac_aligner | src/c++/lib/alignment/matchFinder/ExactMaskMatcher.cpp | /**
** Isaac Genome Alignment Software
** Copyright (c) 2010-2014 Illumina, Inc.
** All rights reserved.
**
** This software is provided under the terms and conditions of the
** BSD 2-Clause License
**
** You should have received a copy of the BSD 2-Clause License
** along with this program. If not, see
** <h... | ALGO | 0.984723 | 6.245229 | {
"github_metadata": {
"branch": "master",
"commit_count": 31,
"repo_created_at": "2012-12-20T14:17:04.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 36,
"forks": 8,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "402ee0ee3... |
fc8f3359-f84a-43bb-bf68-d23d3c4d80b7 | angelbeshirov/algorithms | main/strings/left_right_rotate.cpp | #include<bits/stdc++.h>
using namespace std;
char* left_rotate(char* p, int k) {
int n = strlen(p);
if(n < 2) {
return p;
}
while(k-- > 0) {
char first = p[0];
for(int i = 1; i < n; i++) {
p[i - 1] = p[i];
}
p[n - 1] = first;
}
return p;
}
... | ALGO | 0.999829 | 3.622418 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2020-05-03T18:31:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "94c3c23d7d... |
ebac5f4a-7621-4bc0-9493-0feaac440707 | ishandutta2007/codeforces-b | brunovsky/normal/786/B.cpp | #include <bits/stdc++.h>
#ifdef LOCAL
#include "code/formatting.hpp"
#else
#define debug(...) (void)0
#endif
using namespace std;
template <typename Treap>
struct basic_treap {
using uniform_priod = uniform_int_distribution<uint32_t>;
static inline mt19937 rng = mt19937(random_device{}());
static inline u... | ALGO | 0.999151 | 4.793419 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-04-11T01:05: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": "48ac152a9fc4... |
14d32c70-0fa7-4224-bf4c-5d2482296165 | bramkuijper/hdIslandModel | src/simulate_hd_space.h | #ifndef HD_SPACE_HPP
#define HD_SPACE_HPP
#include <Rcpp.h>
#include <random>
#include "patch.h"
class SimulateHDSpatial
{
private:
std::mt19937 rng_r; // random number generator
std::uniform_real_distribution<double> uniform;
std::vector <Patch> pop;
// number of patches
... | ALGO | 0.988005 | 6.078975 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2021-10-05T08:34: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": "330eec7da006... |
d76245e6-c03d-463e-8d5e-da97ebc5d709 | JeraKrs/acm | codes/LOJ/loj1129.cpp | #include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int maxn = 10005;
const int sigma_size = 10;
struct Tire {
int sz;
int g[maxn * 10][sigma_size];
int val[maxn * 10];
void init();
int idx(char ch);
void insert(char* s);
int find(char* s);
}T;
int N;
char ... | ALGO | 0.999805 | 4.203154 | {
"github_metadata": {
"branch": "master",
"commit_count": 163,
"repo_created_at": "2016-05-23T06:40:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "986be531... |
cdefaf2c-ffe5-447b-b9a9-e0d21162a9bc | Itshiteshagarwal/Complete-DSA | graph/shortest_path.cpp | //shortedt path in undirected graph using bfs
#include<bits/stdc++.h>
#include<unordered_map>
vector<int> shortestPath( vector<pair<int,int>> edges , int n , int m, int s , int t){
// ADJ LIST
unordered_map<int,list<int>>adj;
for(int i=0; i<edges.size();i++)
{
int u=edges[i].first;
in... | ALGO | 0.999994 | 5.63837 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-06-19T05:39:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a5838ffdcefc... |
3f4e99d6-4b84-4fa2-8097-360a6366d8b5 | TonyZarif/my-project | CS112_A2_T2_S15,S16_20230073_20230157_20230110.cpp | // FCAI – Structured Programming – 2024 - Assignment 2
// Program Name: TriCipher
// Program Description: program work with three ciphers methods to encryption and decryption messages
// (Affine cipher - Morse cipher - Vignere cipher).
// Last Modification Date: 09/03/2024
// Author1 and ID and Group:
//Name:<NAME>... | ALGO | 0.998342 | 3.255669 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-03-07T01:29:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "99b35043f18e... |
d1fd2844-7b76-4cf2-9e0e-5f3400db23c2 | 23521125-NguyenHoangYenNhu/23521125_23521440_23521245_23521819_23521362_23521688_BT03 | Bai087/Bai087.cpp | #include <iostream>
#include <iomanip>
using namespace std;
void Nhap(float[], int&);
void Xuat(float[], int);
float CuoiCung(float[], int);
int main()
{
float b[100];
int k;
Nhap(b, k);
cout << "\nMang ban dau: ";
Xuat(b, k);
if (CuoiCung(b, k) == 0)
cout << "\nKhong co gia tri nao thoa dieu kien";
else
... | ALGO | 0.999639 | 3.312394 | {
"github_metadata": {
"branch": "master",
"commit_count": 29,
"repo_created_at": "2023-10-11T15:05: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": "45666df19... |
92ac9244-4f6f-482d-bacb-63a9b65082ea | darrylys/spoj | LQDNUMS_v2.cpp | #include<stdio.h>
#define ull unsigned long long
ull e10[20];
void makeE10() {
e10[0] = 1;
for (int i=1; i<20; ++i) {
e10[i] = e10[i-1]*10LL;
}
}
int compressnumlen(ull N) {
ull v = N;
int pd = -1;
int ctr = 0;
while (v) {
if (pd != v%10) {
pd = v%10;
... | ALGO | 0.999898 | 3.246709 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2019-10-31T14:44: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": "ab29262d20... |
48c6a630-804e-4d84-a0ee-8dc02afd3b20 | santiagohenao/Bounce-Ball-SFML | main.cpp | #include <SFML/Graphics.hpp>
#include <SFML/Keyboard.hpp>
#include <iostream>
#include <fstream>
#include <math.h>
using namespace std;
#define box_x 500.
#define label_space 150.
#define box_y 300.
#define g 9.8
static float dt=0.0008;
//sf::RenderWindow window;
double xspace_i;
double xspace_f;
double yspace_i;
d... | ALGO | 0.9971 | 3.844121 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2018-04-20T23:13: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": "84e855dca6... |
0c86397a-8e43-4f1f-bcd8-a787b34b48a7 | xxubin04/study-record | CPP/Univ/객체지향프로그래밍/Assignment/Week 01-02/prob05.cpp | #include <iostream>
using namespace std;
const int MAX = 100;
int main() {
int N;
cin >> N;
const int SIZE = N;
int num_array[MAX] = {};
for (int i = 0; i < N; i++) {
cin >> num_array[i];
}
// 버블정렬
for (int i = 0; i < N-1; i++) {
for (int j = i; j < N-1; j++) ... | ALGO | 0.999985 | 4.014965 | {
"github_metadata": {
"branch": "main",
"commit_count": 200,
"repo_created_at": "2024-02-20T05:38: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": "55153ab6ac... |
81db9c54-ecc4-468e-a2a4-2e961f2592ee | YuxuanLing/books | mfc and c sharp/OpenCV图像处理编程实例/source/chapter4/4-13.cpp | // 功能:代码 4-13 高斯平滑
// 作者:朱伟 <EMAIL>
// 来源:《OpenCV图像处理编程实例》
// 博客:http://blog.csdn.net/zhuwei1988
// 更新:2016-8-1
// 说明:版权所有,引用或摘录请联系作者,并按照上面格式注明出处,谢谢。
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
using namespace std;
using namespace cv;
// 高斯平滑
void myGaussianBlur(const Mat... | ALGO | 0.997462 | 3.923375 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2017-07-17T01:44:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 549,
"forks": 301,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "387dc... |
d9f25289-def5-433a-afef-8ed1f334b4e6 | ABenazzou/Competitive-Programming | Codeforces.2060/A.cpp |
/*
* Author: @adnanebenazzou
*/
#include <bits/stdc++.h>
using namespace std;
template<typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p) { return os << '(' << p.first << ", " << p.second << ')'; }
template<typename T_container, typename T = typename enable_if<!is_same<T_container, stri... | ALGO | 0.999623 | 4.484765 | {
"github_metadata": {
"branch": "main",
"commit_count": 93,
"repo_created_at": "2025-01-05T21:03:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "469760fca18... |
0efff2f8-5622-4daa-be50-8ae7827a1b73 | uxlfoundation/oneDAL | cpp/oneapi/dal/backend/primitives/reduction/reduction_rm_cw_atomic_dpc.cpp | /*******************************************************************************
* Copyright 2021 Intel Corporation
*
* 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.o... | ALGO | 0.972509 | 7.454761 | {
"github_metadata": {
"branch": "main",
"commit_count": 2361,
"repo_created_at": "2016-03-28T22:39:32.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 636,
"forks": 224,
"issues": 23,
"pull_requests": 37
},
"file_meta": {
"content_id": "9cea... |
4b7f2525-84bd-4065-ba35-821821462751 | sajjad-ah/FYS4150 | Project4/main_code/main.cpp | using namespace std;
#include "mpi.h"
#include "functions.h"
#include <iostream>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <fstream>
#include <random>
#include <ctime>
int main (int argc , char * argv [])
{
int my_rank ; int numprocs ;
MPI_Init (&argc, &argv);
MPI_Comm_size (MPI_COMM_WOR... | ALGO | 0.999836 | 3.792034 | {
"github_metadata": {
"branch": "master",
"commit_count": 39,
"repo_created_at": "2018-08-24T08:34:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0a2dd459a... |
f57cfce5-6d0b-44d5-bded-ca8d0da65d22 | pmh47/textured-mesh-gen | src/mesh_intersections/test_app.cpp |
#include <igl/readOBJ.h>
#include <igl/per_face_normals.h>
#include "mesh_intersections.h"
void fix_normals(Eigen::MatrixXf const &vertices, Eigen::MatrixXi &faces)
{
Eigen::MatrixXf face_normals;
igl::per_face_normals(vertices, faces, face_normals);
for (int face_index = 0; face_index < faces.rows(); ++face_in... | ALGO | 0.941212 | 5.445613 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-03-20T01:23:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 37,
"forks": 3,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "637cac70f... |
df25add0-d507-410c-9cca-2eebdf8681ea | YangletLiu/Homomorphic_Matrix_Completion_Multiple_GPU | normal_gpu/privcy.cpp | /*************************************************************************
> File Name: trust.cpp
> Author: hanlu
> Mail: <EMAIL>
> Created Time: 2018年12月10日 星期一 21时13分39秒
************************************************************************/
#include "head.h"
int main(int argc,char *argv[]){
int m = 2000;... | ALGO | 0.993986 | 3.631913 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2020-01-30T02:46:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dd27600c95... |
a4f7fbcf-e914-4ab3-bcfc-a25331f44288 | BookmanHan/thedox | cls_ann_center_neuron.h | #include "ann_import.h"
template<typename FUNC>
class cls_ann_center_neuron : public cls_ann_abstract_neuron<FUNC>
{
protected:
double *center;
double *delta_center;
int dim;
virtual void re_cache_error()
{
this->error_cache_valid = true;
}
virtual void re_cache_output()
{
if (this->output_cache_valid)
... | ALGO | 0.97425 | 3.99281 | {
"github_metadata": {
"branch": "thedox_egg",
"commit_count": 1,
"repo_created_at": "2011-08-06T08:53:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e11c89... |
30ddac02-7971-4c97-8b05-ef0b01de5e38 | stjordanis/dco_cpp | libor/libor.h | #include <cmath>
#include <vector>
#include <random>
using namespace std;
const int p=10000;
const int m=40;
const int n=m+40;
const int no=15;
const double delta=0.25;
const vector<int> maturities({4,4,4,8,8,8,20,20,20,28,28,28,40,40,40});
const vector<double> swaprates({.045,.05,.055,.045,.05,.055,.045,.05,.055,.04... | ALGO | 0.999592 | 4.184242 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2021-07-03T22:57:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b9f8d9cd45... |
74687854-7c9f-4dac-8593-8e8da5528efd | thecodeboss/AcousticSimulator | src/Simulation.cpp | #include "Simulation.h"
#include "Partition.h"
#include "PMLPartition.h"
#include "Boundary.h"
#include <algorithm>
#include <memory>
#include <vector>
static volatile bool wait = false;
Simulation::Simulation(std::vector<std::shared_ptr<Partition>>& p, std::string output) : partitions(p), irsFile(output) {
worker = ... | ALGO | 0.971898 | 5.527084 | {
"github_metadata": {
"branch": "master",
"commit_count": 22,
"repo_created_at": "2016-02-24T19:00:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 38,
"forks": 12,
"issues": 10,
"pull_requests": 1
},
"file_meta": {
"content_id": "90e79a... |
9a44d7b3-72b5-47b5-a1e4-7b9dc02b6603 | YoonDongGeun/algorithm_study | 변유정/220917_BOJ_16933_벽부수고이동하기3.cpp | #include <iostream>
#include <queue>
using namespace std;
/// BFS + a(최적화)
/// 앞의 벽부수고 이동하기 응용 (코드에서 최적하는 아님)
///
/// 구현 단계
/// 1. 다음 갈곳이 0(길)인지 1(벽)인지
/// 2. 다음갈곳이 0이면 이미 들렸거나 머무른 흔적이 있는지
/// 3. 다음갈곳이 1이면
/// 3-1. 지금 낮인지 밤인지
/// 3-2. 밤이면 이미 머무른 흔적이 있는지
/// 3-3. 낮이면 갈수 있는 상태인지
///
/// 그외의 구현은 벽부수고 이동하기와 같음!
/// 최적화 ... | ALGO | 0.999874 | 4.516681 | {
"github_metadata": {
"branch": "master",
"commit_count": 522,
"repo_created_at": "2022-08-05T08:37:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3d85c49f... |
4a04e7d6-70ff-4466-a7bf-e82e8efb536a | alwzbright97/Cpp-practice | baekjoon/implementation/dragon_curve.cc | #include <iostream>
#include <vector>
constexpr int MAX = 101;
bool map[MAX][MAX];
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, -1, 0, 1};
void curve(std::pair<int, int> start_pt, int direction, int generation) {
std::pair<int, int> end_pt = {start_pt.first + dx[direction],
start_pt.... | ALGO | 0.999861 | 5.438344 | {
"github_metadata": {
"branch": "master",
"commit_count": 82,
"repo_created_at": "2022-04-06T02:09:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7f1cd6675... |
8d79ce1d-70f4-4625-af44-7274ec344922 | ishandutta2007/codeforces-n | natsugiri/normal/1644/B.cpp | #pragma GCC optimize ("O3")
#pragma GCC target ("sse4")
#pragma GCC optimize("unroll-loops")
#include<stdio.h>
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<string.h>
#ifdef LOCAL
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#else
#define NDEBUG
#define eprintf(...) do {} while... | ALGO | 0.999647 | 3.867835 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:35: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": "5c1dbda95667... |
3183ff8c-7dc5-492f-80ee-9445f61c75dc | haoran0709/Mycode | luogu/P1308-NOIP2011-tongjidancishu.cpp | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main(){
string s,x;
getline(cin,x);
getline(cin,s);
//大写转小写
for (int i=0;i<x.length();i++) if('A'<=x[i] && x[i]<='Z') x[i]+='a'-'A';
for (int i=0;i<s.length();i++) if('A'<=s[i] && s[i]<='Z') s[i]+='a'-'A';
//计算第... | ALGO | 0.999915 | 3.649194 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2024-08-14T14:11: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": "8640556a6f6... |
9d0df3f0-0098-45ae-9bef-d891def993ef | SM-GIT-HUB/dailyCoding--from-2025_March | valid bst or not.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.99998 | 6.291024 | {
"github_metadata": {
"branch": "main",
"commit_count": 694,
"repo_created_at": "2025-03-02T09:24: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": "a6d215ae2d... |
8b60c15e-f7c2-4a57-99c4-9e0e6df5d883 | Kodsport/jobagent-challenge-21 | konsultarbeten/submissions/time_limit_exceeded/MaTLE.cpp | #include <bits/stdc++.h>
using namespace std;
#define rep(i, from, to) for (int i = from; i < (to); ++i)
#define len(x) x.size()
#define ll long long
ll max(ll a,ll b){if(a>b) return a; return b;}
ll inf = pow(10,18);
vector<ll> jobs;
ll search(ll value, ll index){
rep(j,index, len(jobs)){
if (jobs[j] >... | ALGO | 0.99984 | 3.953158 | {
"github_metadata": {
"branch": "main",
"commit_count": 64,
"repo_created_at": "2021-04-09T08:45:13.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "603eba33ddf5... |
6b6bc177-1e87-4e14-ab91-b360940217d8 | ajioka2310/AtCoder | utils_cpp/tree/クラスカル法.cpp | // abc209 D - Collision
#ifdef DEFINED_ONLY_IN_LOCAL
#include "/workspaces/AtCoder-cpp-env-main/cpp-dump/cpp-dump.hpp"
// <次のセクションの内容はここに追加する>
#define dump(...) cpp_dump(__VA_ARGS__)
namespace cp = cpp_dump;
CPP_DUMP_SET_OPTION_GLOBAL(max_line_width, 80);
CPP_DUMP_SET_OPTION_GLOBAL(log_label_func, cp::log_label::filena... | ALGO | 0.999683 | 5.146043 | {
"github_metadata": {
"branch": "main",
"commit_count": 23,
"repo_created_at": "2024-12-18T05:01: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": "29a1a75e7ad... |
d409cda8-0c6d-4786-993a-ac173d2773d1 | Visualtaggy/competitive_cpp | Basics Of Programming/2 Function and Arrays/Decimal To Any Base.cpp | // 1. You are given a decimal number n.
// 2. You are given a base b.
// 3. You are required to convert the number n into its corresponding value in base b.
#include <iostream>
#include <cmath>
using namespace std;
int DecToAny(int n, int b)
{
// write your code here
int total = 0;
int power = 0;
whil... | ALGO | 0.999927 | 4.384264 | {
"github_metadata": {
"branch": "master",
"commit_count": 173,
"repo_created_at": "2022-03-27T18: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": "92c4a558... |
a6d47ac4-40d3-4fe8-b214-4ee620cd478b | RichyBoy/hattools | utils/hattools-generator.ixx | export module hattools.utils:generator;
import <random>;
import <algorithm>;
import <vector>;
export namespace hattools::utils {
const void generate(int lowerBound, int upperBound, int quantity, std::vector<int>& randomNums) {
std::random_device dev;
std::mt19937 rng(dev());
int low{ 0 }, high{ 0 };
... | TOOL | 0.996952 | 5.028296 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2024-10-17T00:05: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": "862ab1ffdc89... |
ed9373cd-0419-45f1-8b66-73151ca3311d | JSeokjun/Daily_Algorithm | 백준/Gold/7682. 틱택토/틱택토.cc | #include <iostream>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
while (1) {
string ttt; cin >> ttt;
if (ttt == "end") return 0;
int x_cnt = 0, o_cnt = 0;
for (int i=0; i<9; i++) {
if (ttt[i] == 'X') x_cnt++;
else if ... | ALGO | 0.999904 | 4.10812 | {
"github_metadata": {
"branch": "main",
"commit_count": 450,
"repo_created_at": "2023-01-10T14:53: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": "b9fdd0831a... |
3ec1739b-ce9b-4d48-9d43-7e1236ddfa05 | bosyuan/NYCU-OS-Intro | HW3/hw3-4.cpp | #include <iostream>
#include <cstdint>
#include <vector>
#include <cmath>
#include <mutex>
#include <thread>
using namespace std;
int n, m;
int num_threads = 1;
mutex write_lock;
vector<uint64_t> subsets;
uint64_t one = static_cast<uint64_t>(1), global_count = 0;
void solve(int index, uint64_t current) {
if (ind... | ALGO | 0.999857 | 5.09908 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-07-14T13:57: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": "c6ab023675ef... |
e11042fb-dffa-497a-8145-08f2bbff4a27 | nezticle/EmuMasterPi | src/base/crc32.cpp | /*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty ... | TOOL | 0.949198 | 6.209626 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2012-11-20T16:52:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c6c1d8f76... |
30b98664-5bbb-4770-ae02-fafe6d1ce67f | Sohel440/gfg | Difficulty: Easy/Reverse Words/reverse-words.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
// Function to reverse words in a given string.
string reverseWords(string str) {
// code here
int j =0;
string temp;
vector<string> ans;
int i=0;
... | ALGO | 0.998537 | 5.486741 | {
"github_metadata": {
"branch": "main",
"commit_count": 558,
"repo_created_at": "2024-05-11T20:46:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c20a777143... |
c4126573-0696-4823-b31f-f3290ac7a2e7 | PankillerG/Public_Projects | Programming/CLionProjects/HSE/Contest_4/c/main.cpp | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int m, n;
cin >> m >> n;
string first_w;
vector <string> words;
int maximum = 0, local, sk;
vector <int> first_vect;
cin >> first_w;
for (size_t i = 0; i < n; i++) {
cin >> local;
... | ALGO | 0.999963 | 3.231047 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2019-12-04T17:24:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e929fdc901... |
14e753d0-32e4-4a3c-b836-00f65b23e8ea | H-K-R/Operating-System-Lab | MemoryManagement.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int n, size, f;
cin >> n >> size >> f;
vector<int> page(n, -1);
for (int i = 0; i < n; i++)
{
cin >> page[i];
}
while (1)
{
int t;
cin >> t;
if (t == 0)
break;
cout << "Find... | ALGO | 0.999154 | 3.774453 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2023-07-29T19:34:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 21,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a30b083c0bb... |
631d420f-84f8-4b7a-affd-30a76a2ea6d5 | Karik4044/Problem-Data-Structer | Problem2.cpp | #include <iostream>
using namespace std;
#define MAX 50
void input(char arr[MAX], int n) {
for(int i = 0; i < n; i++) {
cout << "Array[" << i << "]: ";
cin >> arr[i];
}
}
void output(char arr[MAX], int n) {
cout << "Array: ";
for(int i = 0; i < n; i++) {
cout << arr[i] << " ";
}
}
int findX(char arr[MAX... | TOOL | 0.994793 | 4.328386 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-02-18T09:20: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": "5933af252533... |
c379e6df-faff-40b2-8316-546a924701e7 | ishandutta2007/codeforces-t | teja349/normal/1367/D.cpp | //teja349
#include <bits/stdc++.h>
#include <vector>
#include <set>
#include <map>
#include <string>
#include <cstdio>
#include <cstdlib>
#include <climits>
#include <utility>
#include <algorithm>
#include <cmath>
#include <queue>
#include <stack>
#include <iomanip>
#include <ext/pb_ds/assoc_container.hpp>
#include <ex... | ALGO | 0.999846 | 3.165724 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:27: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": "beb865c0567e... |
d310b09c-b1e3-4588-8688-1b0eb021677f | pfanto/NumerovCentralPotentialScattering | potentials.cpp | #include "potentials.hpp"
double CentralPotential (const CentralPotentials pot, const double r, const vector<double> & parameters) {
double value;
switch(pot){
case WS: {
if (parameters.size() != 3) {cerr << "wrong number of parameters for Woods-Saxon." << endl; throw exception();}
value = WoodsSaxon(r,param... | ALGO | 0.991646 | 4.823986 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2018-08-05T21:23: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": "d761ae3750... |
e0773871-c1a6-49ad-8f77-ea61548e79f1 | FangGet/BundleFusion_Ubuntu_Pangolin | include/FreeImage/include/CGAL/Partition_2/Partition_opt_cvx_vertex.h | // Copyright (c) 2000 Max-Planck-Institute Saarbruecken (Germany).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
// You can redistribute it and/or modify it under the terms of the GNU
// General Public License as published by the Free Software Foundation,
// either version 3 of the License, o... | ALGO | 0.99653 | 6.706627 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2020-06-29T03:53:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 132,
"forks": 34,
"issues": 6,
"pull_requests": 0
},
"file_meta": {
"content_id": "234ef29... |
812ac8e9-3087-407a-8a7d-a800587645de | KudeGit/elments_of_programming_interview | first_pass/ch5/es4.cpp | #include <iostream>
#include <stdexcept>
unsigned long findClosest(unsigned long a)
{
for (int i = 0; i < 63; ++i) {
if (((a >> i) & 0x1LU) ^ ((a >> (1+i)) & 0x1LU)) {
a ^= (0x1LU << i) | (0x1LU << (i+1));
return a;
}
}
throw std::invalid_argument("all bits are 1 or ... | ALGO | 0.999432 | 4.511953 | {
"github_metadata": {
"branch": "master",
"commit_count": 53,
"repo_created_at": "2015-10-24T08:50: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": "700488c6e... |
0848ffa8-715c-4c92-8975-822535ac46b7 | far2121/data_structures_assignment | 3.c linear search.cpp | #include <stdio.h>
// Function to perform linear search
int linearSearch(int arr[], int n, int target) {
for (int i = 0; i < n; i++) {
if (arr[i] == target) {
return i; // Return the index if the element is found
}
}
return -1; // Return -1 if the element is not found
}
int mai... | ALGO | 0.998672 | 5.952042 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-11-06T11:28: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": "a770bed2b76a... |
bb679d10-5eb8-4d18-b8ad-ad8f5d3e7498 | pvasbob/rbmRun_cpp | MultiDimArraySort.cpp | #include <algorithm>
#include <stdexcept>
//
#include "MultiDimArraySort.h"
#include "MsgToScreen.h"
void sort2(const int &dim, const double *vector, int *SortedOrder, const bool &SMALLESTFIRST)
{
int SortedOrderTemp;
bool COMPLETED;
// Initialization of SortedOrder Array
for (int i = 1; i <= dim; ++i... | ALGO | 0.99981 | 5.347364 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2024-01-18T05:24:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "98c6976db30... |
44d2a314-ccf5-47a8-9a04-ee599e2fdbd6 | omkarlenka/leetcode | house_robber_II_lc213.cpp | //
// house_robber_II_lc213.cpp
//
// Created by omlenka on 12/02/21.
// Copyright © 2021 <NAME>. All rights reserved.
//
#include <iostream>
#include <vector>
using namespace std;
class Solution {
public:
int rob(vector<int>& nums) {
int n = nums.size();
if(n == 1)
return nums[0];... | ALGO | 0.999978 | 5.289387 | {
"github_metadata": {
"branch": "master",
"commit_count": 447,
"repo_created_at": "2020-04-10T09:27:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e175f56a... |
11cce5cc-27ff-485d-90d4-534a9233cb51 | cyoushika/ACM_Practice_ver2.0 | code/UvaOJ/LinkedList/101.cpp | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
// #define LOCAL
#define MAXN 25
using namespace std;
struct Block{
int value;
int stack;
Block *above, *below;
Block(){};
Block(int v){
value=v;
stack=v;
above=below=NULL;
}
void returning(){
if(above){
Block* up = above;
... | ALGO | 0.999547 | 3.6824 | {
"github_metadata": {
"branch": "master",
"commit_count": 25,
"repo_created_at": "2021-09-28T09: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": "044dc6368... |
79330107-988e-477a-b288-5b683a5c5733 | shreyaanbanerjee/CP-31-Sheet | 1000/trial.cpp | #include <iostream>
#include <vector>
#include <cstring> // For memset
using namespace std;
vector<int> SieveOfEratosthenes(int n)
{
bool prime[n + 1];
memset(prime, true, sizeof(prime));
vector<int> primes;
for (int p = 2; p * p <= n; p++) {
if (prime[p]) {
for (int i = p * p; i... | ALGO | 0.999398 | 4.517397 | {
"github_metadata": {
"branch": "main",
"commit_count": 22,
"repo_created_at": "2024-03-11T13:40: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": "6360a42b545... |
d39fb621-d8dc-4c96-bf9d-b88943943bac | thangitus/LeetCode-Solution | C++/Trie/212. Word Search II.cpp | #include <bits/stdc++.h>
using namespace std;
class Solution {
private:
class Trie {
private:
vector<Trie *> child;
bool isWord = false;
public:
Trie() { child.resize(26); }
~Trie() {
for (int i = 0; i < 26; i++)
delete child[i];
}
... | ALGO | 0.99989 | 5.670053 | {
"github_metadata": {
"branch": "master",
"commit_count": 1100,
"repo_created_at": "2021-03-12T06:15:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ac69ef9... |
021bdb00-73ba-4ccd-a002-4b78b12b8f71 | zokirovjavokhir/C-plusplus-Projects | C++/Digit_Scale_Up/Main.cpp | #include <iostream>
using namespace std;
int main() {
int dgt, scl, i, a;
cin >> dgt;
cin >> scl;
if (dgt < 0 || dgt > 9){
printf("digit must be 0~9");
}
else if(scl < 3 || scl > 10){
printf("scale must be 3~10");
}
else{
if (dgt == 0){
printf(" ");
for(i=0; i<scl; i++){
printf... | ALGO | 0.996351 | 3.140077 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2023-09-25T06:16: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": "13a486bf2bae... |
e502e2ce-4600-4590-badf-51317b3144fd | YashSampat23154/GFG-DSA-SelfPaced | 1_Mathematics/Learn/8_Sieve of Eratosthenes.cpp | #include<bits/stdc++.h>
#define fastio ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL)
#define ll long long
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define rep(i,a,b) for(int i=a; i<b; i++)
//struct Values{
//int x;
//};
using namespace std;
/*
Given a value 'n' w... | ALGO | 0.999704 | 4.696928 | {
"github_metadata": {
"branch": "main",
"commit_count": 191,
"repo_created_at": "2022-05-09T23:53: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": "1b7683d739... |
69de3c22-a3e5-4cc2-bbb3-03a2329bf7bd | sapirAsr/Search-Problem-Solver | Mat.cpp | //
// Created by michal on 19/01/2020.
//
#include "Mat.h"
/**
* constructor
* @param mat the costs of the edges
* @param init the init vertex
* @param goal the goal vertex
* @param r number of rows
* @param c number of columns
*/
Mat::Mat(vector<vector<double >> mat, State<Position> *init, State<Position> *go... | ALGO | 0.99992 | 4.790964 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2020-01-16T10:00: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": "cd768f9a6... |
d4c8b75a-1449-4eca-88d7-f0b94561854e | 7princekumar/ds_algo | trees/narsimha_karumanchi/p61_floor_ceil.cpp | //floor - the largest key in the BST less than or equal to the key
//ceil - the smallest key in the BST greater than or equal to the key
#include <iostream>
#include <vector>
using namespace std;
struct node{
int data;
struct node* left;
struct node* right;
};
typedef struct node* NODE;
NODE new_node(int... | ALGO | 0.999969 | 4.044497 | {
"github_metadata": {
"branch": "master",
"commit_count": 68,
"repo_created_at": "2018-11-14T16:52: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": "2e9b56bd2... |
c680c05a-d701-4001-b6ff-681fc3350b09 | TharinduDilshan/InterviewQuestions2021 | C++/FinwickTree.cpp | //BIT or Fenwick Trees
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define all(v) v.begin(),v.end()
#define pb(x) push_back(x)
#define f first
#define s second
#define vt vector
#define boost ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
const ll mod = 1e9+7;
int gcd(int a,int b){... | ALGO | 0.999083 | 4.853905 | {
"github_metadata": {
"branch": "main",
"commit_count": 250,
"repo_created_at": "2021-10-15T14:05:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 43,
"issues": 8,
"pull_requests": 2
},
"file_meta": {
"content_id": "d3aec5b27... |
4ea64096-fbc1-4793-bd6b-d1a6d268040d | netpipe/IrrlichtDemos | Physics/IrrNewt-2.0/libs/newton-dynamics-2.32/coreLibrary_200/source/physics/dgBilateralConstraint.h | /* Copyright (c) <2003-2011> <<NAME>, Newton Game Dynamics>
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
*... | ALGO | 0.923795 | 6.757174 | {
"github_metadata": {
"branch": "master",
"commit_count": 635,
"repo_created_at": "2013-05-30T21:24:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 35,
"forks": 13,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d978c0... |
b4b26c00-fab3-4f13-8b02-5ca3b9a94a0a | Bharat2044/DSA_PROBLEM_CODES | Projects/02.2D Snake Game Project/game.cpp | #include "game.h"
int game_state = BEFORE_START;
int direction;
int score;
void start_game() {
init_snake();
init_food();
direction = UP; // initially
game_state = STARTED;
score = 0;
}
void end_game() {
// end sate -> before_start state
game_state = ENDED;
}
void pai... | TOOL | 0.932948 | 5.022152 | {
"github_metadata": {
"branch": "main",
"commit_count": 616,
"repo_created_at": "2022-12-23T14:47:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1577a071bf... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.