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 |
|---|---|---|---|---|---|---|---|
65daa8c9-cc35-4eaa-95a4-c060c8b34b37 | Fakhrul0104/Struktur-Data-M.Fakhrul-Zuhdi-23343074 | JobSheet 5 Double and Circular Linked List/Program/Latihan/L2 JS5.cpp | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct gudang {
char nama_barang[50];
int harga;
struct gudang *next;
struct gudang *prev;
};
void cetak(struct gudang* head) {
struct gudang *temp = head;
printf("\n\nList elemen adalah - \n");
while (temp != NULL) {
print... | TOOL | 0.902256 | 4.370963 | {
"github_metadata": {
"branch": "main",
"commit_count": 26,
"repo_created_at": "2024-06-20T02:41: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": "8b393624286... |
bb8a4281-5bac-4aa0-9da4-33b95d826c31 | imthearchitjain/Data-Structures | Trees/Traversals/Nth Node In Inorder Traversal M2.cpp | #include <bits/stdc++.h>
using namespace std;
class binaryTree
{
public:
int data;
binaryTree *left;
binaryTree *right;
binaryTree(int data = 0)
{
left = right = nullptr;
this->data = data;
}
void print()
{
//pre order traversal technique
if (!this)
... | ALGO | 0.999996 | 5.195466 | {
"github_metadata": {
"branch": "master",
"commit_count": 90,
"repo_created_at": "2019-09-08T15:01: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": "264182825... |
92d89a0c-07a0-46c6-99e7-9dfafc1d8782 | ksaveljev/codeforces-edu | disjoint-set-union/step3/A.cpp | #include <iostream>
#include <vector>
using namespace std;
struct Snapshot {
int pa;
int pb;
int sz;
int count;
};
struct DSU {
int count;
vector<int> parent, sz;
vector<Snapshot> snapshots;
vector<int> versions;
DSU(int n) {
count = n;
parent.resize(n+1);
... | ALGO | 0.999564 | 5.659432 | {
"github_metadata": {
"branch": "main",
"commit_count": 41,
"repo_created_at": "2021-02-01T11:43:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 38,
"forks": 13,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "b2864d838... |
5611c8b7-adbd-4e3d-b7f9-a2cadfecc118 | ming-1225/20177699 | src/Sudoku/Sudoku.cpp | #include "stdafx.h"
//#include "stdafx.cpp"
int shudu[9][9], s, t, block = 0, block_line = 0, block_column = 0;
void Input()
{
for (int i = 0; i < s; ++i)
{
for (int j = 0; j < s; ++j)
{
cin >> shudu[i][j];
}
}
}
void Output()
{
for (int i = 0; i < s; ++i)
{
for (int j = 0; j < s; ++j)
{
cout << ... | ALGO | 0.999655 | 5.078424 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2020-03-27T11:28: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": "16476bd72... |
bc426ede-7881-46dc-a05f-eef678af5eab | florence-camilletti/C-Practice-Codes | Graduation.cpp | #include <iostream>
#include <cstdlib>
#include <vector>
#include <thread>
#include <chrono>
class Bunny{
private:
std::string colors[4]={"White","Brown","Black","Spotted"};
std::string names[10]={"Bob","Crigg","Doorknob","Oil","Slam","Skellet0n","Jew","<NAME>","T3mmi","3l1t3 hax0r"};
p... | ALGO | 0.928211 | 3.732701 | {
"github_metadata": {
"branch": "master",
"commit_count": 1009,
"repo_created_at": "2016-10-31T18:05: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": "63889bc... |
0a25d027-eb1e-4996-8972-05e8cfe5648e | nizi24/AtCoder | ABCPastQuestions/arc114/b/main.cpp | #include <bits/stdc++.h>
using namespace std;
using i64 = int64_t;
using ll = long long;
using lint = long long;
typedef vector<long long> vint;
typedef pair<long long, long long> pint;
#define INF INT32_MAX / 2
#define INF64 INT64_MAX / 2
#define EPS 0.001
#define EPS14 1.0E-14
#define REP(i, n) for (ll i = 0; i < n;... | ALGO | 0.99996 | 4.577481 | {
"github_metadata": {
"branch": "master",
"commit_count": 1059,
"repo_created_at": "2021-01-10T08:43: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": "ff3718b... |
80d89d78-1392-4400-8a33-ea50cb996d48 | Kiczor/studia | MetodyImplementacjiAlgorytmow/kon2/a.cpp | #include <cstdio>
#include <algorithm>
#include <vector>
#define pb push_back
#define LL long long int
using namespace std;
const int maxn = 100005;
vector<int> G[maxn];
bool vis[maxn];
int p, np, n;
void dfs( int u, int lev )
{
vis[u] = true;
if( lev % 2 == 0 ) p ++;
else np ++;
for(int i = 0; ... | ALGO | 0.999424 | 3.909237 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2021-08-25T19:00: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": "877897c42b9... |
07badb34-389b-4221-a88f-3e708cac6b5d | arsalqazi3/Contact-Management-System | Contact_management.cpp | #include <iostream>
#include <vector>
#include <string>
using namespace std;
class Contact
{
private:
string name;
string phone_no;
public:
void setName()
{
cout << "Enter the name of the contact: ";
cin.ignore();
getline(cin, name);
}
string getName() const
{
... | TOOL | 0.932946 | 4.854321 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-07-09T17:51: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": "6676f4e0070d... |
ebec85b3-4917-4644-9ca6-fa985c455640 | AbhishekPitroda/CCP-Practicals | 24CE097-Practicals/practical-8.4.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
using namespace std;
struct Student {
string name;
int score;
};
bool compareByScore(const Student& a, const Student& b) {
return a.score > b.score;
}
int main() {
int n;
cout << "Enter number of students: ";
cin... | ALGO | 0.955289 | 3.951866 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2025-04-11T04:29: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": "025c64da0cab... |
9c00eddd-f0c2-4849-82bf-4476e13c18b8 | elc139/t3-gcmazzardo | OpenMPDemoABC.cpp |
/*
Trabalho de programação Programação Paralela
Nome: <NAME>
Matrícula: 201612820
*/
#include <algorithm>
#include <iostream>
#include <string>
#include <thread>
#include <omp.h>
#include <string>
#include <list>
class SharedArray {
private:
char* array;
int index;
int size;
bool exclusaomutu... | ALGO | 0.972624 | 4.719633 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-04-02T14:18:29.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d6f7263c1ff... |
50a3b486-5e30-48d8-89c4-9febabdc6979 | acostaldi/CSCE4133-HW3 | include/graph.hpp | #pragma once
#include <iostream>
#include <vector>
#include <algorithm>
#include <linked_list.hpp>
#include <queue.hpp>
class Graph {
private:
int n; // Number of vertices
std::vector<LinkedList<std::pair<int, int> > > e; // Adjacent list
std::vector<int> traces;
std::vector<bool>... | ALGO | 0.997949 | 3.182518 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-10-25T12:37: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": "db59cbb77af7... |
9a2d4c2c-aee7-4b8c-aae5-5a565b60f83f | francisco-camposs/IMD0030 | Codigos-Aula_2/Exercicio_01.cpp | #include <iostream>
using namespace std;
void encontrar_numeros_amigos (int numero_1, int numero_2);
// ***********************************************************************************
int main () {
int Num_1 = 1;
int Num_2 = 1;
encontrar_numeros_amigos(Num_1, Num_2);
return 0;
}
// *******************... | ALGO | 0.999801 | 4.734228 | {
"github_metadata": {
"branch": "master",
"commit_count": 32,
"repo_created_at": "2019-02-17T13:05:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8e3bf51b9... |
8b60e3bf-068f-4f54-9001-9bfef4788a6c | Deveshb9/OOPL_Basics | Assingment 5/Templates.cpp | //============================================================================
// Name : Templates.cpp
// Author : Devesh
// Version :
// Copyright :
// Description : Hello World in C++, Ansi-style
//============================================================================
#define MAX 5
#include ... | ALGO | 0.939939 | 4.319868 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-02-21T05:01: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": "393a72fc8b... |
8e53534d-7f95-44e9-bdd8-c6d814265db2 | Tencent/ncnn | src/layer/arm/concat_arm.cpp | // Copyright 2019 Tencent
// SPDX-License-Identifier: BSD-3-Clause
#include "concat_arm.h"
#include "cpu.h"
namespace ncnn {
Concat_arm::Concat_arm()
{
#if __ARM_NEON
support_packing = true;
#if NCNN_ARM82
support_fp16_storage = cpu_support_arm_asimdhp();
#endif
#endif // __ARM_NEON
#if NCNN_BF16
suppo... | ALGO | 0.965029 | 6.29576 | {
"github_metadata": {
"branch": "master",
"commit_count": 3535,
"repo_created_at": "2017-06-30T10:55:37.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 21795,
"forks": 4291,
"issues": 1037,
"pull_requests": 82
},
"file_meta": {
"content_id"... |
d1b0d0af-a5ac-48b3-be6b-b176b2b6da26 | Mamun-NSU/Problem-Solving-2025 | codeforces/Problemset/189A - Cut Ribbon.cpp | // Link: https://codeforces.com/problemset/problem/189/A
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
int n, a, b, c;
cin >> n >> a >> b >> c;
vector<int> dp(n + 1, -1); // Initialize DP array with -1
dp[0] = 0; // Base case: 0 length r... | ALGO | 0.999837 | 3.913813 | {
"github_metadata": {
"branch": "main",
"commit_count": 241,
"repo_created_at": "2025-01-15T17:14: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": "d04c57a8d2... |
6fc2bf8e-ab44-430d-8b75-6ca8f75ffffe | YourName0729/competitive-programming | Kattis/primes2.cpp | // https://open.kattis.com/problems/primes2
#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#define For(i, n) for (int i = 0; i < n; ++i)
#define Forcase int __t = 0; cin >> __t; while (__t--)
#define ll long long
#define ull unsigned long long
#define ar array
u... | ALGO | 0.998738 | 4.006376 | {
"github_metadata": {
"branch": "main",
"commit_count": 59,
"repo_created_at": "2021-02-19T08:35:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2c053bb28b8... |
40fe5047-69c9-4779-b7e0-cdae231dc54d | ritikgarg655/CodeForce | Yet_ Another_Counting_Problem.cpp | #include<bits/stdc++.h>
using namespace std;
int main(){
long long int t;cin>>t;while(t--){
long long int a,b,q;cin>>a>>b>>q;
long long int time = 1;
long long int num = a*b/__gcd(a,b);
for(long long int i=0;i<q;i++){
// cout<<i<<endl;
long long int l,r;cin>>l>>r;
long long int ans = r-l+1;
time ... | ALGO | 0.999548 | 3.262674 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2019-12-21T08:00:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1ad6af054... |
22fe006e-b125-4f4e-9d89-c7c3d54ce3a3 | AngelPorrasL/CPP | main.cpp | #include <iostream>
#include <stdlib.h>
#include <time.h>
using namespace std;
void menu1()
{
system("color 0A");
system ("cls");
cout<<"\n\t\t Menu Principal \n\n";
cout<<" 1 Llenar el Vector "<<endl;
cout<<" 2 Llenar de números "<<endl;
cout<<" 3 Imprimir el Vector "<<endl;
cout<<" 4 El mayor, menor, pr... | TOOL | 0.992579 | 3.388705 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-04-29T23:35:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c77c9f413d0f... |
b7310ac0-f571-49f8-8a84-c4f172a1f6d5 | klb3713/aoapc-book | TrainingGuide/bookcodes/ch2/uva10870.cpp | // UVa10870 Recurrences
// <NAME>
#include<iostream>
#include<string>
#include<cstring>
using namespace std;
const int maxn = 20;
typedef long long Matrix[maxn][maxn];
typedef long long Vector[maxn];
int sz, mod;
void matrix_mul(Matrix A, Matrix B, Matrix res) {
Matrix C;
memset(C, 0, sizeof(C));
for(int i = 0;... | ALGO | 0.999968 | 4.116238 | {
"github_metadata": {
"branch": "master",
"commit_count": 198,
"repo_created_at": "2013-09-22T01:26:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 181,
"forks": 56,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "ecddd... |
7d956df6-e22b-4eca-9070-dca6ac93fcc3 | uxlfoundation/oneDNN | src/cpu/x64/gemm/s8x8s32/jit_avx2_u8_copy_sum_bt_kern_autogen.cpp | /*******************************************************************************
* Copyright 2019-2025 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.apa... | ALGO | 0.996494 | 4.033348 | {
"github_metadata": {
"branch": "main",
"commit_count": 20051,
"repo_created_at": "2016-05-09T23:26:42.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3839,
"forks": 1058,
"issues": 35,
"pull_requests": 120
},
"file_meta": {
"content_id": "... |
29e38dcc-d6e4-42d7-9c56-1d0ce9d92251 | abhay121kumar/Ninja | l11 Tree/folder Questions/Q7SumOfAllNodes.cpp | /*
@csalgo
Coding Problem
Problem Statement: Sum of all nodes
Problem Level: EASY
Problem Description:
Given a generic tree, find and return the sum of all nodes present in the given tree.
Input format :
The first line of input contains data of the nodes of the tree in level order form. The order is: data for root nod... | ALGO | 0.999438 | 5.347869 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2023-09-06T07:07:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "26ade0419... |
05f4deac-c9d8-4e60-b726-dd8ea4016938 | nishu271/codechef | apr2014/cnpim.cpp | #include <cstring>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <vector>
#include <list>
#include <stack>
#include <string>
#include <map>
#include <algorithm>
#include <iostream>
#define REP(i,n) for(int i = 0; i < (n); i++)
#define FOR(i,s,n) for(int i = (s); i < (n); i++)
using namespace std;
co... | ALGO | 0.999796 | 4.018637 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2015-07-07T20:06: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": "888d32018a... |
8246dacb-3578-4c00-a9b4-1c17584e599b | Maradoo76/UNLZ2024-Prog1-1C | Clase8/Maximo.cpp | /*En un array de 5 elementos pedirle al usuario que los cargue. Cuando el usuario finalice la carga, debera indicar cual es el mayor ingresado y cual es la
posicion en la que lo ingreso
*/
#include <iostream>
#include <string>
using namespace std;
int main(){
const int totval=5;
int max=0;
int posmax=0;
int valo... | ALGO | 0.999231 | 3.782359 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2024-03-25T21:47:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "192cb056dfd... |
5fb702e0-fe33-4e00-a9a8-c6826feaa6db | ksly0427/SimpleRaytracer | hw4/variables.h | #ifdef MAINPROGRAM
#define EXTERN
#else
#define EXTERN extern
#endif
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtx/string_cast.hpp>
#include <string>
typedef glm::mat3 mat3;
typedef glm::mat4 mat4;
typedef glm::vec3 vec3;
typedef glm::vec4 vec4;
#ifdef MAINPROGRAM
vec3 eyeinit... | TOOL | 0.944973 | 5.055121 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-03-20T03:25: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": "db9f3ba5cf5e... |
3aab07e3-3b36-4597-a629-43564e762085 | jlconlin/PhDThesis | Code/trunk/cpp/Research/ArnoldiResearch.cpp | /*ArnoldiResearch.cpp
This code is used to run Arnoldi's method.
*/
#include <iostream>
#include <string>
#include <complex>
#include "LinearSpaceSource.h"
#include "ArnoldiMC.h"
#include "ArnoldiArgs.hpp"
#include "RandomLib/Random.hpp"
#include "gnuFile.h"
#include "gnuplot_i.hpp"
#include "CartesianMesh1D.hh"
#... | ALGO | 0.999638 | 5.777937 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2016-03-22T14:38:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5790b50b40... |
984f49f2-cf82-408c-b7a8-c536630af310 | ishandutta2007/codeforces-s | square1001/normal/611/E.cpp | #include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
const int inf = 1012345678;
int main() {
cin.tie(0);
ios_base::sync_with_stdio(false);
int N, A, B, C;
cin >> N >> A >> B >> C;
if (A > B) swap(A, B);
if (A > C) swap(A, C);
if (B > C) swap(B, C);
vector<int> V(N);
for (int i = 0; ... | ALGO | 0.999898 | 3.79331 | {
"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": "a013b615e51b... |
046e7259-59a3-4da8-95d1-2142752c7c9c | MassimilianoRozza/EserciziLaboratorio | Esercizi3/3.5_TrovaCarattere/mainCMD.cpp | #include <iostream>
#include <string>
using namespace std;
/*
SUP che data una stringa in input calcola le occorrenze di ogni carattere.
Risolvere il problema usando un unico array per contare le occorrenze.
Stampare il risultato in tabella, con possibili interessanti statistiche a vostra discrezione.
Considerare sol... | TOOL | 0.986464 | 4.374219 | {
"github_metadata": {
"branch": "main",
"commit_count": 22,
"repo_created_at": "2020-10-23T15:37: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": "9f4e3c85221... |
88bd03bd-f518-40b7-bbbf-c8e4b3d79383 | kazuuuuuuuuuuuu/leetcode_solution | 567.cpp | // using a map to record the original freqency and comparing it with the freqency of the substring
// without violating the frequency of the original string
// if the length reaches the right number, return true;
// otherwise return false
class Solution {
public:
bool checkInclusion(string s1, string s2) {
uno... | ALGO | 0.999934 | 5.489759 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2023-10-31T11:32: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": "5153033048f... |
d2c335dd-0c87-41d2-a56f-d4f1145017cd | liukaizheng/VertexClustering | VertexClustering.cpp | #include "VertexClustering.h"
#include "Octree.h"
#include <queue>
#include <functional>
#include <unordered_set>
#include <iostream>
#define printMsg(x) \
std::cout << #x << ": " << x << std::endl;
namespace sigma {
bool facetIsOnBorder(const Mesh& mesh, index_t f)
{
for (index_t c = mesh.facets_.cornerBegi... | ALGO | 0.999377 | 5.206252 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2020-12-22T06:32:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "62b4b45694fa... |
19303d4f-7001-428c-9f30-810ae58a0689 | WhiZTiM/coliru | Archive2/f1/7f1af760599340/main.cpp | #include <cstddef>
#include <array>
#include <iostream>
#include <type_traits>
namespace {
template<size_t N>
struct hierarchy : hierarchy<N+1> { static constexpr size_t value = N; };
template<> struct hierarchy<10> { static constexpr size_t value = 10; };
template<typename T> struct identity { using typ... | TOOL | 0.960115 | 5.144587 | {
"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": "bad78b... |
6dac0a54-1474-4207-831a-f19b2dbb8fbb | alexandraback/datacollection | solutions_5731331665297408_1/C++/SergeyRogulenko/C.cpp | #pragma comment(linker, "/STACK:60000000")
#define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <string>
#include <set>
#include <map>
#include <ctime>
#include <cstring>
#include <cassert>
#include <sstream>
#include <iomanip>
#include ... | ALGO | 0.999981 | 3.558068 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2017-03-08T11:33:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ba8271c9e... |
fe6b8a4c-3d6e-4c62-9021-d58efaeba02a | Ayush900/Data-Strcutures-Implementation-using-cpp- | graph_Generalised-implementation.cpp | #include<bits/stdc++.h>
using namespace std;
template<typename T>
class Graph
{
map<T,list<T>> m;
public:
void AddEdge(T src,T dest,bool bidirec=true)
{
m[src].push_back(dest);
if(bidirec)
{
m[dest].push_back(src);
}
}
void print()
{
for(auto i : m)
{
cout<<i.first<<"--->"... | ALGO | 0.999526 | 4.55463 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2020-12-14T12:23:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4e63717acd43... |
92fe77dd-93e7-4483-be81-b669adf48f7d | KyleDuPlessis/CSC3022H_Lab6 | LAB6/libs/perceptronlib/Perceptron.h | //=================================================================================
// Name : Perceptron.h
// Author : <NAME> [DPLKYL002]
// Date: : 01/10/2019
// Description : An algorithm that uses only perceptrons with threshold
// activation functions and the perceptron learning rule
// (c... | ALGO | 0.957862 | 5.853583 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-11-26T10:46: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": "d7cb483034... |
07b7dd74-8c7c-4af0-8f26-13d5fe277b9b | NihalJaiswal-183/Data-Structure-Algorithm | graph/detectCycle.cpp | // for undirected graph using DFS
#include<bits/stdc++.h>
using namespace std;
class edge{
public:
int src,nbr,wt;
public:
edge(int x,int y,int z)
{
this->src=x;
this->nbr= y;
this->wt=z;
}
};
bool detectCycle(vector<edge> adj[],int src,bool visited[],int parent){
visited[src]=true;
for(auto... | ALGO | 0.999899 | 4.976 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2021-10-16T22:25:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7886cd4fc2... |
4c513672-f5bd-421c-8ede-344660027040 | xyb7910/cpp_fire | 杂项/高精求小数幂.cpp | /*
* @Author: Yanpb
* @Date: 2025-01-12 22:25:25
* @Last Modified by: Yanpb
* @Last Modified time: 2025-01-13 20:22:38
*/
#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
const int N = 1e5 + 10;
string s;
int b;
int A[N], B[N], ans[N];
int l, cnt, len1, len2, len_s; // l 表示 小数点后的位数... | ALGO | 0.999579 | 3.84219 | {
"github_metadata": {
"branch": "main",
"commit_count": 144,
"repo_created_at": "2024-09-28T08:44: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": "983049abfb... |
9ee577d6-8f9b-4756-b444-644fb98ed028 | HarshCasper/NeoAlgo | C-Plus-Plus/dp/K-Tree.cpp | /*
problem link: https://codeforces.com/problemset/problem/431/C
Problem description:
A k-tree is an infinite rooted tree where:
- each vertex has exactly k children.
- each edge has some weight.
- edge weights will be in order 1,2,..k from left most child to right most child
of every node in the tree
count number ... | ALGO | 0.999916 | 4.314786 | {
"github_metadata": {
"branch": "master",
"commit_count": 7521,
"repo_created_at": "2020-06-24T16:04:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 887,
"forks": 1041,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e3... |
c394d405-cf57-4f8b-8dd9-de416cb21522 | mirror/vbox | src/VBox/Runtime/common/checksum/openssl-md4.cpp | /* $Id$ */
/** @file
* IPRT - Message-Digest Algorithm 4.
*/
/*
* Copyright (C) 2009-2024 Oracle and/or its affiliates.
*
* This file is part of VirtualBox base platform packages, as
* available from https://www.virtualbox.org.
*
* This program is free software; you can redistribute it and/or
* modify it unde... | ALGO | 0.976634 | 5.804797 | {
"github_metadata": {
"branch": "master",
"commit_count": 106059,
"repo_created_at": "2013-12-20T23:33:42.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 240,
"forks": 81,
"issues": 8,
"pull_requests": 1
},
"file_meta": {
"content_id": "a15... |
2f7ca70c-0b7a-4f9c-8434-8ee8fa646dde | Taohid0/Contest-programming-problems-and-graph | codeforces 407 B/main.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
long long q,b,l,m,arr[100005];
cin>>b>>q>>l>>m;
bool inf =false;
long long mul;
if(b==0 or q==0 )
{
mul=0;
inf = true;
}
else if(b==1 or q==1)
{
mul = b;
inf =true;
}
long long value,... | ALGO | 0.999914 | 3.183043 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2017-10-28T10:56:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cc18c88480... |
ece48ba0-2e7c-420a-8fd0-725dcd3835f9 | Ruijia1999/Rain3D | AI/NavMesh.cpp | #include "NavMesh.h"
#pragma region Polygon
Rain::AI::Polygon::Polygon() {
}
Rain::AI::Polygon::Polygon(std::vector<Math::Vector2> i_vertices) {
vertices.resize(i_vertices.size());
swap(vertices, i_vertices);
center = GetCenter();
int q;
}
bool Rain::AI::Polygon::IsInPolygon(Math::Vector2 vtc) {
int count = vert... | ALGO | 0.998848 | 4.864703 | {
"github_metadata": {
"branch": "master",
"commit_count": 69,
"repo_created_at": "2022-12-01T07:16: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": "1d5c6cda3... |
79a376e7-a7eb-4a5f-9b8d-cc42aa12c4b5 | BitByte08/Study | 백준/Silver/6603. 로또/로또.cc | #include <algorithm>
#include <iostream>
#include <set>
#include <vector>
using namespace std;
vector<int> binding;
vector<int> ans;
vector<int> used(13, false);
set<vector<int>> ans_set;
void backtracking(int start, int max, int bound);
int main(void) {
while (true) {
int n; cin >> n;
if (!n) retur... | ALGO | 0.999674 | 3.909972 | {
"github_metadata": {
"branch": "main",
"commit_count": 714,
"repo_created_at": "2024-03-05T12:28: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": "ea14533ec8... |
77cd8155-3c1e-4e0e-8aae-e05d056f0019 | dhagarwa/ves3d-cxx0 | src/PVFMMInterface.cc | #include <cstring>
#include <parUtils.h>
#include <vector.hpp>
#include <mortonid.hpp>
#include <fmm_pts.hpp>
#include <fmm_node.hpp>
#include <fmm_tree.hpp>
#include "Logger.h"
template <class Real_t>
static Real_t machine_eps(){
Real_t eps=1;
while(eps*(Real_t)0.5+(Real_t)1.0>1.0) eps*=0.5;
return eps;
}
//... | ALGO | 0.998868 | 3.836456 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-08-18T20:55: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": "e7ebbb2cab... |
0549b2bb-42c2-4f57-955f-e0ec0a6676a5 | realisshomyang/Problem-Solving | 백준/Silver/1932. 정수 삼각형/정수 삼각형.cc | #include <iostream>
#include <algorithm>
using namespace std;
int arr[501][501];
int n;
int dp[501][501];
int answer;
int main()
{
cin >> n;
for (int i = 0; i < n; i++)
{
for (int j = 0; j <= i; j++)
{
cin >> arr[i][j];
}
}
dp[0][0] = arr[0][0];
for (int i ... | ALGO | 0.999978 | 3.737711 | {
"github_metadata": {
"branch": "main",
"commit_count": 147,
"repo_created_at": "2023-03-16T16:24:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "afc24469e9... |
09d98f66-b823-46c3-bbb4-2247bb2f9fab | anonnoy-oniket/CP-templates-and-algos | tree/segment_tree.cpp | const int maxN = 1e5 + 9;
long long a[maxN], t[4 * maxN];
void build(int curr, int b, int e) {
if (b == e) {
t[curr] = a[b];
return;
}
int mid = (b + e) >> 1, l = 2 * curr, r = (2 * curr) + 1;
build(l, b, mid);
build(r, mid + 1, e);
t[curr] = t[l] + t[r]; // change comes he... | ALGO | 0.99994 | 3.70261 | {
"github_metadata": {
"branch": "main",
"commit_count": 32,
"repo_created_at": "2024-08-11T13:49: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": "1b2a398530c... |
6978f2e1-379b-442b-bd88-4671997fcdff | longcngo/Raytracing | Sphere.h | #ifndef SPHEREH
#define SPHEREH
#include "Intersection.h"
/* Sphere.h
A class for spheres in a scene.
The intersect and sample point method uses geometric methods to find the
result. There is also a seperate class for motion blur due to needing
two centers.
*/
class Material;
void get_sphere_uv(... | ALGO | 0.945824 | 6.205215 | {
"github_metadata": {
"branch": "master",
"commit_count": 40,
"repo_created_at": "2019-05-21T03:42:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d2a4df3af... |
39c045ef-52dc-4b24-94ab-4aaa6f8d0003 | leisiji/leetcode-solution | src/19-remove-nth-node-from-end-of-list.cpp | #include <iostream>
#include <vector>
#include "listnode.hpp"
using namespace std;
class Solution
{
public:
ListNode* removeNthFromEnd(ListNode* head, int n);
ListNode* removeNthFromEnd1(ListNode* head, int n);
void printList(ListNode* head);
};
/* 使用一个数组保存 n 个节点,可以实现一次遍历就找到:空间复杂度 O(n),时间复杂度 O(L) */
List... | ALGO | 0.999915 | 5.311486 | {
"github_metadata": {
"branch": "master",
"commit_count": 32,
"repo_created_at": "2020-04-30T13:16:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b8c85a12e... |
0ed6bf36-adb4-4cb7-aaf1-fe44adfd3c28 | zzh1161/numpdes | PoissonBVP/MultiGrid/include/GridDimTwo.hpp | /**************************************************************
> @Description : Multigrid methods in two-dimensional grid
> @Version : 1.0
> @Author : zhang-zh
> @Date : 2022-04-22 15:15
> @LastEditTime : 2022-04-27 15:18
**************************************************************... | ALGO | 0.999284 | 5.148931 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2022-05-25T05:47: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": "9b61be028... |
431ecd16-353d-4240-bb75-778d8d6a153b | trilinos/Trilinos | packages/ml/examples/MLAPI/AdaptiveSA_SAMIS.cpp |
/* ******************************************************************** */
/* See the file COPYRIGHT for a complete copyright notice, contact */
/* person and disclaimer. */
/* ******************************************************************** */
#include "ml_confi... | TOOL | 0.9944 | 5.992024 | {
"github_metadata": {
"branch": "master",
"commit_count": 104031,
"repo_created_at": "2015-11-16T19:39:16.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1299,
"forks": 593,
"issues": 263,
"pull_requests": 61
},
"file_meta": {
"content_id":... |
fae1e7df-26ab-4fa5-8947-f51c8594213e | saifshahh/Practice | Simulation/AVL.cpp | #include <iostream>
#include <algorithm>
using namespace std;
class AVLTree {
public:
// Nested Node struct within AVLTree
struct Node {
int data, height;
Node* left_node;
Node* right_node;
Node(int val) : data(val), height(1), left_node(nullptr), right_node(nullptr) {}
};
... | ALGO | 0.99997 | 6.740736 | {
"github_metadata": {
"branch": "main",
"commit_count": 346,
"repo_created_at": "2023-12-07T09:40:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2e91a5ec73... |
8f83108e-17b2-4c5c-b150-6b6b3ab3c86f | Ron2014/algorithm | huawei_real/must_solve/2_085.cc | /*
1.老李是货运公司承运人,老李的货车额定载货重量为wt
2.现有两种货物,货物A单件重量为wa,单件运费利润为pa,货物B单件重量为wb,单件运费利润为pb
3.老李每次发车时载货总重量刚好为货车额定载货重量wt,车上必须同时有货物A和货物B,货物A、B不可切割
4.老李单车次满载运输可获得的最高利润是多少
*/
/**
* 贪心
*/
#include <iostream>
#include <vector>
using namespace std;
int main(int argc, char *argv[])
{
int wt, wa, pa, wb, pb;
while (cin >> wt ... | ALGO | 0.999971 | 3.545902 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2020-05-21T14:21:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ec1e4b80a... |
b9b02359-da2e-4ee5-8f4a-79b058e04a37 | hh9net/etc | src/CenterSettlement-go/lib7z/Lz77.h | /*****************************
** LZ77.h
*****************************/
/* 使用在自己的堆中分配索引节点,不滑动窗口
** 每次最多压缩 65536 字节数据
** 的优化版本*/
#ifndef _WIX_LZ77_COMPRESS_HEADER_001_
#define _WIX_LZ77_COMPRESS_HEADER_001_
#include "Lz77include.h"
/* 滑动窗口的字节大小*/
#define _MAX_WINDOW_SIZE 65536
#define min(a,b) (((a) < (b)... | ALGO | 0.968902 | 4.115369 | {
"github_metadata": {
"branch": "master",
"commit_count": 143,
"repo_created_at": "2021-03-11T17:13: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": "4d6012a4... |
a34103fb-d189-466c-981d-8aab499d06b0 | RajChaurasia1/Leetcode-Solutions | jump-game-iii/jump-game-iii.cpp | class Solution {
public:
///////////////////////////////////////////////////////////CAN BE SOLVED USING DFS also//////////////////////////////////////////////////
// int dp[50001];
int vis[50001];
int n;
// bool end(vector<int>&arr, int i){
// if(i < 0 || i >= n || vis[i] == 1)
// ... | ALGO | 0.999992 | 4.93202 | {
"github_metadata": {
"branch": "main",
"commit_count": 454,
"repo_created_at": "2021-09-24T04:06:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4fd9ef6979... |
6f1c15be-44de-4883-bd5d-1869e07295c3 | teinhonglo/Homework | Numerical Methods/Newtons_method.cpp | #include <iostream>
#include <iomanip>
#include <cmath>
#define fx value_of_function(chose, x)
#define diff_fx diff_function(chose, x, errors)
#define format 15
#define demarcation "----------------------------------------------------------------------------"
using namespace std;
double diff_function(int, double, dou... | ALGO | 0.999491 | 3.799788 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2015-05-31T02:04: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": "3df9f71e6... |
52db9761-79a6-4e9d-9b2e-79275ff0aa3d | HHsungmoon/Programers | 백준/Gold/2589. 보물섬/보물섬.cc | #include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
using namespace std;
int Y, X;
int** Map_arr;
int dx[4] = { -1,1,0,0 };
int dy[4] = { 0,0,-1,1 };
typedef struct
{
int x;
int y;
int cnt;
}Data;
int BFS(int sx, int sy)
{
vector<vector<int>> visited(Y, vector<int>(X, 0));
queue<Data> ... | ALGO | 0.999623 | 3.670395 | {
"github_metadata": {
"branch": "main",
"commit_count": 143,
"repo_created_at": "2023-03-24T01:24: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": "2d9d9b6b25... |
1937e43e-5204-4fe5-89fa-075654bd68af | immrhrr/DSA_leetcode | 2439-longest-cycle-in-a-graph/longest-cycle-in-a-graph.cpp | class Solution {
public:
int ans = -1;
void dfs(vector<int>& edges, vector<bool>& vis, vector<bool>& in_Rec,vector<int>& count, int curr) {
vis[curr] = true;
in_Rec[curr] = true;
int ngbr = edges[curr];
if (ngbr != -1) {
if (!vis[ngbr]) {
count[ngbr] =... | ALGO | 0.999624 | 5.005708 | {
"github_metadata": {
"branch": "main",
"commit_count": 1199,
"repo_created_at": "2024-12-30T17:50: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": "614595ac8... |
580873ef-d58a-4829-850a-7c036c1c9e0f | townboy/acm-algorithm | HDOJcode/1384 2013-04-27 11 26 43.cpp | ******************************
Author : townboy
Submit time : 2013-04-27 11:26:43
Judge Status : Accepted
HDOJ Runid : 8183939
Problem id : 1384
Exe.time : 3484MS
Exe.memory : 3216K
https://github.com/townboy
******************************
#include<stdio.h>
#include<memory.h>
#include<... | ALGO | 0.99994 | 3.616594 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2014-03-23T03:30: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": "633ab7e9d... |
b9df49a4-8c62-4132-90a1-4befdcf6b088 | klionjarod/Grad-School | Spring 2022/ISC5318 - High-Performance Computing/HW13 - OpenACC Kmeans/Kmeans_ACC.cpp | #include <stdio.h>
#include <stdlib.h>
#include "Jpegfile.h"
#include <chrono>
#include <cfloat>
int main()
{
int k = 4; //number of k-means
int iterations = 1; //Number of iterations to run the algorithm
clock_t t = clock(); //total time elapsed counter
int totalPixels;
UINT height, width; //height and width... | ALGO | 0.998788 | 4.812853 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2022-09-02T18:19: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": "7c68441c53af... |
3c993e58-0526-4c61-90b7-22a25c1cbcb2 | priyankasri1331/Parallel-computing | HW6/GPR_Project.cpp | #include <math.h>
#include "iostream"
#include <omp.h>
#include<stdlib.h>
#include<iomanip>
#include<math.h>
#include <iostream>
#include <cstdlib>
#include <vector>
#include <chrono>
#include <algorithm>
using namespace std;
#define PI 3.14
void eye(vector<vector<double> > *ide_mat, int n)
{
#pragma omp paralle... | ALGO | 0.999728 | 3.734813 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2020-10-20T14:23:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "030cfe0f8... |
35cb96e7-f810-4159-8d64-1cd2ca0966ec | Filipterra/AAL_Knapsack | src/Solution.cpp | /**
* @file Solution.cpp
* @author <NAME>
*
* @brief Knapsack. Solution class implementation.
*
*/
#include "Solution.h"
using namespace Knapsack;
Solution::Solution(): value_(0), used_volume_(0) {};
Solution::Solution(const Solution& other): value_(other.value_), used_volume_(other.used_volume_),
data_(oth... | ALGO | 0.998032 | 5.776743 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2020-05-03T12:48:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a52a31994... |
0f0ee60a-88de-4c38-98e0-b7824e6f05e1 | maihien244/DSA_PTIT | DSAPTIT/SoNguyenTo.cpp | #include <bits/stdc++.h>
using namespace std;
int s, p, n;
vector<int> x;
vector<int> a;
vector<vector<int>> ans;
map<int, int> sangNT;
void Sang() {
sangNT[0] = 1;
sangNT[1] = 1;
for(int i = 4; i <= 200; i += 2) sangNT[i] = 1;
for(int i = 3; i*i <= 200; i += 2) {
if(!sangNT[i]) {
... | ALGO | 0.999385 | 3.897795 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2024-01-29T12:05:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2ce597c5c72a... |
5b04dced-ae50-41f5-8464-ed86611b32bf | Jambuuul/algorithms | data-structures/Segment_Tree/Segment_Max.cpp | struct SegTree {
int size;
vector<int> tree;
void build(vi &a, int x, int lx, int rx) {
if (rx - lx == 1) {
if (lx < sz(a)) {
tree[x] = a[lx];
}
} else {
int m = (lx + rx) / 2;
build(a, 2 * x + 1, lx, m);
build(a, ... | ALGO | 0.99983 | 5.408853 | {
"github_metadata": {
"branch": "main",
"commit_count": 33,
"repo_created_at": "2024-03-22T13:54: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": "a140bd1afed... |
282f4acb-36cc-4784-aa80-577d26d0ab05 | JonSnow1337/Project-Euler | cpp/Problem-9.cpp | /* Problem 9
A Pythagorean triplet is a set of three natural numbers, a < b < c, for which,
a^2 + b^2 = c^2
For example, 3^2 + 4^2 = 9 + 16 = 25 = 5^2.
There exists exactly one Pythagorean triplet for which a + b + c = 1000.
Find the product abc.
*/
#include <iostream>
#include <math.h>
using namespace std;
int... | ALGO | 0.999946 | 4.323374 | {
"github_metadata": {
"branch": "master",
"commit_count": 67,
"repo_created_at": "2015-04-29T22:25:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d55085280... |
a070874b-8d3d-4367-aa38-055a33d2c70f | RyuKaSa/simulation | src/Simulation.hpp | #ifndef SIMULATION_HPP
#define SIMULATION_HPP
#include <vector>
#include <glm/glm.hpp>
#include <atomic>
#include <thread>
#include <mutex>
#include <set>
#include <utility>
#include <glm/gtc/matrix_transform.hpp>
#include <future>
#include <queue>
#include <condition_variable>
#include <stdexcept>
#include <iostream>... | ALGO | 0.955031 | 6.14839 | {
"github_metadata": {
"branch": "dualscene",
"commit_count": 74,
"repo_created_at": "2025-03-16T11:40:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "810714... |
5f12bfaf-bde3-4d31-a668-06d79385fc78 | CaDe27/Coding | ICPC/SegundaFecha2019/2F2019.cpp | #include <iostream>
#include <stdio.h>
#include <cstdint>
#define MOD 1000000007
typedef int64_t ll;
using namespace std;
const int maxN = 10000000;
ll fact[maxN+1], invFact[maxN+1];
int top = 1;
//Problem F from ICPC Mexico 2019
//http://coj.uci.cu/24h/problem.xhtml?pid=4253
ll binPow(ll base, ll exp){
ll r = 1;
w... | ALGO | 0.999867 | 4.310267 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2023-02-23T17:53:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ced371ff90f... |
8b541772-8963-428c-9ef7-48f3d9cb1851 | mondalriddhi/CN-Recursion-2 | return subset of an array.cpp | /* Given an integer array (of length n), find and return all the subsets of input array.
Subsets are of length varying from 0 to n, that contain elements of the array. But the order of elements should remain same as in the input array.
Note : The order of subsets are not important.
Input format :
Line 1 : Size of... | ALGO | 0.999972 | 4.815925 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-02-22T10:11:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9be4dccaba24... |
21aa1c7d-45f4-4e88-938a-7386d4320b27 | Skadi15/Generic_Sort | qsortExampleMod.cpp | //*****************************************************************************
// Written by <NAME>
// Last Modified 23 March 2016
// This is a program to demonstrate a template
// for a quicksort algorithm that works on both
// linked lists as defined here and standard
// arrays
//************************************... | ALGO | 0.999866 | 5.71743 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2016-03-24T05:37: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": "d64f6c541f... |
d2f574d9-841b-436d-ac3e-93121161153a | Pseudo-iitian/DSA_2024 | BinaryTree/4IterativePreorder.cpp | #include<bits/stdc++.h>
using namespace std;
class Node{
public:
int val;
Node* left;
Node* right;
Node(int val){
this->val = val;
this->left = NULL;
this->right = NULL;
}
};
void print(Node* root){
if(root==NULL) return;
cout<<root->val<<" ";
print(root->left);
print(root->right);
}
v... | ALGO | 0.999996 | 5.119926 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2024-01-07T14:09: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": "b1266db78... |
a119deeb-4a08-4b05-96dd-6c3e3f609a61 | khbminus/code2020 | tinkoff/2020/graphs1/src/gen.cpp | #include <bits/stdc++.h>
using namespace std;
int main(){
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
int n = rnd() % 5 + 1;
int d = 3;
vector<vector<int>> g(n, vector<int>(n));
vector<pair<int, int>> edges;
for (int i = 0; i < n; i++){
for (int j = 0; j < n; ... | ALGO | 0.992579 | 3.497923 | {
"github_metadata": {
"branch": "master",
"commit_count": 49,
"repo_created_at": "2020-10-03T15:22:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "719309474... |
2b821291-ce5b-48e6-8deb-70548274b11e | anandvigneshb/githubrepo | os5.cpp | #include <pthread.h> //library function
#include <semaphore.h>
#include <stdio.h>
#include <stdlib.h>
#include "time_functions.h"
typedef struct //common structure to update and read
{
int seconds;
int milliseconds;
}common;
common db;
typedef struct //structure to hold the reader and writer number
{... | ALGO | 0.986419 | 4.809715 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2014-04-04T22:57:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "eba08e4200... |
6f9b1c25-d646-45e3-a838-3d76a598c71e | greeshma0601/Datastructures | Hashing/Rearrange an array.cpp | /*
Rearrange an array such that arr[i] = i
Given an array of size N that has elements ranging from 0 to N-1. All elements may not be present in the array. If element is not present then there will be -1 present
in the array. Rearrange the array such that A[i] = i, and if i is not present, display -1 at that place.
In... | ALGO | 0.999295 | 4.304042 | {
"github_metadata": {
"branch": "master",
"commit_count": 89,
"repo_created_at": "2018-12-26T13:22: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": "88c7be597... |
0ac52a5d-df53-4db8-86df-0cf7a2754f3f | moqiyinlun/Bubble-Burst | SZHSolver/SZHSolver.cpp |
#include "vec.h"
#include <iostream>
#include <fstream>
#include <chrono>
#include <stdio.h>
#include <map>
#include <numeric>
#include <Eigen/Sparse>
#include <igl/per_vertex_normals.h>
#include <igl/writeOBJ.h>
#include <igl/read_triangle_mesh.h>
#include <igl/cotmatrix.h>
#include <igl/invert_diag.h>
#include <igl... | ALGO | 0.999059 | 3.464421 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2024-06-07T15:28:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ac240ce2f5d... |
444ac03b-713c-4cc8-982c-d6fa2ee418ca | SubratKumarSingh2001/Data-Structures-and-Algo-DSA-Supreme | Lectures Codes/Linked List/Lec 4/main (27).cpp | #include <iostream>
using namespace std;
class Node{
public:
int data;
Node* next;
Node(int data) {
this->data = data;
this->next = NULL;
}
};
void print(Node* head) {
Node* temp = head;
while(temp != NULL) {
cou... | ALGO | 0.999965 | 4.576301 | {
"github_metadata": {
"branch": "main",
"commit_count": 318,
"repo_created_at": "2023-02-07T05:40:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 79,
"forks": 9,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "25e965c24... |
d48c2fb4-15a2-4364-b537-b7717567e0a4 | lamoreauxaj/competitive-programming | Plano West/2019/angry.cpp | #include <bits/stdc++.h>
using namespace std;
int N;
vector<pair<pair<int, bool>, int>> events;
int main() {
ios_base::sync_with_stdio(false);
// input and create events to sort
cin >> N;
for (int i = 0; i < N; i++) {
int A, B, C;
cin >> A >> B >> C;
events.push_b... | ALGO | 0.99978 | 4.480434 | {
"github_metadata": {
"branch": "master",
"commit_count": 56,
"repo_created_at": "2019-02-07T18: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": "1379b6d72... |
4f350129-cda9-4d5d-b78f-7416adf604d7 | jordandong/mylintcodes | LINT_00445_CosineSimilarity.cpp | /*
Cosine similarity is a measure of similarity between two vectors of an inner product space that measures the cosine of the angle between them. The cosine of 0° is 1, and it is less than 1 for any other angle.
See wiki: Cosine Similarity https://en.wikipedia.org/wiki/Cosine_similarity
Here is the formula: s = Sum(Ai ... | ALGO | 0.999857 | 6.044344 | {
"github_metadata": {
"branch": "master",
"commit_count": 818,
"repo_created_at": "2014-12-07T08:10:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d7a7030b... |
65cc9758-81cc-4946-8a9c-23016443d346 | ndhuanhuan/16_coding_practice | 201-400/245. Shortest Word Distance III.cpp | //http://www.cnblogs.com/grandyang/p/5192426.html
class Solution {
public:
int shortestWordDistance(vector<string>& words, string word1, string word2) {
int p1 = words.size(), p2 = -words.size(), res = INT_MAX;
for (int i = 0; i < words.size(); ++i) {
if (words[i] == word1) p1 = word1 ==... | ALGO | 0.999982 | 5.931492 | {
"github_metadata": {
"branch": "master",
"commit_count": 1546,
"repo_created_at": "2016-07-14T03:20: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": "fb9903a... |
6a9f57cd-985c-44a2-9ebf-1cc71e93282b | maxsu/balancers2 | include/flow.hpp | // Tools for the Network/Matrix domain
#pragma once
#include "matrix.hpp"
#include "network.hpp"
#include "wiring.hpp"
//////////////////////////////
// Flow operations
//////////////////////////////
// Generate a balancer flow
Matrix balancerFlow(int input_num, int output_num);
// Calculate the flow of a splitter... | ALGO | 0.939995 | 5.852147 | {
"github_metadata": {
"branch": "main",
"commit_count": 81,
"repo_created_at": "2022-02-23T09:01:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 15,
"pull_requests": 0
},
"file_meta": {
"content_id": "63719226ed... |
9f2df98c-b89a-443a-8565-79cd9afd6f10 | srcode03/codingquestions | Sum of XOR of all pairs - GFG/sum-of-xor-of-all-pairs.cpp | //{ Driver Code Starts
// An efficient C++ program to compute
// sum of bitwise OR of all pairs
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
#define ll long long
class Solution{
public:
// Returns sum of bitwise OR
// of all pairs
long long int sumXOR(int arr[], int n)
{
... | ALGO | 0.999621 | 5.133804 | {
"github_metadata": {
"branch": "main",
"commit_count": 966,
"repo_created_at": "2023-02-20T18:06: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": "dad7b46c73... |
c7459a03-1fda-456c-ba8f-cfee209c601c | iamsteven526/master | SCMA/gdmascma/gdmascma+cluster/bpsk/main.cpp | #include <iostream>
#include "parameters.h"
#include <cmath>
using namespace std;
#pragma warning (disable : 4996)
//--------- scma matrix-------------//can be generalize
int scma_matrix[SCMA_SOURCE][SCMA_SOURCE * NUM_USER / SCMA_USER_SOURCE] = { {0,1,1,0,1,0}, {1,0,1,0,0,1}, {0,1,0,1,0,1}, {1,0,0,1,1,0} };
//12use... | ALGO | 0.99966 | 4.258712 | {
"github_metadata": {
"branch": "master",
"commit_count": 266,
"repo_created_at": "2020-08-31T16:40: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": "68f8dc36... |
d2a70bca-9262-4691-81fb-5984571760a6 | zf-w/mini_problem_collection_before_y2023m11 | Leetcode/Leetcode.307.range-sum-query-mutable/Leetcode.307.range-sum-query-mutable.cpp | /*
* @lc app=leetcode id=307 lang=cpp
*
* [307] Range Sum Query - Mutable
*/
#include <vector>
using namespace std;
// @lc code=start
class FenwickTree {
public:
FenwickTree(int size) {
size_ = size + 1;
frequency_table_.assign(size + 1, 0);
}
int RangeSumQuery(in... | ALGO | 0.999922 | 7.077417 | {
"github_metadata": {
"branch": "main",
"commit_count": 233,
"repo_created_at": "2022-06-30T00:23:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "363e7c5c03... |
619d7f40-1fd3-4e74-8fcf-a0b853ba70d0 | ejdam87/leetcode-hub | medium/rset.cpp | #include <set>
#include <random>
#include <iostream>
class RandomizedSet
{
private:
std::set<int> data;
public:
RandomizedSet() : data(std::set<int>()) {}
bool insert(int val)
{
auto res = data.insert(val);
return res.second;
}
bool remove(int val)
{
if (data.e... | ALGO | 0.962768 | 6.189639 | {
"github_metadata": {
"branch": "main",
"commit_count": 148,
"repo_created_at": "2024-09-18T14:08: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": "8bb726ccda... |
8f127d45-dda0-486d-807e-936356bf1e1a | berdanakyurek/CS202-Fundamental-Structures-Of-Computer-Science-II | HW1Old/sorting.cpp | /*
* Title: Algorithm Efficiency and Sorting
* Author: <NAME>
* ID: 21600904
* Section: 1
* Assignment: 1
* Description: This is the collection of sorting algoritms used in this assignment. Some of them are taken from lecture slides.
*/
#include "auxArrayFunctions.h"
#include <iostream>
#include <ctime>
#include <ioma... | ALGO | 0.999387 | 6.055596 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2021-12-29T14:09: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": "7dc315e6c41... |
b1e2ac48-13e5-45d0-a7f7-fdd815a899bf | Guberlo/University | algoritmi/Lab/level-4/heapify/heapify.cpp | /**
* Esercizio davvero cringe:
* chiede il numero delle operazioni di heapify ed
* extract max ma vuole solo quelle di heapify
*/
#include <iostream>
#include <fstream>
using namespace std;
template <class T> class MaxHeap {
private:
T* queue;
int size;
int counter;
int le... | ALGO | 0.985073 | 3.778085 | {
"github_metadata": {
"branch": "master",
"commit_count": 109,
"repo_created_at": "2018-05-29T18:36:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 15
},
"file_meta": {
"content_id": "3bfee80... |
095213e0-bd1c-400d-8a4f-82c6923a91b2 | pkgw/nrao-casacore | scimath/Mathematics/FitToHalfStatistics.h | //# Copyright (C) 2000,2001
//# Associated Universities, Inc. Washington DC, USA.
//#
//# This library is free software; you can redistribute it and/or modify it
//# under the terms of the GNU Library General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or (at your
/... | ALGO | 0.992594 | 7.222369 | {
"github_metadata": {
"branch": "trunk",
"commit_count": 2083,
"repo_created_at": "2012-10-06T16:28:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "62153f0f... |
c351dcfa-b779-4c1e-8e6e-a0bf04908b14 | lorenzeryk/Sparse-Matrix-Multiplication | Verification/ALGLIB/linalg.cpp | /*************************************************************************
ALGLIB 3.19.0 (source code generated 2022-06-07)
Copyright (c) <NAME> (ALGLIB project).
>>> SOURCE LICENSE >>>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as publishe... | ALGO | 0.998009 | 5.883172 | {
"github_metadata": {
"branch": "main",
"commit_count": 32,
"repo_created_at": "2022-09-04T18:32: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": "f053caeb0b8... |
d1694e89-f63d-4dc9-b90d-dc4968aa55de | gbakkk5951/OriginalProblems | 红色警戒杯模拟赛Ⅶ/基因突变/std.cpp | using namespace std;
int main() {}
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <cctype>
#include <algorithm>
#include <bitset>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <sstream>
#include <vector>
#include <cmath>
#include <complex>
namespace OI {... | ALGO | 0.999971 | 3.576794 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2017-12-27T14:52:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ea7a06739b... |
06b17966-0e6d-4370-8faf-5051ceb1cb14 | malino-dev/cpp-tests | core/linked_list/singly_linked_list/singly_linked_list.h | #ifndef SINGLY_LINKED_LIST_H
#define SINGLY_LINKED_LIST_H
#include <cstdint>
#include <initializer_list>
#include <functional>
#include <stdexcept>
#include "singly_linked_list_node.h"
#include "singly_linked_list_iterator.h"
namespace mylib {
template<typename Value>
class singly_linked_list_t {
pri... | TOOL | 0.999239 | 5.687631 | {
"github_metadata": {
"branch": "master",
"commit_count": 53,
"repo_created_at": "2018-07-17T14:13: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": "c4c1f007e... |
08de6b83-dbcc-4451-bd4e-d778bb044151 | matsuren/fvp_calibration | src/optimizer.cpp | #include <ceres/ceres.h>
#include <Eigen/Geometry>
#include <glog/logging.h>
#include <opencv2/opencv.hpp>
#include "ocam_functions.hpp"
#include "reprojection_error.hpp"
#include "calibration.hpp"
#include "optimizer.hpp"
Optimizer::Optimizer(const std::string data_folder, const cv::Mat& obj_pts, const std::string o... | ALGO | 0.943668 | 5.787723 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2019-12-22T07:30:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4005d7f711... |
4911e830-e794-48ac-af2f-5a07cac6199e | ZXPrism/CP-Solutions | AtCoder/ABC392/E.cpp | #include "bits/stdc++.h"
using u64 = unsigned long long;
using i64 = long long;
class DSU {
public:
explicit DSU(size_t n) {
_Parent = std::vector<int>(n + 1, -1);
}
void Unite(int x, int y) {
x = Find(x);
y = Find(y);
if (x != y) {
if (_Parent[x] > _Parent[y])... | ALGO | 0.999903 | 4.652602 | {
"github_metadata": {
"branch": "main",
"commit_count": 35,
"repo_created_at": "2025-01-26T15:13: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": "091bd65bfd0... |
0ec2a7f4-6fba-4ab1-8a88-cce0fe0e325a | BAEK0111/BOJ | 백준/Silver/1697. 숨바꼭질/숨바꼭질.cc | #include <bits/stdc++.h>
#define endl '\n'
using namespace std;
#define MAX 100'001
int N, K;
//int graph[MAX];
int dist[MAX];
bool is_inside(int x) {
return (0 <= x && x < MAX);
}
queue<int> q;
void bfs(int x) {
q.push(x);
// cout << "x: " << x << endl;
while (!q.empty()) {
int cx = q.fr... | ALGO | 0.999957 | 3.745599 | {
"github_metadata": {
"branch": "main",
"commit_count": 43,
"repo_created_at": "2024-07-07T11:32:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "238c3b21a97... |
36d6a7f7-4c0d-4578-af90-4b43d810c3b8 | hengli/camodocal | src/dbow2/DBoW2/BowVector.cpp | /**
* File: BowVector.cpp
* Date: March 2011
* Author: <NAME>
* Description: bag of words vector
*
* This file is licensed under a Creative Commons
* Attribution-NonCommercial-ShareAlike 3.0 license.
* This file can be freely used and users can use, download and edit this file
* provided that credit is attr... | TOOL | 0.932347 | 5.024144 | {
"github_metadata": {
"branch": "master",
"commit_count": 200,
"repo_created_at": "2013-03-14T10:42:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1235,
"forks": 392,
"issues": 54,
"pull_requests": 2
},
"file_meta": {
"content_id": "40... |
11d28933-5c90-4229-8946-0439482a0171 | codewithmitesh/Data-Structures-and-Algorithms | HashTable/LongestSubarrayWithGivenSum.cpp | /**
* @file LongestSubarrayWithGivenSum.cpp
* @author codewithmitesh (<EMAIL>)
* @brief
* @version 0.1
* @date 2021-11-21
*
* @copyright Copyright (c) 2021
* Problem Link :- https://www.geeksforgeeks.org/longest-sub-array-sum-k/
*
* Solution :-
*
int lenOfLongSubarr(int A[], int N, int K)
{
unordered_... | ALGO | 0.999864 | 5.643013 | {
"github_metadata": {
"branch": "main",
"commit_count": 51,
"repo_created_at": "2021-11-19T11:06:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4b803e92d87... |
3d352599-02b2-4dd4-b457-fac71b9c0c00 | CarlosGabrielMoralesUmasi/Some-data-structures-2 | bfs.cpp | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
// Función para realizar el recorrido BFS en el grafo
void BFS(vector<vector<int>>& graph, int startVertex) {
int numVertices = graph.size();
vector<bool> visited(numVertices, false); // Vector para realizar seguimiento de los nodos v... | ALGO | 0.999789 | 5.852805 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2023-06-18T02:20: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": "859ef48c84b... |
76f3ab68-6a56-4aea-9520-ac11cc622e5e | rxy369/High-Performance-Computing-Projects | homework6/ImageSearch.cpp |
/*CopyRight 2017 <NAME>
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/*
* File: main.cpp
* Author: sosanma
*
* Created on April 12, 2017, 11:52 PM
*/
#include <cstdlib>
#i... | TOOL | 0.936228 | 4.051546 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2017-01-25T00:39: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": "38c26d764... |
8f7838b0-bcfc-4489-a338-789cc2afb9bc | pranshu667/dsa | algos/codeforces/problem1327B.cpp | using namespace std;
#include <bits/stdc++.h>
int main()
{
int t;
cin >> t;
while (t--)
{
int n;
cin >> n;
vector<bool> v(n + 1, false);
int princess = -1;
for (int i = 0; i < n; i++)
{
int k;
cin >> k;
bool found = 0;... | ALGO | 0.999929 | 3.93162 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-07-16T23:48: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": "fce171fa2b... |
d68a6e6a-b2f8-4c70-baa9-0434b44048d3 | HPCSYSPROS/Workshop20 | Application_performance_in_frontera_acceptance_process/artifacts/namd/code/NAMD_2.12_Source/src/Sequencer.h | /**
*** Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by
*** The Board of Trustees of the University of Illinois.
*** All rights reserved.
**/
#ifndef SEQUENCER_H
#define SEQUENCER_H
#include "converse.h"
#include "Priorities.h"
#include "PatchTypes.h"
class HomePatch;
class SimParameters;
class SubmitReductio... | ALGO | 0.987665 | 3.42266 | {
"github_metadata": {
"branch": "master",
"commit_count": 28,
"repo_created_at": "2020-12-10T22:00:26.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "eb61f768ff... |
db1f580d-b3ce-48a6-a30b-889b850c73bd | thepluck/CP-Training | TraiheThaiNguyen/Day3/prborder.cpp | #include <bits/stdc++.h>
using namespace std;
#define lb lower_bound
#define ub upper_bound
#define fi first
#define se second
#define eb emplace_back
using ii = pair <int, int>;
const int N = 1e6 + 5;
vector <int> x[N], y[N];
vector <array <ii, 2>> rec;
map <ii, int> mp;
int range(int i, int j, const vector <int> ... | ALGO | 0.99999 | 4.694718 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2023-12-11T09:33: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": "c3a54f408a6a... |
25116e97-41e4-49ef-a197-2e39b45979e2 | AMDResearch/introduction_to_hip | exercises/09_scale_and_shift/scale_and_shift.cpp | #include <stdio.h>
#include <math.h>
#include "hip/hip_runtime.h"
/* Macro for checking GPU API return values */
#define gpuCheck(call) \
do{ \
hipErr... | ALGO | 0.934589 | 4.8036 | {
"github_metadata": {
"branch": "master",
"commit_count": 65,
"repo_created_at": "2023-10-24T17:20:23.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 13,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "13dc865e0... |
d570057c-554f-4e3f-97f4-b791e41d48e6 | williamhyin/CarND-PID-Control | src/main.cpp | #include <math.h>
#include <uWS/uWS.h>
#include <iostream>
#include <string>
#include "json.hpp"
#include "PID.h"
// for convenience
using nlohmann::json;
using std::string;
using namespace std;
// For converting back and forth between radians and degrees.
constexpr double pi() { return M_PI; }
double deg2rad(double... | WEB | 0.936951 | 5.143512 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-02-21T17:15:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3af40d04f7... |
8ab218f5-ffa6-43ff-8f32-09e8027c182c | shishir2305/CoderArmySheetSolutions | 11_Backtracking/476.cpp | // letter phone
// algorithm -> using recursion along with for loop we can successively go to
// every element of a phone letter and store it
// t.c -> O(4^n * n)
// s.c -> O(n)
#include <bits/stdc++.h>
using namespace std;
void solve(string digits, int index, string output, vector<string> &ans,
vector<st... | ALGO | 0.999845 | 6.04845 | {
"github_metadata": {
"branch": "master",
"commit_count": 113,
"repo_created_at": "2023-08-19T13:15: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": "e91f448f... |
5a74613b-4878-4e7e-a2cf-2d924168d48e | hilings/leetcode | cpp/101_200/123.cpp | //
// 123.cpp
// leetcode
//
// Created by <NAME> on 2/5/16.
// Copyright © 2016 Hilings Studio. All rights reserved.
//
#include <iostream>
#include <vector>
#include <climits>
using namespace std;
class Solution {
public:
int maxProfit(vector<int> & prices) {
if (prices.empty())
return 0... | ALGO | 0.998811 | 5.597747 | {
"github_metadata": {
"branch": "master",
"commit_count": 266,
"repo_created_at": "2015-04-12T00:16: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": "f19560c2... |
344abaec-1310-49f0-a07a-10147894bcfe | FlominatorGD/vendor_samsung_slsi | exynos/camera/core/src/common_v2/Tuning/LEDCalibration/awb_cal.cpp | /* #define LOG_NDEBUG 0 */
#define LOG_TAG "ExynosCameraComputeAvgValue"
#include <log/log.h>
#include <iostream>
#include "awb_cal.h"
#define AVG_BOUNDARY 25
int ComputeAvgValue(const int w, const int h, const int bayerOrder,
char* bayerMemory,
const int cx, const int cy, con... | ALGO | 0.963482 | 5.557236 | {
"github_metadata": {
"branch": "android10-e850-96",
"commit_count": 13,
"repo_created_at": "2023-02-27T18:12: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":... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.