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 |
|---|---|---|---|---|---|---|---|
ba1310c3-2bbe-4449-979a-4f845a6550b1 | shrey/templates_cpp | ConceptsAndQuestions/Questions/codeforces/670c.cpp |
//<NAME>
//Contact Me at <EMAIL>
#include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<unordered_map>
#include<vector>
#include<set>
#include<list>
#include<iomanip>
#include<queue>
#include<stack>
#include <math.h>
#define YES cout<<"YES"<<"\n"
#define NO cout<<"NO"<<"\n"
#define prDou... | ALGO | 0.999827 | 3.57709 | {
"github_metadata": {
"branch": "master",
"commit_count": 85,
"repo_created_at": "2020-07-29T11:38: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": "b5879bf0f... |
33024a8a-64d2-4849-a104-080f2196762e | arjun-mittu/data-structures | coding blocks/trees/bottom_view.cpp | #include <iostream>
#include <map>
#include <vector>
#include <queue>
using namespace std;
class node
{
public:
int data;
node *left;
node *right;
node(int d)
{
data = d;
left = NULL;
right = NULL;
}
};
node *build()
{
int d;
cin >> d;
queue<node *> q;
nod... | ALGO | 0.999981 | 3.947811 | {
"github_metadata": {
"branch": "master",
"commit_count": 54,
"repo_created_at": "2020-05-09T18:20:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1e3b26d05... |
38850034-eea1-4e47-b15b-5f966acc507d | bxl295/m4extreme | include/External/stlib/packages/geom/mesh/iss/IndSimpSetIncAdj.ipp | // -*- C++ -*-
#if !defined(__geom_IndSimpSetIncAdj_ipp__)
#error This file is an implementation detail of the class IndSimpSetIncAdj.
#endif
namespace geom {
template<std::size_t _N, std::size_t _M, typename _T>
inline
bool
IndSimpSetIncAdj<_N, _M, _T>::
isVertexOnBoundary(const std::size_t vertexIndex) const {
... | ALGO | 0.978611 | 6.466433 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-08-29T20:06: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": "6aa57eb86b... |
5ba792c9-e7d3-4222-8840-3a76a83b3ccf | caiorss/C-Cpp-Notes | src/cpp-functor.cpp | /* File: cpp-functor.cpp
* Author: <NAME> caiorss <dot> rodrigues <at> gmail <dot> com
* Brief: Demonstration of C++ functor-function object.
* Description:
* Note: This example focus on scientific computing, but can be extended
* to other domains.
*
* Compile: $ cla... | TOOL | 0.949757 | 6.925745 | {
"github_metadata": {
"branch": "master",
"commit_count": 1748,
"repo_created_at": "2017-06-04T18:13:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 738,
"forks": 144,
"issues": 2,
"pull_requests": 4
},
"file_meta": {
"content_id": "971... |
25328bdd-32b6-4628-883f-fb8b2fc75cf0 | shokkirov/homework-6 | main.cpp | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
int num {};
template <typename T>
void consoleInput (T& var) {
std::cin >> var;
}
template <typename T>
T consoleInput () {
T a {};
std::cin >> a;
return a;
}
std::string getConsoleLineString () {
std::string w = "";
... | ALGO | 0.999116 | 3.804836 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-05-15T07:58: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": "a2b167b5f103... |
100660bb-a7d5-417a-869c-4ece91afd47b | Rey-han-24/Number_guessing_game | Number_guessing_game.cpp | #include <iostream>
#include <cstdlib>
#include <ctime>
#include <cmath>
using namespace std;
int main() {
char playAgain;
do {
int secretNumber, userGuess;
int attempts = 0;
const int MAX_TRIES = 7;
srand(time(0));
secretNumber = rand() % 100 + 1;
cout << "Welc... | ALGO | 0.953208 | 4.112708 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2025-04-26T09:59: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": "9550ec4000... |
5fc8d086-e4d9-442a-ba35-6256e5fe6144 | krgoodnews/Algorithm | CppAlgorithm/CppAlgorithm/Backjoon/11403.cpp |
#include <iostream>
#include <vector>
#include <queue>
using namespace std;
const int MAX = 100;
int graph[MAX][MAX];
vector<vector<int>> aList(MAX);
int result[MAX][MAX];
/*
7
0 0 0 1 0 0 0
0 0 0 0 0 0 1
0 0 0 0 0 0 0
0 0 0 0 1 1 0
1 0 0 0 0 0 0
0 0 0 0 0 0 1
0 0 1 0 0 0 0
*/
void bfs(int n) {
queue<in... | ALGO | 0.999986 | 4.687218 | {
"github_metadata": {
"branch": "master",
"commit_count": 34,
"repo_created_at": "2018-09-05T08:09:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "91231cfcd... |
2eb5b7b6-7ecf-462f-9247-0a3712d04bee | dhh16/eebo | eebo-tcp-similarity/normalised.cc | #include <algorithm>
#include "parser.h"
static std::string light_trimmed(const std::string& x) {
std::string y;
bool seen_ws = false;
for (char c : x) {
if (std::isspace(c)) {
seen_ws = true;
} else {
if (seen_ws) {
y += ' ';
}
... | TOOL | 0.908984 | 4.794051 | {
"github_metadata": {
"branch": "master",
"commit_count": 100,
"repo_created_at": "2016-05-09T19:18:44.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c01652644... |
73703005-d31e-461e-9eba-9c63f461452e | shubham-up-47/DSA_Codes | Linked List/singly_LL.cpp | #include <bits/stdc++.h>
using namespace std;
class Node
{ public:
int data; // data of current node of singly Linked List
Node *next; // address of next node of singly Link... | ALGO | 0.999608 | 4.628511 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-04-11T18:13:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1ef77159bd3e... |
b12d81ce-9520-4e7b-84f8-6608491327a4 | mlpack/mlpack | src/mlpack/methods/neighbor_search/unmap_impl.hpp | /**
* @file methods/neighbor_search/unmap_impl.hpp
* @author <NAME>
*
* Auxiliary function to unmap neighbor search results.
*
* mlpack is free software; you may redistribute it and/or modify it under the
* terms of the 3-clause BSD license. You should have received a copy of the
* 3-clause BSD license along w... | ALGO | 0.990152 | 6.300774 | {
"github_metadata": {
"branch": "master",
"commit_count": 30653,
"repo_created_at": "2014-12-17T18:16:59.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5396,
"forks": 1663,
"issues": 16,
"pull_requests": 9
},
"file_meta": {
"content_id": "... |
b6430976-6655-4303-af0b-5dc80b7745c4 | knuu/competitive-programming | codeforces/cdf343_2c.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
typedef pair<ll, ll> Pll;
typedef vector<int> Vi;
//typedef tuple<int, int, int> T;
#define FOR(i,s,x) for(int i=s;i<(int)(x);i++)
#define REP(i,x) FOR(i,0,x)
#define ALL(c) c.begin(), c.end()
#define DUMP( x ) cerr << #x... | ALGO | 0.999993 | 3.963937 | {
"github_metadata": {
"branch": "master",
"commit_count": 86,
"repo_created_at": "2014-12-11T18:59: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": "e8323ea3e... |
a2ef87db-ad95-4ec9-8703-cc778523395b | Huzaifa-5320/Data-Structures-using-C- | LinkedList.cpp | #include<iostream>
using namespace std;
class Node{
public:
int data;
Node *next;
Node(int val)
{
data=val;
next=NULL;
}
};
void insert(int data, Node *&head)
{
Node *newNode = new Node(data);
newNode->next = head; // Works correctly whether head is nullptr or not
... | ALGO | 0.999119 | 5.173675 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2024-10-31T15:06: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": "dd23687b7b5... |
f3e601a6-9ca0-4fe0-9c33-34cdf9fce49a | Harishankeryadav/Coddign-Practice-Questions | TREE/removeLeafnodes.cpp | #include <iostream>
#include <queue>
#include <stdlib.h>
#include "TimerClock.h"
using namespace std;
// tree class
class Node
{
public:
Node *left;
Node *right;
int data = 0;
Node(int data)
{
this->data = data;
left = NULL;
right = NULL;
}
};
// level wise printing.
v... | ALGO | 0.999943 | 4.046234 | {
"github_metadata": {
"branch": "main",
"commit_count": 114,
"repo_created_at": "2022-10-07T13:12: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": "063c388880... |
895ae6a5-6b33-495f-9c3b-49ce1677b483 | atticus453/Leetcode-Practice | cpp_files/76.cpp | #include <iostream>
#include <limits.h>
#include <string>
#include <vector>
#include <queue>
#include <sstream>
#include <algorithm>
using namespace std;
class Solution {
public:
string minWindow(string s, string t) {
unordered_map<char, int> charFrequencyMapT;
unordered_map<char, int> charFrequen... | ALGO | 0.999989 | 6.141815 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-08-13T08:56: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": "5f395d88cfd1... |
4423f6b3-49f6-4ef6-afff-bc19c8634b7e | gotoplace/PS | group_study_2nd/group1/week_01/04_BOJ_2309_v4.cpp | /*
https://www.acmicpc.net/problem/2309 : 일곱 난쟁이
DFS, 순차적으로 합을 구하여 7명 & 합 100을 만족하면 재귀 중단, sel[] == 1 해당되는 난쟁이만 출력
2016KB 0ms
*/
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
int d[10], sel[10]; // sel[] : 조합을 얻고, 해당 값이 1인 경우만 d[] 출력하면 정답
void InputData() {
ios::sync_with_stdio(0);
cin.tie(0);
... | ALGO | 0.99977 | 4.529654 | {
"github_metadata": {
"branch": "main",
"commit_count": 217,
"repo_created_at": "2021-02-24T09:05:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8c0eedc9b9... |
b6f1d7a2-a5a8-419f-959d-a6f57c4cb968 | realAYAYA/UnrealEngine-ToonLit | UnrealEngine/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/LightmapDenoising.cpp | // Copyright Epic Games, Inc. All Rights Reserved.
#include "LightmapDenoising.h"
#include "GPULightmassCommon.h"
#include "Async/ParallelFor.h"
FDenoiserFilterSet::FDenoiserFilterSet(FDenoiserContext& Context, FIntPoint NewSize, bool bSHDenoiser)
: Context(Context)
{
double Start = FPlatformTime::Seconds();
Size... | TOOL | 0.991758 | 6.569075 | {
"github_metadata": {
"branch": "5.4",
"commit_count": 164,
"repo_created_at": "2023-03-14T06:10:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 66,
"forks": 9,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "0403e03c03... |
0fc9acea-ab00-4869-8ab4-c628a00f367b | SergNov-9183/SmartCalculator | SmartCalculator/Recursive_calculation.cpp | #include "Recursive_calculation.h"
#include "Equation_bucket.h"
int FindStrWVar(char target[], char Vars[][str_len])
{
short i = 0;
char var[VAR_LEN] = { 0 };
do
sscanf(Vars[i++], "%s", var);
while (strcmp(var, target) && i < VARS_NUM);
return i - 1;
}
void RecCalc(Equation* Main_Equati... | ALGO | 0.999676 | 3.547016 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-09-22T10:10: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": "7cfe4f65e0bd... |
328e8efe-514d-457a-a096-9405d408dc30 | Pranjal31/cuml | cpp/src/umap/runner.h | /*
* Copyright (c) 2019, NVIDIA 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.org/licenses/LICENSE-2.0
*
* Unless required by applicable law ... | ALGO | 0.99873 | 6.32376 | {
"github_metadata": {
"branch": "feature/sweet-knn",
"commit_count": 6500,
"repo_created_at": "2019-12-28T03:48: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... |
35706873-1714-4166-a48b-2a81a6f72be8 | tszalay/poreseq | cpp/Alignment.h | /*==========================================================
*
* Alignment.h
*
* Class for alignment of a single event/model pair with a given sequence.
*
*========================================================*/
#ifndef _ALIGNMENT_H_
#define _ALIGNMENT_H_
#include "AlignUtil.h"
#include "EventData.h"
#includ... | ALGO | 0.995262 | 5.646079 | {
"github_metadata": {
"branch": "master",
"commit_count": 71,
"repo_created_at": "2015-04-14T20:25:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 26,
"forks": 4,
"issues": 8,
"pull_requests": 0
},
"file_meta": {
"content_id": "b8bb1a07... |
f2cec670-bbc7-4393-8699-b8947ba7c7a2 | manwar/perlweeklychallenge-club | challenge-102/ulrich-rieke/cpp/ch-1.cpp | #include <iostream>
#include <cmath>
#include <cstdlib>
#include <string>
#include <algorithm>
bool isPerfectSquare( int n ) {
return sqrt( n ) == floor( sqrt( n ) ) ;
}
bool isRare( int n ) {
std::string numstring( std::to_string( n ) ) ;
std::reverse( numstring.begin( ) , numstring.end( ) ) ;
int reversed =... | ALGO | 0.99715 | 4.950994 | {
"github_metadata": {
"branch": "master",
"commit_count": 44412,
"repo_created_at": "2019-03-30T01:15:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 194,
"forks": 332,
"issues": 5,
"pull_requests": 4
},
"file_meta": {
"content_id": "85... |
7d59ac17-e1d0-4c12-9026-89c5412e99be | john801205/practice | leetcode/833/833.cpp | #include <cassert>
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
class Solution
{
public:
std::string findReplaceString(const std::string &S,
const std::vector<int> &indexes,
const std::vector... | ALGO | 0.99989 | 6.546388 | {
"github_metadata": {
"branch": "master",
"commit_count": 386,
"repo_created_at": "2017-12-09T07:12: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": "04fc6331... |
85944044-a647-4eaf-8848-afa73d222cc7 | thanhtoan1742/CSES | Mathematics/Throwing Dice/main.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long
#define sqr(x) ((x) * (x))
#define maximize(a, b) (a) = max((a), (b))
#define minimize(a, b) (a) = min((a), (b))
using namespace std;
using namespace __gnu_pbds;
const ll M = 1e9 + 7;
template... | ALGO | 0.999983 | 4.419304 | {
"github_metadata": {
"branch": "master",
"commit_count": 93,
"repo_created_at": "2020-09-30T05:39:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8aba716f2... |
c1f029f8-7ca1-4d27-bad6-c56055f7a418 | hienptx/42_CPP-Module-05-09 | cpp09/ex02/srcs/PmergeMe.cpp | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* PmergeMe.cpp :+: :+: :+: ... | ALGO | 0.998915 | 4.896051 | {
"github_metadata": {
"branch": "main",
"commit_count": 33,
"repo_created_at": "2025-02-16T09:21:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a31f0062348... |
467629cb-e573-4f08-8122-92e61fe53111 | christmas3/graph | TopologicalSort.cpp | #include "TopologicalSort.h"
#include "Arrays.h"
namespace graph {
template<typename T>
TopologicalSort<T>::TopologicalSort(const BaseGraph<T>& g)
: graph_(g)
, sum_(new int[graph_.sizeV()])
{
memset(sum_, 0, sizeof(int) * graph_.sizeV());
for (auto v = 0; v < graph_.sizeV(); ++v) {
for (auto ... | ALGO | 0.995722 | 5.824042 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2021-08-29T09:40: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": "387532bdd5... |
159c8d92-cd4b-4d9b-b572-68767f15f463 | Akiko0210/Competitive-programming | codeforces/contest/850/E.cpp | #include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define ss second
#define ff first
#define pb push_back
#define pii pair<int, int>
#define INF INT_MAX
using namespace std;
void debug_out() { cerr << endl; }
template<typename Head, typename... Tail> void debug_out(Head H, Tail... T) { cerr <... | ALGO | 0.999849 | 3.574141 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2024-01-11T06:51:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8729b3951d60... |
b56952f1-6b89-4bfd-84d1-98383fa0fdec | Doyeon-Lee/Algorithm-Problem-Solving | programmers/level1/비밀지도.cpp | #include <string>
#include <vector>
using namespace std;
void convert(int n, vector <int> &vec, int **arr){
int binary;
for(int i = 0;i < n;i++){
binary = vec[i];
for(int j = 0;j < n;j++){
if(binary % 2 == 1) arr[i][j] = 1;
binary /= 2;}
} //for문 close
}
vector<s... | ALGO | 0.999923 | 4.97753 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2021-04-12T09:56: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": "efe6288af4a... |
4ee01dc2-f665-49c8-ac74-b2d0971961ef | Xh1612/Game-Snake | Game Ran/Game Ran.cpp | #include <iostream>
#include <conio.h>
using namespace std;
//Create map
const int WIDTH = 20;
const int HEIGHT = 10;
//Fucntion in game;
bool gameOver; // End game when collide
int x, y, fruitX, fruitY, score; // Location player and point , Broad point
int tailX[100], tailY[100]; // Array coordinates of tail Skake
in... | ALGO | 0.979338 | 4.610321 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-28T19:20: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": "aff94ac130c8... |
473e44f2-955c-49ed-b403-1370ca7a8011 | jlinton/x4vecs | matrix.cpp | // Copyright (c) 2012,2014 <NAME>
//
// matrix.cpp
// C++ wrapper which creates a 4x4 matrix out of the x4 vector classes
// This matrix class works with the NEON,SSE and PORT classes
//
//Permission is hereby granted, free of charge, to any person obtaining a copy
//of this software and associated documentation file... | ALGO | 0.982926 | 5.659695 | {
"github_metadata": {
"branch": "master",
"commit_count": 31,
"repo_created_at": "2014-08-17T04:39:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "db5613189... |
5f8d9c5c-1a1b-4134-8013-5de4e62e214b | KSP-07/LeetCode-Questions | Solve the Sudoku - GFG/solve-the-sudoku.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// UNASSIGNED is used for empty cells in sudoku grid
#define UNASSIGNED 0
// N is used for the size of Sudoku grid.
// Size will be NxN
#define N 9
// } Driver Code Ends
class Solution
{
public:
bool isValid(int x,int y,int val,... | ALGO | 0.999806 | 7.014395 | {
"github_metadata": {
"branch": "main",
"commit_count": 1717,
"repo_created_at": "2023-01-10T10:07: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": "9dffb9aef... |
b708f3ed-cd2a-4bba-9e88-23e3e97fdc1f | sfechisalin/DailyCodingProblem | 4/main.cpp | /*
*Given a string of parentheses, write a function to compute the minimum number of parentheses to be removed to make
* the string valid (i.e. each open parenthesis is eventually closed). For example, given the string "()())()", you
* should return 1. Given the string ")(", you should return 2, since we must remove... | ALGO | 0.999488 | 5.753886 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2021-07-04T06:33: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": "53db8253edc... |
591eb856-04f4-4ab4-975f-0b47197d72cd | enrevol/cpp | spoj-vn/VOSTR.cpp | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
const int base = 29;
cons... | ALGO | 0.999987 | 3.973645 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2015-03-28T03:24:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 12,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "549bd4b60... |
2d052dea-66bc-408c-9fb4-cb203126840f | AnnaMezhlum/GraphOfArticulationPoints | graph.cpp | #include "graph.hpp"
void Graph::addVertex(Vertex& vertex) {
for(Vertex vert : _vertices) {
if (vert == vertex) {
return;
}
}
_vertices.push_back(vertex);
}
void Graph::addEdge(Edge& edge) {
for(Edge ed : _edges) {
if(ed == edge) {
return;
}
}... | ALGO | 0.996465 | 5.306411 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2024-05-30T08:37: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": "f7a426eb9813... |
c39b1a82-ccfc-4eef-bdd3-e11bbe64e09c | walid123780/Problem-Solving | codeforces/1914/D.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int t = 1;
cin >> t;
while(t--) {
int n;
cin >> n;
std::vector<pair<int, int>> a(n), b(n), c(n);
for(int i = 0; i < n; i++) {
int x;
cin >> x;
a[i].first = x;
a[i].second = ... | ALGO | 0.999969 | 4.71428 | {
"github_metadata": {
"branch": "master",
"commit_count": 746,
"repo_created_at": "2023-09-26T11:46: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": "1b6d43b6... |
6a7f608f-3ca0-4278-9364-bcd210d9786b | altmersq/containers | source/rb_tree.h | #ifndef RED_BLACK_TREE
#define RED_BLACK_TREE
#include <iostream>
#include <iterator>
#include <limits>
#include <string>
namespace s21 {
template <typename Key, typename Value>
class rb_tree {
private:
enum Color { RED, BLACK };
struct Node {
Key key;
Value value;
Node* parent;
Node* left;
... | ALGO | 0.961395 | 5.477541 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-03-03T13:44: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": "dea0086864b9... |
71738097-fd7c-448f-8188-ca1fbc9d4441 | kumarrahul33/learning_stuff | competitive_programming/segment_tree.cpp | #include<bits/stdc++.h>
using namespace std;
//function to make segment tree for a corresponding array
void segment_tree(int arr[], int n, int *seg_tree){
int s_tree[2*n];
for (int i = 0; i < n; i++)
{
s_tree[2*n-i-1] = arr[n-i-1];
}
int unmodified_n = n;
while(n > 1){
for (... | ALGO | 0.999953 | 4.413511 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2022-01-15T13:35: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": "fd5e1a149... |
c6da5e5d-7c15-4457-bd68-8c2bc791b1e8 | jinheng49/23fall-bustub | src/execution/aggregation_executor.cpp | //===----------------------------------------------------------------------===//
//
// BusTub
//
// aggregation_executor.cpp
//
// Identification: src/execution/aggregation_executor.cpp
//
// Copyright (c) 2015-2021, Carnegie Mellon University Database Group
//
//===-----------------------------... | TOOL | 0.963693 | 5.726552 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2024-07-19T07:39: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": "7af390112ab6... |
3ce6278a-cbb6-42f4-bfaf-63d53a916555 | Izaron/ACM-ICPC | Timus Online Judge/Volume 3/1203. Scientific Conference.cpp | // The solution of the problem was written by Izaron
// Date: 22:57:05 5 May 2015
// Execution time: 0.328
// Please do not copy-paste the solution.
// Try to understand what is happening here and write your own.
#include <bits/stdc++.h>
#include <sstream>
using namespace std;
#define mt make_tuple
#define eb empl... | ALGO | 0.999887 | 3.475171 | {
"github_metadata": {
"branch": "master",
"commit_count": 79,
"repo_created_at": "2017-07-17T18:21:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f79526354... |
c3667215-c71c-4357-bb17-4fb604a683cb | tmoux/prog-contests | codeforces/1236/e/e.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
//what's longest consec. decreasing sequence
//starting at given point
const int maxn = 1e5+5;
int n, m, a[maxn];
int b[maxn];
int start[maxn];
int dp[maxn];
ll solve() {
memset(start,0,sizeof start);
for (int i = 1; i <= m; i++) {
... | ALGO | 0.999926 | 3.285688 | {
"github_metadata": {
"branch": "master",
"commit_count": 288,
"repo_created_at": "2018-10-21T03:33:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "37b4f84c... |
21c15320-4c9d-4997-917d-b41b940f26ea | FabriDeCastelli/RayTracer | main.cpp | /**
* @file main.cpp
*/
#include <iostream>
#include <fstream>
#include <cmath>
#include <ctime>
#include <vector>
#include "glm/glm.hpp"
#include "glm/gtx/transform.hpp"
#include "Image.h"
#include "Material.h"
using namespace std;
/**
* @class Ray.
* @brief Represents a single Ray.
*/
class Ray
{
public:
/... | ALGO | 0.959363 | 4.577287 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2023-05-23T20: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": "641d9d5a87a... |
079598ed-463f-4583-b9fc-fadd06cd4e46 | DevLeti/algorithm | etc_question/math/4344.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
int s; // student
vector<int> score;
int input;
int sum;
double average;
int p; // person who got more score than average
cout << fixed; // 소수점 고정
cout.setprecision(3); // 소수점 나타낼 자리수
for(... | ALGO | 0.999446 | 4.032777 | {
"github_metadata": {
"branch": "master",
"commit_count": 79,
"repo_created_at": "2020-08-08T01:35: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": "5cd8ad0c9... |
33479b0a-a7b0-4900-afa3-fd109ae3ba72 | venkatsatish/incubator-singa | src/neuralnet/loss_layer/softmax.cc | /************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under ... | DATA | 0.914252 | 6.311365 | {
"github_metadata": {
"branch": "master",
"commit_count": 459,
"repo_created_at": "2016-06-29T09:57: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": "e17b184d... |
f68cefd7-6336-460b-b7c5-1acfec1bed61 | victorrschmidt/bd_algoritmos | grafos/menor_caminho/floyd_warshall.cpp | // Algoritmo de Floyd-Warshall
/*
Dado um grafo valorado, o algoritmo determina o menor caminho entre todos os
pares de vértices.
O grafo deve estar no formato de matriz de adjacência:
g[u][v] = w
*/
#include <bits/stdc++.h>
using namespace std;
class Graph {
public:
int V;
vector<vector<int>> adj, fw; //... | ALGO | 0.99996 | 5.640931 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2025-03-11T04:49:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ed090f1f8fe6... |
4ee1165a-6a6a-4e8c-83e9-4082b2f56aa6 | kripken/ammo.js | bullet/Extras/CDTestFramework/Opcode/OPC_OBBCollider.cpp | /*
* OPCODE - Optimized Collision Detection
* http://www.codercorner.com/Opcode.htm
*
* Copyright (c) 2001-2008 <NAME>, <EMAIL>
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... | ALGO | 0.995148 | 5.530123 | {
"github_metadata": {
"branch": "main",
"commit_count": 434,
"repo_created_at": "2011-05-28T23:08:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4355,
"forks": 574,
"issues": 161,
"pull_requests": 14
},
"file_meta": {
"content_id": "ac... |
0b2a688d-ae11-4769-ae44-195d8f445445 | Vinayak-Bhardwaj/DSA-Problem-Solving | online Coding Blocks/BinarySearchRecursion.cpp | #include<bits/stdc++.h>
using namespace std;
int binarySearch(int* arr, int start, int end, int key) {
// BASE CASE
if(start > end) {
return -1;
}
// RECURSIVE CASE
int mid = (start + end) / 2;
if(arr[mid] == key) {
return mid;
}
else if(key > arr[mid]) {
return ... | ALGO | 0.999887 | 4.756084 | {
"github_metadata": {
"branch": "master",
"commit_count": 61,
"repo_created_at": "2022-05-07T13:27: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": "79ce907c9... |
f696fa44-f3a2-43ac-bed7-272ed36e645e | jhtl08/Sorting-Algorithms | algosource.cpp | //algosource.cpp
//<NAME>, <NAME>, <NAME>
//ENGG 24-J
//September 26, 2022
#include "algosource.h"
#include <stdlib.h>
#include <ctime>
#include <iostream>
//set number of elements
//random generator for the array
int* generateArray(int nItems)
{
//creates an empty array of 1,000 elements
//makes sure that the u... | ALGO | 0.99979 | 5.265845 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2022-09-12T09:34:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "d397dfd01... |
e583cbfb-1643-41f8-a0ef-881bbdae9394 | gentryx/libgeodecomp | src/libgeodecomp/geometry/partitions/checkerboardingpartition.h | #ifndef LIBGEODECOMP_GEOMETRY_PARTITIONS_CHECKERBOARDINGPARTITION_H
#define LIBGEODECOMP_GEOMETRY_PARTITIONS_CHECKERBOARDINGPARTITION_H
#include <libgeodecomp/geometry/partitions/partition.h>
namespace LibGeoDecomp {
/**
* One of the most used decompostition techniques in computer
* simulations. It yields cuboid s... | ALGO | 0.919574 | 6.928072 | {
"github_metadata": {
"branch": "master",
"commit_count": 4396,
"repo_created_at": "2014-09-25T14:03:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 27,
"forks": 19,
"issues": 47,
"pull_requests": 1
},
"file_meta": {
"content_id": "03a0... |
30b83b6b-3278-4618-956b-943b5342aa9d | mahabub5090/Various_Online_Judge_Problem_Solutions | TLE_Eliminators_CP_31_Sheet/800/A_Desorting.cpp | // Problem Link: https://codeforces.com/problemset/problem/1853/A
/*
**************************************************************
*<NAME> == start with the name of \n *
* ALLAH Subhana Tayala *
* Author: Md. <NAME> *
* CSE,RPI && Rangp... | ALGO | 0.999611 | 4.42415 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2024-07-02T14:29: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": "a2980f4fc2ac... |
99fa68e8-a250-4fbd-b25d-22b74629ee43 | WhiZTiM/coliru | Archive/e6d51a4561f081bd1724f67cbeb8c0e7/main.cpp | #include <cctype>
//#include <chrono>
#include <boost/chrono.hpp>
#include <map>
#include <string>
#include <ppl.h>
#include <windows.h>
#include <wrl.h>
namespace wrl = Microsoft::WRL::Wrappers;
namespace ppl = concurrency;
//typedef std::chrono::high_resolution_clock clock_type;
//typedef std::chrono::duration<doub... | TOOL | 0.959995 | 4.957594 | {
"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": "6edfa8... |
22a44b20-8513-48ad-859e-cc4b8e6b0979 | MeowWow520/Repository_For_Software_Technology | Algorithm_Code/DFS Depth-First Algorithm - Permutations/DFS_depth-first_algorithm - permutations.cpp | #include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#define genius "JerryChen"
typedef long long ll;
const ll mod = 1e9 + 7;
const ll N = 1e6 + 10;
using namespace std;
// Translated By DeepSeek V3 From Chinese Version
/** ------Depth-First Search (DFS)------
* Using recursion to solve ... | ALGO | 0.999907 | 4.931754 | {
"github_metadata": {
"branch": "main",
"commit_count": 164,
"repo_created_at": "2025-03-28T07:58: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": "7d439046b4... |
4d7f67a4-a8f9-4f9c-9758-2885f28f7ceb | tbswang/leetcode | 106.从中序与后序遍历序列构造二叉树.cpp | /*
* @lc app=leetcode.cn id=106 lang=cpp
*
* [106] 从中序与后序遍历序列构造二叉树
*/
#include <iostream>
#include <vector>
#include <queue>
using namespace std;
struct TreeNode
{
int val;
TreeNode *left;
TreeNode *right;
TreeNode() : val(0), left(nullptr), right(nullptr) {}
TreeNode(int x) : val(x), left(null... | ALGO | 0.999987 | 6.514569 | {
"github_metadata": {
"branch": "master",
"commit_count": 114,
"repo_created_at": "2018-05-01T12:30:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3c76254f... |
c8a57fba-7686-418d-9f79-82a9863481b8 | ky12003/mtsac-team-gandalf-vex-2023 | Gandalf Iteration 2/src/Autonomous.cpp | #include "vex.h"
#include "robot-config.h"
const int PCT_TO_RPM = 6;
const float rev_to_meters = 2.894;
//pause
void timeOut(int timeSeconds)
{
left_all.setTimeout(timeSeconds, sec);
right_all.setTimeout(timeSeconds, sec);
}
//moves forward by input meters at set speed and then times out
void move_forward(do... | TOOL | 0.902667 | 4.293483 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2022-09-05T21:22:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "edff554a680... |
966c1319-903c-4cc6-874f-2d5e66f01752 | toothacher17/deeptopic | src/sampler/parallelLDA/lda.h | #ifndef _LDA_H
#define _LDA_H
#include <iostream>
#include <thread>
#include <chrono>
#include <vector>
#include <queue>
#include "model.h"
#include "utils.h"
#include "vose.h"
#include "fTree.h"
#include "forest.h"
#include "shared_mutex.h"
class simpleLDA : public model
{
public:
// estimate LDA model using Gibbs... | ALGO | 0.991664 | 6.369665 | {
"github_metadata": {
"branch": "master",
"commit_count": 38,
"repo_created_at": "2015-10-23T01:17:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e8622f456... |
af20825d-92e5-4a48-b422-433d88209e40 | repos-cl/NumCSE | Assignments/PolishedCodes/ODE/GradientFlow/solution/gradientflow.hpp | #ifndef GRADIENTFLOW_HPP
#define GRADIENTFLOW_HPP
#include <Eigen/Dense>
#include <array>
#include <iostream>
#include <vector>
/**
* \brief Implements the Butcher matrix of the SDIRK method
*
* \return Eigen::MatrixXd Butcher matrix
*/
/* SAM_LISTING_BEGIN_0 */
Eigen::MatrixXd ButcherMatrix() {
Eigen::MatrixXd... | ALGO | 0.99998 | 6.477406 | {
"github_metadata": {
"branch": "master",
"commit_count": 2989,
"repo_created_at": "2023-04-15T08:46: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": "712281d... |
32f16e80-8b50-428e-b00e-61f0abbed49e | Samarth-Pai/striverDsaCodes | graphs/surroundedRegions.cpp | #include<iostream>
#include<vector>
using namespace std;
void dfs(vector<vector<char>>& board, vector<vector<bool>> &vis, int x, int y){
if(x < 0 or y < 0 or x > board.size()-1 or y > board[0].size()-1 or board[x][y] == 'X' or vis[x][y])
return;
vis[x][y] = true;
int dx[] = {-1, 0, 1, 0};
int dy... | ALGO | 0.999953 | 5.443009 | {
"github_metadata": {
"branch": "main",
"commit_count": 253,
"repo_created_at": "2024-09-21T08:46:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d2f3bc9a0f... |
44180e46-3beb-4f53-8147-421b52a36490 | Emilinya/grafix | grafix/physics.hpp | #pragma once
#include "polygon.hpp"
#include "collision.hpp"
#include "vector2.hpp"
#include <array>
void physicsUpdate(std::vector<Polygon*> entityPs, double pdt) {
// collision handeling
for (size_t i = 0; i < entityPs.size(); i++) {
for (size_t j = i+1; j < entityPs.size(); j++) {
if (!... | ALGO | 0.98531 | 5.578256 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2021-03-03T19:03:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c3c5b8e8c8... |
75dae11d-1700-427b-99fe-c2b6bc8ded2e | Warawreh/CP-Library | Contests/UNCP2021/m.cpp | #include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define fast ios::sync_with_stdio(false);cin.tie(0);
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
struct DSU{
vector<int> dsu,s... | ALGO | 0.999994 | 3.958449 | {
"github_metadata": {
"branch": "main",
"commit_count": 35,
"repo_created_at": "2022-04-16T08:24: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": "68aba284056... |
e26e590e-045d-432a-98c6-31e64b32c8b7 | SumitTeerthani/DSA-Solutions | Linked_List/add_Two_Numbers.cpp | ListNode *reverseLinkedList(ListNode *head)
{
ListNode *curr = head;
ListNode *prev = NULL;
while (curr != NULL)
{
ListNode *next = curr->next;
curr->next = prev;
prev = curr;
curr = next;
}
return prev;
}
unsigned long long int getNo(ListNode *head, unsigned long... | ALGO | 0.999995 | 5.566339 | {
"github_metadata": {
"branch": "main",
"commit_count": 53,
"repo_created_at": "2023-11-06T19:45:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2fcf89dd695... |
114811a2-f9bd-4b76-82de-bd0039f997f4 | tktk2104/TktkLib | TktkGameProcessLib/TktkClassFuncProcessLib/inc/TktkClassFuncProcessor/RunFuncClass/RunFuncSortedContainer.h | #ifndef RUN_FUNC_SORTED_CONTAINER_H_
#define RUN_FUNC_SORTED_CONTAINER_H_
#include <limits>
#include <vector>
#include <forward_list>
#include <map>
#include <unordered_map>
#include <algorithm>
#include "../ProcessingClass/ProcessingClassPtr.h"
// ???
#undef min
namespace tktk
{
/*
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━... | TOOL | 0.934153 | 5.668914 | {
"github_metadata": {
"branch": "master",
"commit_count": 207,
"repo_created_at": "2019-10-07T06:10:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d33885df... |
f523d938-23dc-43c4-843d-2b3b36768fcd | dkolmakov/av | examples/mul_kernels/mul_old_sse.hpp | #pragma once
#include <immintrin.h>
#include <complex>
#include "common.hpp"
namespace mul_old {
namespace sse {
template <class T, std::size_t index, std::size_t step>
struct unpack;
template <class T>
struct unpack<T, 0, 1> {
static force_inline void doIt(__m128d *vals, std::complex<... | ALGO | 0.924927 | 5.624747 | {
"github_metadata": {
"branch": "master",
"commit_count": 78,
"repo_created_at": "2019-11-22T16:28:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "a48f7f917... |
c20fa04f-0ab0-4c8c-b99c-4f114faf5024 | rodschulz/CC5204_T2 | src/Helper.cpp | /**
* Author: rodrigo
* 2015
*/
#include "Helper.h"
#include <fstream>
#include <iostream>
Helper::Helper()
{
}
Helper::~Helper()
{
}
string Helper::getTargetLocation(const string &_inputFile)
{
ifstream file(_inputFile.c_str());
string line;
if (file.is_open())
{
while (std::getline(file, line))
{
//... | TOOL | 0.963157 | 5.344458 | {
"github_metadata": {
"branch": "master",
"commit_count": 32,
"repo_created_at": "2015-04-08T23:37:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d97d7aab0... |
7e000147-afae-4ce6-8100-67f5b8decbae | raincross7/code-similarity | codes/train_code/problem081/problem081_60.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define all(x) x.begin(),x.end()
#define pll pair <long long,long long>
#define ss second
#define ff first
#define inf 9223372036854775807
#define maa 1000000007
#define ld long double
#define fast ios_base::sync_with_stdio(false);... | ALGO | 0.999965 | 4.387121 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-03-06T05:07:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9c6709179248... |
251ed221-2d21-4c94-92ae-00ac43c58181 | KaioCT/prova-T-picos-Especiais | PráticaDeTópicosEspeciais_Prova04/questão 16/main.cpp | /******************************************************************************
16. Dadas as idades de várias pessoas, exibir a menor idade, a maior idade e a média aritmética das idades. O
programa termina quando for digitada uma idade -1.
*****************************************************************************... | ALGO | 0.991586 | 4.222017 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-11-10T02:22: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": "5fcd107e564f... |
9c570765-dc8b-4d89-8ea8-cc48138484be | brandonT2002/ACYE1_A_1S24_G4 | PRACTICA 1/login/login.ino | #include <Keypad.h>
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include "Calculadora.h"
// =======================================================
#define HARDWARE_TYPE MD_MAX72XX::PAROLA_HW
#define MAX_DEV 3
#define CLK 8
#define DATA 6
#define CS 5
#define BUF_SIZE 90
#define BUFFER_SIZE 5
// Variable que contr... | TOOL | 0.921244 | 4.124194 | {
"github_metadata": {
"branch": "main",
"commit_count": 89,
"repo_created_at": "2024-01-30T04:57:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e38edc974da... |
1058a355-861f-4ea5-bb05-225802bed4de | alisw/AliPhysics | JETAN/JETAN/AliCdfJetFinder.h | #ifndef ALICDFJETFINDER_H
#define ALICDFJETFINDER_H
/*
* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved.
* See cxx source for full Copyright notice
*
*/
/* $Id$ */
// Definition of constants, structures and functions for jet finder
#include "AliJetFinder.h"
using namespace std ;
// str... | DATA | 0.927594 | 5.779013 | {
"github_metadata": {
"branch": "master",
"commit_count": 89208,
"repo_created_at": "2016-06-21T19:31:29.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 104,
"forks": 792,
"issues": 0,
"pull_requests": 9
},
"file_meta": {
"content_id": "e06... |
b277dbd6-0b61-495a-9d4d-dc408b4d9891 | ishandutta2007/codeforces-k | kimjihoon/normal/1055/B.cpp | #include <iostream>
using namespace std;
int a[100009];
int main()
{
ios::sync_with_stdio(false);
cin.tie(0); cout.tie(0);
int n, m, l;
cin >> n >> m >> l;
int s = 0;
for (int i = 1; i <= n; i++) {
cin >> a[i];
if (a[i] > l && a[i - 1] <= l)
s++;
}
for (int i = 0; i < m; i++) {
int t;
cin >> t;
i... | ALGO | 0.999876 | 3.681113 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T06: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": "0859b0a74180... |
552e5b06-8370-4f98-903b-99d9d03a920c | lichenk/AlgorithmContest | topcoder/CarrotJumping.cpp | #include <bits/stdc++.h>
#include <assert.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> pll;
#define PB push_back
#define MP make_pair
const ll MOD = 1000000007LL;
const ll INF = 1LL<<60LL;
template<typename T> inline bool chkmax(T &aa, T bb) { return aa < bb ? aa = bb, true ... | ALGO | 0.999873 | 4.048359 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2018-07-29T03:21:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "68a18a1a5... |
21b682ee-9545-447e-9d1a-d07bb6eac15c | KojiAomatsu/competition | contest/atcoder/abc/abc-184/d.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
#define rep(i, s, n) for (ll i = s; i < (ll)(n); i++)
double memo[110][110][110];
int main() {
int A, B, C;
cin >> A >> B >> C;
rep(sum, 0, 300) {
rep(a, 0, 100) {
rep(b, 0, 100) {
ll c = sum - a - b;
... | ALGO | 0.998979 | 3.998699 | {
"github_metadata": {
"branch": "master",
"commit_count": 45,
"repo_created_at": "2021-05-23T02:21:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "81613d59e... |
bed5a0fb-10a1-499c-96fc-d84115921e55 | alexandraback/datacollection | solutions_5630113748090880_0/C++/canada/main.cpp | #include <iostream>
#include <algorithm>
#include <bitset>
#include <cstdint>
#include <vector>
#include <string>
#include <sstream>
#include <map>
#include <set>
using namespace std;
typedef int64_t ii;
typedef uint64_t ui;
bool f(const vector<int>& a, const vector<int>& b) {
return a.back() < b.back();
}
int ma... | ALGO | 0.999893 | 3.500758 | {
"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": "5b8903271... |
2c26a178-2d04-4305-9852-3449b709d300 | ShyamB123/Contests | Codeforces/Harbour-2023-2024/c.cpp | #include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define ld long double
#define fast_io \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0);
#define mod 1000000007
#define inf 1e18
#define F first
#define S second
#define p... | ALGO | 0.99994 | 4.279556 | {
"github_metadata": {
"branch": "main",
"commit_count": 81,
"repo_created_at": "2023-07-14T03:49: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": "d3fa57c3289... |
e04e814b-117a-456e-a89a-0ff3ed042288 | JenneyChang/CSC588_AudioSystem | _Engine_/src/Camera/Camera3D.cpp | #include "Camera3D.h"
using namespace Azul;
//-----------------------------------------------------------------------------
// CONSTRUCTION
//-----------------------------------------------------------------------------
Camera3D::Camera3D()
: Camera()
{ }
Camera3D::~Camera3D()
{ }
//-----------------------------... | TOOL | 0.90853 | 6.640125 | {
"github_metadata": {
"branch": "master",
"commit_count": 97,
"repo_created_at": "2023-10-28T18:50:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c32303b8b... |
f6854067-5871-4476-a902-994c8908923a | primihub/hackathon | winning-project/ABY/aby/poly_ay/pppt.cpp |
#include "pppt.h"
#include <abycore/circuit/booleancircuits.h>
#include <abycore/sharing/sharing.h>
int32_t
test_pppt_circuit (e_role role, const std::string &address, uint16_t port,
seclvl seclvl, uint32_t bitlen, uint32_t nthreads,
e_mt_gen_alg mt_alg, e_sharing sharing, uint32... | ALGO | 0.937647 | 5.194389 | {
"github_metadata": {
"branch": "master",
"commit_count": 160,
"repo_created_at": "2022-10-19T09:43:48.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 30,
"forks": 35,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "708376d... |
2134bb39-1061-404f-b059-afff54cd4146 | Ernesto-73/svm_lbfgs | src/minconf_tmp.cpp | /*
\file: minconf_tmp.cpp
\author: <NAME>
\date: 3-20-2014
*/
#include "minconf_tmp.h"
inline double abs(double x) { return x >= 0 ? x : -x;}
double dualSVMLoss_noBias(int n, const double *alpha, const double *A, double *g)
{
double f = 0;
int step = n;
double sum = 0;
for(int i = 0; i < n;i++)
sum += alp... | ALGO | 0.999513 | 4.322202 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2014-06-05T13:45: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": "35b6809eab... |
188c4a47-b31e-44b8-853f-cd812c9924c0 | NirShalmon/Competitive-Programming-Code | CEOI/CEOI 2017/Palindromic Partitions.cpp | /*****************
Competative programming code written by <NAME>
IMPORTANT NOTE: This code was written during a time limited competition or for use in competition.
THIS CODE IS NOT AN INDICATION OF MY USUAL CODE QUALITY!!
******************/
#include<bits/stdc++.h>
using namespace std;
int t;
long long pw[1000000]... | ALGO | 0.999691 | 3.895353 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2019-05-17T19:47: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": "053212673... |
89448347-7606-4b23-af18-1ddf0639e8b4 | ttdyce/Dynamic-embedding-labeller | selected-data/state-trace-110/285.cpp | #include <iostream>
#include <stdio.h>
#include <math.h>
#include "../StateIntercept.cpp"
#include <string.h>
using namespace std;
//------------------
// 1057???
// 2010/12/1
// ???
//------------------
Intercept<int> devide(Intercept<int> m, Intercept<int> x, Intercept<int> i)
{
if (x == 1 && m >= i)
retur... | ALGO | 0.999926 | 3.256693 | {
"github_metadata": {
"branch": "master",
"commit_count": 156,
"repo_created_at": "2020-02-09T10:31:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "837deafc... |
0414a445-1de0-4458-ad05-02e5f0e5c580 | MaGaroo/Competitive-Programming | karno/2/E/code.cpp | //sobskdrbhvk
//remember the flying, the bird dies ):(
#include <bits/stdc++.h>
using namespace std;
typedef long long int LL;
typedef pair<int, int> pii;
typedef pair<LL, LL> pll;
#define PB push_back
#define MP make_pair
#define L first
#define R second
#define sz(x) ((int)(x).size())
#define smax(x, y) ((x) = max... | ALGO | 0.999918 | 3.487209 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2016-09-26T19:23:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "8e4e7f62a... |
328b83cd-cc01-4b4f-a1a8-4f0f311c13e0 | lilweege/dmoj-solutions | leetcode/simple-bank-system.cpp | class Bank {
vector<long long> accounts;
int n;
public:
Bank(vector<long long>& balance)
: accounts(balance), n(size(balance)) {
}
bool transfer(int account1, int account2, long long money) {
if (!(1 <= account1 && account1 <= n))
return false;
... | ALGO | 0.997402 | 5.272725 | {
"github_metadata": {
"branch": "master",
"commit_count": 59,
"repo_created_at": "2020-03-19T00:54:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8a2fc176f... |
f1a7e5d3-b25f-4a91-940d-44e96466efee | BuvinduS/TestRepo | maths.cpp | #include <bits/stdc++.h>
using namespace std;
/*
Arithmetic progression
ex : 3,7,11,15 ==> difference between any two consecutive numbers is constant
if there are n numbers the sum can be obtained using
a+.....+b = n(a+b)/2
*/
int arithmetic(const vector<int> arr){
int n = arr.size();
int ... | ALGO | 0.999677 | 5.1422 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2025-02-22T06:37: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": "bde77bece042... |
0e92e7a4-1445-4ef5-9ae4-6c4502781bb2 | TimeDA/TimeDA | dataset/cpp_12_18/gcj2014/Pasqual45/3024486_5645447150436352_Pasqual45_cj14r3proba.cpp | #include<fstream>
#include<iostream>
#include<sstream>
#include<iomanip>
#include<string>
#include<vector>
#include<list>
#include<set>
#include<map>
#include<queue>
#include<algorithm>
#include<functional>
#include<numeric>
#include<bitset>
using namespace std;
typedef pair<int, int> pii;
typedef long ... | ALGO | 0.99951 | 4.016067 | {
"github_metadata": {
"branch": "main",
"commit_count": 70,
"repo_created_at": "2022-10-24T06:47: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": "67eb2bb4714... |
3649ec89-90b8-45aa-9714-cb3de15404f7 | Anand1601/my_learning | range_query/tries/char trie/sorting_strings(char_trie).cpp | /*
Q> you are given an array of strings sort them
lexicographically.
*/
#include<iostream>
#include <bits/stdc++.h>
using namespace std;
using namespace std::chrono; //----for_getting_execution_time
#define ll long long
#define fi first
#define se second
#define pri pair<ll,ll>
#define M 1000000007
#define pb(x) ... | ALGO | 0.999997 | 5.10022 | {
"github_metadata": {
"branch": "main",
"commit_count": 32,
"repo_created_at": "2021-01-21T08:57: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": "731cb3625b9... |
5721c768-6f23-483a-a052-9df286070f80 | DoubleDi/cmc-msu-tasks | cpp_and_gramatics/11/11-3.cpp | #include <iostream>
#include <map>
#include <set>
#include <algorithm>
#include <string>
#include <sstream>
using namespace std;
map<char, set<string>> gram{};
int
nullable(char let)
{
int is_nullable = 0;
int result = 0;
// cout << let << endl;
for (auto ggg = gram.begin(); ggg != gram.end(); ggg++... | ALGO | 0.998986 | 3.388307 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2016-06-13T20:21: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": "2ecf39b43... |
1a126a46-22be-4175-8f02-c157b75dfd72 | tensorflow/tfjs | tfjs-backend-wasm/src/cc/kernels/Cumprod.cc | /* Copyright 2022 Google LLC. All Rights Reserved.
* 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.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... | ALGO | 0.992478 | 7.16511 | {
"github_metadata": {
"branch": "master",
"commit_count": 6112,
"repo_created_at": "2018-03-05T05:41:02.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 18881,
"forks": 1981,
"issues": 337,
"pull_requests": 259
},
"file_meta": {
"content_id"... |
5f27c682-bb01-4725-a4a8-7029e755387d | thunfischq/Nerdle | Nerdle.cpp | // Copyright 2022 <NAME>
#include <string>
#include <utility>
#include <vector>
#include <unordered_map>
#include <locale>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include "./Nerdle.h"
#include "./TerminalManager.h"
// _____________________________________________________________... | ALGO | 0.99843 | 5.279557 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2024-01-26T17:49: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": "f2e8afc9f72... |
04301836-392d-41e6-a5aa-a4f790aed1df | hengli/camodocal | src/dbow2/DBoW2/BowVector.h | /**
* File: BowVector.h
* 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 attrib... | TOOL | 0.94162 | 5.29396 | {
"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": "8f... |
d95587e7-e714-4897-be1a-f30fbab0fcac | iurisevero/Exercicios-PPC | LeetCode/designTicTacToe.cpp | class TicTacToe {
public:
// Win conditions: complete row, complete column or complete diagonal
// space complexity can be improved by using vector or dynamic allocation
int board[100][100];
int boardSize;
// use to block moves after someone wins
int winner;
TicTacToe(int n) {
board... | ALGO | 0.999916 | 6.30748 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2019-05-31T20: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": "1d35d16fa... |
5a73ed8b-0055-420d-89a1-63b3c41c78d9 | WSDOT/WBFL | Include/RCSection/InteractionCurveSolution.h | ///////////////////////////////////////////////////////////////////////
// RCSection - Reinforced concrete section analysis modeling
// Copyright © 1999-2025 Washington State Department of Transportation
// Bridge and Structures Office
//
// This library is a part of the Washington Bridge Founda... | TOOL | 0.911743 | 7.037585 | {
"github_metadata": {
"branch": "master",
"commit_count": 862,
"repo_created_at": "2018-10-25T16:59:08.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 10,
"forks": 5,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "31d26f40... |
bf3536c8-7404-4025-a515-af777819aaa1 | dunan/MultiVariatePointProcess | 3rd-party/igl/max_faces_stopping_condition.cpp | #include "max_faces_stopping_condition.h"
IGL_INLINE void igl::max_faces_stopping_condition(
int & m,
const int max_m,
std::function<bool(
const Eigen::MatrixXd &,
const Eigen::MatrixXi &,
const Eigen::MatrixXi &,
const Eigen::VectorXi &,
const Eigen::MatrixXi &,
const Eigen::MatrixXi &,
... | ALGO | 0.980032 | 4.811922 | {
"github_metadata": {
"branch": "master",
"commit_count": 74,
"repo_created_at": "2016-02-17T06:32:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 77,
"forks": 30,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "a835735... |
ccbabb19-2632-4e69-a150-2ff29da6c6e4 | parasollab/open-ppl | src/MPLibrary/MPStrategies/BasicRRTStrategy.cpp | #include "BasicRRTStrategy.h"
#include "MPLibrary/MPLibrary.h"
#include "MPProblem/Constraints/Constraint.h"
#include <iomanip>
#include <iterator>
#include <string>
#include <unordered_set>
#include <vector>
/*----------------------------- Construction ---------------------------------*/
BasicRRTStrategy::
BasicRR... | ALGO | 0.999089 | 6.658516 | {
"github_metadata": {
"branch": "main",
"commit_count": 4350,
"repo_created_at": "2023-11-24T18:40:46.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3a7afde12d... |
34414ea6-e1be-4fe3-b13c-dd414bc81ee7 | Ankush-choudhary76/Cpp | recursion/power.cpp | // #include<iostream>
// using namespace std ;
// int power(int a ,int b ){
// int x =1;
// for (int i =1;i<=b;i++){
// x=x*a;
// }
// return x ;
// }
// int main () {
// int a ,b;
// cout<<"enter the value of a :";
// cin >>a;
// cout<<"enter the value of b :";
// ci... | ALGO | 0.998191 | 4.986656 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2024-05-13T15:28: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": "78d64bd7d98a... |
528a1fa6-5753-472e-b56c-2909b139668b | AxoyTO/CPP_Exercises | E10_ComplexNumbersOverloadingOperators/main.cpp | /*#include <iostream>
using namespace std;
*/
class Complex {
private:
double re;
double im;
public:
Complex();
Complex(double re, double im = 0);
friend ostream &operator<<(ostream &os, const Complex &op);
const Complex operator+(const Complex &op) const;
friend const Complex operator+... | ALGO | 0.963125 | 5.641387 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-08-26T16:28: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": "9f5c983eb3bc... |
53899ef9-0327-4a5f-b3dd-04cb32becadb | iced-espresso/ProblemSolving | Programmers/77486_다단계칫솔판매.cpp | #include <string>
#include <vector>
#include <string>
#include <vector>
#include <map>
using namespace std;
class Person
{
Person* parent;
int money;
public:
Person(Person* parent) : parent(parent)
{
money = 0;
}
int GetMoney() { return money; }
void DistributeMoney(int profitMoney... | ALGO | 0.999168 | 4.17773 | {
"github_metadata": {
"branch": "main",
"commit_count": 73,
"repo_created_at": "2022-06-22T16:20: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": "2033771e28f... |
af274ab3-5b3c-48ea-b3c1-31a944d2c293 | ShubhamKumar37/DSA-IN-CPP | Stack/Question_Lvl_3/basicCalculator.cpp | #include <iostream>
#include <stack>
#include <string>
using namespace std;
int solve(string &s)
{
stack<int> S;
int ans = 0;
int num = 0;
int sign = 1;
for (int i = 0; i < s.size(); i++)
{
if (s[i] >= '0' && s[i] <= '9')
{
int temp = s[i] - '0';
num = ... | ALGO | 0.999965 | 4.60602 | {
"github_metadata": {
"branch": "main",
"commit_count": 147,
"repo_created_at": "2024-07-22T07:03: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": "8084adb824... |
1d8794f3-e1ee-4716-b2f2-763485f2862b | TheKartik-Codes/Cpp | string_2.cpp | #include <iostream>
#include <string>
using namespace std;
// Function to check if a string is a palindrome
bool isPalindrome(const string& str) {
int left = 0; // Start pointer
int right = str.length() - 1; // End pointer
while (left < right) {
if (str[left] != str[right]) {
... | ALGO | 0.993097 | 5.93057 | {
"github_metadata": {
"branch": "main",
"commit_count": 35,
"repo_created_at": "2025-04-08T06:37:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "665ca3267e3... |
5fc61247-8d87-4472-90b4-ba79c0e7dd67 | JeffersonLab/chroma | lib/update/molecdyn/monomial/one_flavor_ratio_rat_conv_monomial5d_w.h | // -*- C++ -*-
/*! @file
* @brief One flavor ratio of rational monomials using RHMC
*/
#ifndef __one_flavor_ratio_rat_conv_monomial5d_w_h__
#define __one_flavor_ratio_rat_conv_monomial5d_w_h__
#include "unprec_wilstype_fermact_w.h"
#include "eoprec_constdet_wilstype_fermact_w.h"
#include "update/molecdyn/monomial/... | ALGO | 0.920806 | 5.046721 | {
"github_metadata": {
"branch": "master",
"commit_count": 12973,
"repo_created_at": "2013-08-13T18:20:39.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 65,
"forks": 55,
"issues": 1,
"pull_requests": 12
},
"file_meta": {
"content_id": "4acf... |
469525a6-6c23-4819-97f2-3bb2dcf85b42 | vital-edu/competitive-programming | UVA/12442.cpp | #include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
#define MAX 50010
#define UNVISITED 0
#define VISITED 1
int adj[MAX];
int states[MAX], dist[MAX];
void dfs(int u, int size) {
if(dist[u]) return;
states[u] = VISITED;
int v = adj[u];
if (dist[v]) {
dist[u] = dist[v] + 1;
... | ALGO | 0.9997 | 4.021977 | {
"github_metadata": {
"branch": "master",
"commit_count": 61,
"repo_created_at": "2016-04-01T00:51: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": "e9383592e... |
4987c5bd-f6ca-486a-94ac-9fcdf02493c7 | rupak-prog/Mtech2sem | systemsLab/Assign2/Group_14/TIN_A2_Q2.cpp | #include <iostream>
#include <chrono>
#include <random>
#include<unistd.h>
#include <queue>
using namespace std;
long double max(long double a,long double b){
return a>b?a:b;
}
long double Exponential(long double x)
{
long double z;
do
{
z = ((long double) rand()/RAND_MAX);
}
whi... | ALGO | 0.987061 | 4.310306 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2020-03-30T05:50:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "13fa929d1... |
690803ff-c8cd-4519-9d19-6b295d799ca4 | asnalaia/AP6 | Pertemuan_2/volumetabung.cpp | #include <iostream>
using namespace std;
int main() {
const float PHI = 3.14; // Mendefinisikan konstanta PHI dengan nilai 3.14
float r, t, v; // Mendeklarasikan variabel untuk jari-jari (r), tinggi (t), dan volume (v)
// Meminta pengguna untuk memasukkan jari-jari
cout << "Masukkan jari-jari : ";
... | ALGO | 0.999322 | 5.37535 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2024-05-30T12:58: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": "80226cdd33a5... |
fca60471-806a-4995-a810-0dc635969f51 | Mohammad-Yasser/harwest | codeforces/959/D.cpp | #ifndef Local
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
#pragma GCC target( \
"sse,sse2,sse3,ssse3,sse4,sse4.2,popcnt,abm,mmx,avx,tune=native")
#pragma comment(linker, "/STACK:1024000000,1024000000")
#endif
#include <bits/stdc++.h>
#include <ext/numeric>
#include <ext/pb_ds/assoc_... | ALGO | 0.999798 | 4.380076 | {
"github_metadata": {
"branch": "master",
"commit_count": 1412,
"repo_created_at": "2020-12-21T04:47:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "94dbeab... |
d476d770-22af-4101-a7c0-71a72d934ede | A-bjoern/02393DTU | ex11/FibonacciTree.cpp | //
// Created by asbpo on 25-11-2024.
//
#include <iostream>
#include <vector>
//I find it annoying we have to use it in the .cpp file when we've already learned about .h and the contract we can
//impose from there.
//#include <FibonacciTree.h>;
using namespace std;
struct Node {
int val;
Node *left;
Node... | ALGO | 0.999328 | 5.347579 | {
"github_metadata": {
"branch": "main",
"commit_count": 26,
"repo_created_at": "2024-09-03T14:07: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": "358222f0bea... |
f752c9a0-b2ec-4c8d-b9e2-9b28dbfe9580 | Eicosane-2/Schemi | Schemi/src/solverStages/secondOrderStepSolverRK.cpp | /*
* secondOrderStepSolverRK.cpp
*
* Created on: 2024/11/20
* Author: <NAME>
*/
#include "secondOrderStepSolverRK.hpp"
#include "Advection2dOrder.hpp"
#include "Diffusion.hpp"
#include "linearInterpolate.hpp"
schemi::secondOrderStepSolverRK::secondOrderStepSolverRK(
homogeneousPhase<cubicCell> & gasPhas... | ALGO | 0.999969 | 5.731669 | {
"github_metadata": {
"branch": "main",
"commit_count": 152,
"repo_created_at": "2023-07-31T08:00: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": "24cb0d40a7... |
c028f9a6-fd32-4350-a459-2cbfc8351030 | allpasscool/leetcodes | leetcode426/leetcode426_my_version.cpp | /*
// Definition for a Node.
class Node {
public:
int val;
Node* left;
Node* right;
Node() {}
Node(int _val) {
val = _val;
left = NULL;
right = NULL;
}
Node(int _val, Node* _left, Node* _right) {
val = _val;
left = _left;
right = _right;
... | ALGO | 0.999987 | 6.409487 | {
"github_metadata": {
"branch": "master",
"commit_count": 445,
"repo_created_at": "2019-01-15T03:37:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "96b366c4... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.