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 |
|---|---|---|---|---|---|---|---|
54807dc2-bf16-48c2-bd2a-8ea33338eeb7 | wdsking/PolskiSpoj | AL_29_01 - Negative split/AL_29_01 - Negative split/main.cpp | #include <iostream>
#include <string>
#include <vector>
using namespace std;
class Run
{
public:
int time5;
int time10;
int time15;
int time20;
int total;
int expected;
Run()
{
}
};
int main()
{
ios_base::sync_with_stdio(0);
int tests;
cin >> tests;
vector<Run> runs;
for (int i = 0; i < tests; ++i)
{
... | ALGO | 0.982889 | 4.009782 | {
"github_metadata": {
"branch": "master",
"commit_count": 52,
"repo_created_at": "2018-07-27T11:00:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "45e306184... |
b5e8990f-e296-43a5-b6e3-f521bf452c05 | TanveerSingh31/DSA | Trees/PreOrder Traversal.cpp | #include <bits/stdc++.h>
using namespace std;
template<typename T>
class TreeNode{
public:
T data;
vector<TreeNode<T>* > children; // vector of pointers to store addresses of children nodes
TreeNode(T data){
this->data = data;
}
};
// Root gets printed first, children are printed ... | ALGO | 0.999862 | 4.809635 | {
"github_metadata": {
"branch": "master",
"commit_count": 40,
"repo_created_at": "2024-03-16T11:42: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": "2e51eb8f5... |
864d3c0f-d60f-44e4-af19-7aadc7611fa1 | ScarletMcLearn/UniThings | CSC101-CPP/CSE-101-master/Assignment 26 A/Assignment 26 A/Assignment 26 A/1621176_CSC101_1_Assignment26A.cp | //
// main.cpp
// Assignment 26 A
//
// Created by <NAME> on 7/20/16.
// Copyright © 2016 <NAME>. All rights reserved.
//
#include <iostream>
using namespace std;
//\\Take an input in the main, and compute the factorial inside a function and return the function. (Output the result in the main)
//Example:
//5!... | ALGO | 0.996492 | 4.080739 | {
"github_metadata": {
"branch": "master",
"commit_count": 97,
"repo_created_at": "2017-02-11T15:15:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ccb8bcdaa... |
c393c352-a720-4eab-b240-b700e3986fc9 | ASSERT-KTH/Supersonic | predictions/submissions-aizu-gpt35/Codenet/p02239/117242742/response_8.cpp | #include <iostream>
#include <queue>
#include <cstring>
using namespace std;
bool m[105][105];
int n, d[105];
void bfs(int s) {
memset(d, -1, sizeof(d));
d[s] = 0;
queue<int> q;
q.push(s);
while (!q.empty()) {
int u = q.front();
q.pop();
for (int i = 0; i < n; i++) {
if (m[u][i] && d[i] == -... | ALGO | 0.999966 | 3.726863 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2022-02-03T10:33:34.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d2a632d382765... |
ad284c98-df8d-4ee6-aa0b-f3461d26c90c | jonasla/icpc | simulacros/Regionals 2014 - Asia - Guangzhou/7079.cpp | #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <utility>
#include <map>
using namespace std;
typedef long long tint;
unsigned long long floyd(vector<vector<int> > g, int ign){
int n = g.size();
for(int k=0; k<n; k++)
if(k != ign)
for(int i=0; i<n; i++)
if(i != ign)
... | ALGO | 0.999872 | 3.433787 | {
"github_metadata": {
"branch": "master",
"commit_count": 174,
"repo_created_at": "2018-02-26T02:20:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "910c3ab2... |
48682417-ce64-4d6a-9e4e-a68014f94436 | fy666/adventOfCode | 2022/day24.cpp | #include "days.hpp"
#include <algorithm>
#include <iostream>
#include <map>
#include <unordered_set>
#include <vector>
std::map<char, Point> OBS_DIRECTIONS = {{'>', {0, 1}}, {'<', {0, -1}}, {'^', {-1, 0}}, {'v', {1, 0}}, {'#', {0, 0}}};
std::map<Point, char> DIRECTIONS_OBS = {{{0, 1}, '>'}, {{0, -1}, '<'}, {{-1, 0}, '... | ALGO | 0.999674 | 5.598868 | {
"github_metadata": {
"branch": "master",
"commit_count": 76,
"repo_created_at": "2018-12-02T15:57: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": "56cd8c990... |
bd15f71a-4ac0-46d7-805e-8c7168986ac0 | gkswns3708/BOJ_CPP | PS/BaekJoon 14923번 미로 탈출.cpp | #include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#define int long long int
using namespace std;
int N, M;
int sx, sy;
int ex, ey;
int arr[1000 + 2][1000 + 2];
bool visited[1000 + 2][1000 + 2][2];
bool possible(int y, int x, int wall) {
if (y > 0 && y <= N && x > 0 && x <= M && wall >= arr[... | ALGO | 0.999933 | 4.653419 | {
"github_metadata": {
"branch": "main",
"commit_count": 505,
"repo_created_at": "2020-10-27T17:18: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": "ec5e49333c... |
b036f4aa-5f36-485d-b870-000f6f2c9a1f | sanjeetboora/June4Workshop | B2KforThePricesOfOne.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
ll maxGoods(ll* arr, ll n, ll p, ll k) {
ll dp[200010] = {0};
sort(arr, arr + n);
ll ans = 0;
for (ll i = 0; i < n ; ++i)
{
if (i < k - 1) {
dp[i] = arr[i] + (i == 0 ? 0 : dp[i - 1]);
}
else {
dp[i] = arr[i] + (i == k - 1 ? 0 : ... | ALGO | 0.999972 | 4.608878 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-06-04T16:45:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a1fc1f36d7... |
e15a52de-91a2-483c-8d1d-ebd4abc8c330 | raincross7/code-similarity | codes/train_code/problem128/problem128_5.cpp | #include <bits/stdc++.h>
// #include <atcoder/all>
#define ll long long int
#define ld long double
#define yorn(f) cout<<((f)?"Yes":"No")<<endl;
#define YORN(f) cout<<((f)?"YES":"NO")<<endl;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define repi(i, n) for (ll i = 1; i < (ll)(n); i++)
#define all(x) (x).begin()... | ALGO | 0.99981 | 3.272843 | {
"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": "731038b22afb... |
60025311-0dc5-4c98-85c1-fac6756ccbdc | playbar/mysqlsrc | AliSQL/storage/tokudb/ft-index/ft/serialize/block_allocator_strategy.cc | /* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
/*
COPYING CONDITIONS NOTICE:
This program is free software; you can redistribute it and/or modify
it under the terms of version 2 of the GNU General Public License as
published by the Free Softwa... | ALGO | 0.909734 | 7.353407 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2019-05-05T22:14:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "831d5c2893... |
b0ab1e03-35eb-4d57-be4f-4eb1a03f50df | codewasp942/luogu | 1.cpp | #include <iostream>
#include <cstring>
#include <algorithm>
#include <cstdio>
#include <map>
using namespace std;
const int N=500005;
int n,m;
struct Rg{
int l,r;
bool operator<(const Rg& o) const { return (r-l)<(o.r-o.l); }
int len() const { return r-l; }
}a[N];
map<int,int> p;
int tp=0;
namespace Seg{
// const... | ALGO | 0.99999 | 3.135391 | {
"github_metadata": {
"branch": "solving",
"commit_count": 7,
"repo_created_at": "2021-05-15T04:40:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6aa08f399... |
075a3523-3cce-4740-b7be-5a8e49aeedda | kfejzic1/Algorithms-DataStructures | Z5/Z1/main.cpp | #include <iostream>
#include <utility>
#include <vector>
#include <string>
using namespace std;
template <typename TipOznake> class Cvor;
template <typename TipOznake> class Grana;
template <typename TipOznake> class GranaIterator;
template <typename TipOznake> class ListaGraf;
template <typename TipKljuca, typename... | ALGO | 0.992538 | 3.557319 | {
"github_metadata": {
"branch": "main",
"commit_count": 27,
"repo_created_at": "2022-04-17T11:39: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": "f90b149021c... |
d1fe2efc-543d-4145-a0cd-a7735aaa610a | Adi533/CompetiveTemplate | SGTree.cpp | class SGTree {
vector<int> seg;
public:
SGTree(int n){
seg.resize(4*n);
}
void build(int ind,int low,int high,vector<int> arr){
if(low==high){
seg[ind]=arr[low];
return;
}
int mid=low+(high-low)/2;
build(2*ind+1,low,mid,arr);
b... | ALGO | 0.999992 | 5.529084 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2024-12-02T18:11:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d17ea9f99c8... |
1ddf3205-4159-4da7-b2c5-87951686a8b0 | adrian-soch/frontier_exploration | frontier_exploration/include/frontier_exploration/frontier_utils.hpp | #ifndef FRONTIER_UTILS_
#define FRONTIER_UTILS_
#include<iostream>
#include<vector>
#include<utility>
#include<queue>
struct frontierRegion {
int size;
float x;
float y;
float score;
};
using cell = int8_t;
const std::vector<int> dr_4 = {-1, 0, 0, 1};
const std::vector<int> dc_4 = {0, -1, 1, 0};
co... | ALGO | 0.999613 | 6.432996 | {
"github_metadata": {
"branch": "main",
"commit_count": 30,
"repo_created_at": "2023-03-11T23:25:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 27,
"forks": 7,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "52aea1ecfd... |
13aceea3-feef-4fed-beac-68494ddb2ad1 | Sakasu-TUAT/atcoder | tessoku/9/a63.cpp | #include <iostream>
#include <string>
#include <map>
#include <vector>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <limits>
#include <deque>
#include <cmath>
#include <iomanip>
#include <limits>
#include <deque>
#include <set>
#include <queue>
#include <unordered_map>
#include <algorithm>
#include... | ALGO | 0.999996 | 3.779779 | {
"github_metadata": {
"branch": "main",
"commit_count": 62,
"repo_created_at": "2023-06-09T05:34: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": "f18a8f9f9d8... |
1c1752fe-952f-49f0-9e39-7f2c620410c0 | wisdompeak/LeetCode | BFS/127.Word-Ladder/127.Word-Ladder.cpp | class Solution {
public:
int ladderLength(string beginWord, string endWord, vector<string>& wordList)
{
unordered_map<string,vector<string>>Map;
unordered_map<string,int>visited;
unordered_set<string>Set;
for (int i=0; i<wordList.size(); i++)
{
Set.insert(wor... | ALGO | 0.999979 | 5.467398 | {
"github_metadata": {
"branch": "master",
"commit_count": 8912,
"repo_created_at": "2017-03-01T10:30:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6018,
"forks": 1314,
"issues": 4,
"pull_requests": 0
},
"file_meta": {
"content_id": "c... |
e115773b-ef17-4762-b73f-1a73939fdf93 | arangodb/arangodb | 3rdParty/boost/1.78.0/libs/math/example/find_scale_example.cpp | // find_scale.cpp
// Copyright <NAME> 2007, 2010.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
// Example of finding scale (standard deviation) for normal (Gaussian).
// ... | ALGO | 0.997919 | 6.273551 | {
"github_metadata": {
"branch": "devel",
"commit_count": 51986,
"repo_created_at": "2011-10-26T06:42:00.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 13878,
"forks": 857,
"issues": 743,
"pull_requests": 38
},
"file_meta": {
"content_id": ... |
bec8c948-cd32-4062-a257-0609441d512a | yangdihan/Data-Structures-Class-FA17 | lab/lab_quacks/quackfun.cpp | /**
* @file quackfun.cpp
* This is where you will implement the required functions for the
* stacks and queues portion of the lab.
*/
#include <iostream>
using namespace std;
namespace QuackFun {
/**
* Sums items in a stack.
* @param s A stack holding values to sum.
* @return The sum of all the elements in the... | ALGO | 0.97025 | 5.160759 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-01-06T17:54:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4939fe6262... |
d9c83839-dd94-436d-a081-7c58365790db | opencv/opencv_contrib | modules/ximgproc/include/opencv2/ximgproc/edge_filter.hpp | /*
* By downloading, copying, installing or using the software you agree to this license.
* If you do not agree to this license, do not download, install,
* copy or use the software.
*
*
* License Agreement
* For Open Source Computer Vision Library
* (3 - clause BSD License)
*
* Redistribution and use ... | ALGO | 0.997469 | 4.158607 | {
"github_metadata": {
"branch": "4.x",
"commit_count": 4557,
"repo_created_at": "2013-09-11T13:28:04.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 9757,
"forks": 5828,
"issues": 553,
"pull_requests": 88
},
"file_meta": {
"content_id": "97... |
baeec51e-939c-4fe4-ad33-40e30f32a93c | kmjp/procon | gcj/gcj18/q_d.cpp | #include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;
#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#define ZER... | ALGO | 0.997079 | 3.499447 | {
"github_metadata": {
"branch": "master",
"commit_count": 3966,
"repo_created_at": "2015-02-15T11:25:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 12,
"forks": 2,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "a2efcc... |
4fb7e6e2-18c9-40af-b090-42e9a3fa850c | OthmaneHanyf/DataStructers-Algorithms | data structers/binary_tree.cpp | #include <iostream>
#include "binary_tree.h"
#define size_s 64
int manu(){
printf ("\n\n BINARY TREE MANAGMENT \n");
printf (" 0 - End the program\n");
printf ("\n");
printf (" 1 - create a genealogic tree\n");
printf (" 2 - Create an arithmetic expression tree\n");
printf ("\n");
printf (... | TOOL | 0.977232 | 3.812985 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2021-02-17T11:57:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "47af0c9c7e... |
d475400e-f203-4b84-b511-8e927a110f35 | Sahil12S/LeetCode | Cplusplus/numberOfIslandsDS.cpp | // Given a 2d grid map of '1's (land) and '0's (water), count the number of islands.
// An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically.
// You may assume all four edges of the grid are all surrounded by water.
// Implementation using Disjoint Sets
#include <iost... | ALGO | 0.999988 | 6.811586 | {
"github_metadata": {
"branch": "master",
"commit_count": 335,
"repo_created_at": "2018-08-22T17:23:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3e7eb6b1... |
ef5325fc-787c-44ad-9bf0-aad08b2f2b22 | HuyWibu/Source_Code_C_plus_plus | code_Ho/email_hop_le.cpp | #include <bits/stdc++.h>
using namespace std;
bool ktra(string s)
{
int dem = 0;
for (int i = 0; i < s.size(); i++)
{
if (s[i] == ' ')
return false;
}
for (int i = 0; i < s.size(); i++)
{
int k = (int)s[i];
if (k == 64)
dem++;
if (k != 95 ... | ALGO | 0.999227 | 4.081452 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2021-09-07T11:53:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0f6ccea26... |
578ccee1-0af0-401c-9e19-e73e5658e9a4 | Chinkyu/CXXExercise | MyAlgorithmPractice/MyAlgorithmPractice/29.DivideTwoInteger2_fromInt.cpp | // 여기 이 알고리즘은 좀더 돌아가는 알고리즘을 추가 확인 해 볼 필요 있음.
// 기존 생각하던 뺄샘을 가지고 만들면 Timeout 발생함.
#include <iostream>
using namespace std;
class Solution {
public:
int divide(int dividend, int divisor) {
if (divisor == 1) return dividend;
if (divisor == -1) {
if (dividend == INT32_MIN) return INT32_MAX;
return -divid... | ALGO | 0.999928 | 4.475202 | {
"github_metadata": {
"branch": "master",
"commit_count": 754,
"repo_created_at": "2016-11-04T06: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": "0f1afe11... |
7e39d907-4f5b-4474-b239-7978a696030a | TheMR-777/MyUniversity | 2nd Semester (2020)/C++ Projects (Object_OP)/#Officials/Grouping According to the Concepts/Side-Concepts/Operator Overloading by MR/Operator Overloading - Algebraic/overload_optimized_2.cpp | #include <iostream>
using namespace std;
class Vector
{
float x = 0.0;
float y = 0.0;
float z = 0.0;
public:
// Constructor
Vector(float&& x = 0.0 , float&& y = 0.0 , float&& z = 0.0)
: x(x) , y(y) , z(z) {}
// Overloaders
Vector operator+ ( const Vector &V ... | TOOL | 0.947876 | 4.954391 | {
"github_metadata": {
"branch": "main",
"commit_count": 53,
"repo_created_at": "2023-01-07T19:37:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "37dc8dcc7d7... |
dbc03a83-9f02-45bc-9f4d-c99b28235bae | luis-sagx/Estructura | PrimerParcial/Listas/listasCirculares/main.cpp | #include<stdio.h>
#include<stdlib.h>
using namespace std;
struct nodo{
int dato;
nodo *siguiente;
};
nodo *cabeza = NULL;
void insertarInicio(int dato){
nodo *nuevoNodo = (nodo*)malloc(sizeof(nodo));
nuevoNodo->dato = dato;
if(cabeza == NULL){
nuevoNodo->siguiente = nuevoNodo;
cab... | ALGO | 0.999837 | 4.627421 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2024-07-18T20:48:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "917b710288d... |
6672b64c-09bb-426e-a316-4889ee223eb8 | yang48699997/code | cf/round/edu175/2070D.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
template<class T>
constexpr T power(T a, ll b) {
T res {1};
for (; b; b /= 2, a *= a) {
if (b % 2) {
res *= a;
}
}
return res;
}
constexpr ll mul(ll a, ll b, ll p) {
ll res = a * b - ll(1.L * a * b / p... | ALGO | 0.999894 | 5.497619 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2024-04-12T14:28: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": "2cd056c49... |
33040839-4a85-4f99-9f7b-a3493a94b6f9 | Ayushagarwall007/DSA-Solution-sheet | SORTINGS ALGOS/count sort algo .cpp | // Working of Counting Sort
// Find out the maximum element (let it be max) from the given array.
// Counting Sort steps
// Given array
// Initialize an array of length max+1 with all elements 0. This array is used for storing the count of the elements in the array.
// Counting Sort Step
// Count array
// Store the co... | ALGO | 0.999983 | 7.02804 | {
"github_metadata": {
"branch": "main",
"commit_count": 790,
"repo_created_at": "2022-07-17T14:27:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6560d2c234... |
c4fe5928-55ed-4918-8d1d-c257981813cf | akshaymalik889/DSA | Tree/Binary_Tree/Q4_diameter_width_of_BT.cpp | #include<iostream>
#include<queue>
using namespace std;
class Node
{
public:
int data;
Node* left;
Node* right;
Node(int data)
{
this->data=data;
this->left=NULL;
this->right=NULL;
}
};
class ques4
{
public:
Node* buildTree(Node* root)
{
int da... | ALGO | 0.999896 | 4.088519 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-08-25T08:38: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": "542c346f3231... |
0f4e98c9-305b-4544-aa55-d3840b650cdd | ralymuhif/partialFlips | partialFlips.cpp | #include <iostream>
#include <vector>
using namespace std;
// Function that reverse an array
void partialFlip(int arr[], int i)
{
int start {0};
int temp {0};
while (start < i)
{
temp = arr[start];
arr[start] = arr[i];
arr[i] = temp;
start++;
i--;
}
}
// ... | ALGO | 0.999868 | 5.054922 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2022-04-05T20:06:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "360ae418fefd... |
d2c8ed07-0502-4a07-be46-eb3b058d9ecf | Ahsanul24/My-Codes | diameter_of_a_tree.cpp | // IN THE NAME OF ALLAH
// Coded by <NAME>
// NSTU//CSTE
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
const int MOD = 1000000007;
#define pb push_back
#define vi vector<int>
#define vl vector<ll>
#define f first
#define s second
#define bit(a) __builtin_popcount(a)
#define w(x) while (x--)
#d... | ALGO | 0.987109 | 3.728908 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2025-01-24T11:20: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": "dbca24994319... |
89b1d6b6-f073-4771-af7b-be5fd2706dd6 | MegaOwIer/CodeArchive | Codeforces/1201-1400/1228F.cpp | #include<bits/stdc++.h>
using namespace std;
const int MX = (1 << 17) + 5;
int cnt[7], siz[MX];
vector<int> G[MX];
int NoSolution() {
puts("0\n");
return 0;
}
int Solved(vector<int> val) {
cout << val.size() << "\n";
sort(val.begin(), val.end());
for(int v : val) cout << v << ' ';
return 0;
}
bool dfs2(int u,... | ALGO | 0.999937 | 4.20262 | {
"github_metadata": {
"branch": "master",
"commit_count": 235,
"repo_created_at": "2018-06-25T07:08:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6f76e689... |
85b5848c-45d2-456e-815a-154507209835 | Eyantra698Sumanto/eSim-2.1 | ngspice-nghdl/src/spicelib/devices/hicum2/hicumL2.cpp | /**********
License : 3-clause BSD
Spice3 Implementation: 2019-2020 Dietmar Warning, <NAME>, <NAME>
Model Author : 1990 <NAME> TU Dresden
**********/
/*
* This file defines the HICUM L2.4.0 model load function
* Comments on the Code:
* - We use dual numbers to calculate derivatives, this is rea... | ALGO | 0.990239 | 5.145037 | {
"github_metadata": {
"branch": "master",
"commit_count": 102,
"repo_created_at": "2021-08-13T17:19:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c0781dd2... |
d314296e-9370-4ea6-92ef-7791f7484266 | Rasakhatskiy/Labs_S2 | Lab_04/Include/LogicTree.hpp | #ifndef LOGIC_TREE_HPP
#define LOGIC_TREE_HPP
#include <vector>
#include <map>
#include <string>
#include <stack>
/* 0 - 0
1 - 1
& - and
| - or
+ - xor
> - implication
= - equality
*/
class LogicTree
{
public:
class Node
{
public:
char Value;
Node* Parent;
Node* Left;
Node* Right;
Node(Node* pa... | ALGO | 0.999123 | 4.279438 | {
"github_metadata": {
"branch": "master",
"commit_count": 101,
"repo_created_at": "2020-01-23T21:16: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": "1d4082e9... |
1b7961ef-ddab-4711-bbe2-bfeed61d8c47 | mateuscsilva/grundycoloring | brkgaGrundy/GrundyInstance.cpp | #include <string.h>
#include <iostream>
#include <fstream>
#include <cmath>
#include "GrundyInstance.h"
GrundyInstance::GrundyInstance(const std::string& instanceFile) throw(GrundyInstance::Error) :
name(""), comment(""), problemType(""), nNodes(0) {
std::ifstream fin(instanceFile.c_str());
if(! fin) { throw Error... | ALGO | 0.947248 | 4.410372 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2024-05-02T13:02:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e1b8e46d28dd... |
9bb6e4d1-5b7b-473a-81f5-69724f13b974 | ishandutta2007/codeforces-k | kuroni/normal/582/E.cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 16, MOD = 1E9 + 7;
int n, u, cur = 0, msk = 0, pos[4], neg[4];
string s;
vector<int> fast_subset_transform(vector<int> a, bool inv, int typ) {
vector<int> ans = a;
for (int n = ans.size(), step = 1; step < n; step *= 2) {
for (int i = 0; i <... | ALGO | 0.999947 | 5.110528 | {
"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": "826ea9850553... |
73ed17cb-58fb-4120-9494-b4e3f37d0642 | watemus/cp-prog | tinkoff2020/sqrt/genb.cpp | //
// Created by watemus on 16.10.2020.
//
//
// Created by watemus on 11.10.2020.
//
//
// Created by watemus on 11.10.2020.
//
//
// Created by watemus on 05.10.2020.
//
//
// Created by watemus on 24.03.2020.
//
#include <bits/stdc++.h>
using namespace std;
signed main(int argc, char **argv) {
mt19937 rnd(a... | ALGO | 0.99799 | 3.554674 | {
"github_metadata": {
"branch": "master",
"commit_count": 52,
"repo_created_at": "2020-03-24T15:44: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": "ab7b2b3f4... |
7512be51-0a17-4d9d-b63c-ee2cabc7cd43 | colorain549/cpp_leetcode | 7_binaryTree/29_insertIntoBST.cc | // 输出
// 1 3 2 6
#include <iostream>
#include <vector>
using std::cin;
using std::cout;
using std::endl;
using std::vector;
struct TreeNode
{
int val;
TreeNode *left;
TreeNode *right;
TreeNode() : val(0), left(nullptr), right(nullptr) {}
TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
... | ALGO | 0.999967 | 5.316296 | {
"github_metadata": {
"branch": "main",
"commit_count": 90,
"repo_created_at": "2024-04-07T10:06: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": "70b4973332d... |
e194c2f5-fea2-4dd1-9167-27a445dbc671 | Anamariabellop/BelloAnaS6C1 | BelloAnaMS6C1.cpp | #include<iostream>
#include<fstream>
using namespace std;
void adveccion(float t0, float tf,float constante, int npuntos, string filename);
int main(){
float v=1.0;
int N=80.0;
adveccion(0.0,2.0,v, N, "pulso.txt");
return 0;
}
void adveccion(float t0, float tf,float constante, int npuntos, string filename){... | ALGO | 0.998793 | 4.204278 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2019-07-08T19:36: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": "1a681327a9... |
51904a38-2e02-4b58-832e-67c26a67b4aa | danielsaraf94/ex4 | MatrixSearchable.cpp | //
// Created by shlomo on 14/01/2020.
//
#include "MatrixSearchable.h"
MatrixSearchable::MatrixSearchable(MatrixProblem *m) {
matrix_problem = m;
Point start_point = m->GetStart();
init_state = new State<Point>(start_point);
init_state->setCameFrom(NULL);
init_state->setCost(m->getValuebyIndex(start_point.g... | ALGO | 0.999777 | 4.809524 | {
"github_metadata": {
"branch": "master",
"commit_count": 149,
"repo_created_at": "2020-01-11T09:40:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "984a9455... |
a2280cb1-c0dd-4f17-bc00-5a0751622465 | yejingxin/minAone | Examples/Two_Compartment_HH_Neuron/myfunctions.hpp | #include <cmath>
#include <cstdlib>
#include <iostream>
#include <fstream>
using namespace std;
double tol = 5.0;
double ghk(double V)
{
double Theta = 13.5;
double value=0.0;
if (abs(V) < tol){
value = -Theta - 0.5*V - V*V/(12.0*Theta)+ V*V*V*V/(720.0*Theta*Theta*Theta) - V*V*V*V*V*V/(30240.0*Theta*Theta... | ALGO | 0.9996 | 3.023522 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2014-09-30T20:37:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1b40cc378... |
bc50ca4a-ffa2-4022-b1ac-f95111a104a8 | yjeong0413/problem_solving | C++/326.Power_of_Three.cpp | class Solution {
public:
bool isPowerOfThree(int n) {
bool output = false;
int cnt = 0;
int curr = n;
int rem = 0;
if (curr == 1) output = true; // if
while (rem == 0 & curr > 1) {
rem = curr%3; // get remainder
curr = curr... | ALGO | 0.999574 | 5.306701 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2022-03-06T01:27: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": "2476cd45f... |
86c1702a-8c99-4e3a-a617-123ef991e16d | LeonJinC/Fast-Convolution-with-SIMD-and-GEMM | Rowfirst_Matrix_and_GEMM_SIMD/源.cpp | #include"MyMatrix.h"
using namespace std;
//#define M 1//C_out=3
//#define N 1024*1024//H_out*W_out=8*8
//#define K 9//C_in*H_k*W_k=3*3*3
//
//
#define M 32//C_out=3
#define N 32//H_out*W_out=8*8
#define K 32//C_in*H_k*W_k=3*3*3
//#define M 1024//C_out=3
//#define N 1024//H_out*W_out=8*8
//#define K 1024//C_in*H_k*... | ALGO | 0.932048 | 3.529474 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2020-11-08T03:36:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e4bcdf3fa8a... |
14eb5aa9-a9ec-4309-96c4-a59d9fe96c21 | ayoubHam2000/cpp_tutorial | book_1/chapter_3/106.cpp | #include <iostream>
#include <string>
#include <vector>
using std::cout;
using std::cin;
using std::endl;
using std::string;
using std::vector;
/*
* Like pointers (§ 2.3.2, p. 52), iterators give us indirect access to an object. In
-> the case of an iterator, that object is an element in a container or a character... | TOOL | 0.98376 | 3.567334 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2022-06-10T14:01:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3ea08eabd8... |
574565df-1998-4c09-ae3a-d6c8883f92ca | JunYupK/Algorithm-Practice | Algorithm Practice/추석트래픽.cpp | #include <string>
#include <vector>
#include <iostream>
using namespace std;
//string 단위가 거슬리면 항상 때는 연습을 하자 substr은 뒤인자가 overflow여도 오류가 안뜬다!
int TimeSub(string lines) {
string h, m, s, ms;
int hour, min, sec, msec;
lines.pop_back();
h = lines.substr(11, 2);
m = lines.substr(14, 2);
s = lines.substr(17, 2);
ms =... | ALGO | 0.998686 | 4.845788 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2021-09-06T15:04: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": "6ad4f2a87... |
85c2d57c-86f5-4a86-b13d-855ca283b8b9 | MisterProper9000/Quantum-tic-tac-toe | Register.cpp | #include "Register.h"
#include <cstdlib>
#include <time.h>
ostream& operator<<(ostream& out, Register& reg)
{
for (int i = 0; i < reg.Reg.Size(); i++)
{
cout << reg.Reg[i] << endl;
}
cout << endl;
return out;
}
void Register::SetPosition(short int p)
{
int n, tA, tB;
cin >> n;
List tmp;
for (int j = 0; j... | ALGO | 0.998966 | 3.51814 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2018-04-05T17:13: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": "18dacca9df... |
c6c55be1-07a2-4a21-af93-721ae9b26339 | arch-ana/nyu-tandon-bridge-2024 | week15/Homework/ab12864_hw13_q1.cpp | #include <iostream>
#include <cstdlib>
#include <vector>
#include <ctime>
#include <typeinfo>
using namespace std;
const int GRID_SIZE = 20;
//character denotation
const char ANT_CHAR = 'o';
const char DOODLEBUG_CHAR = 'X';
const char SPACE_CHAR = '-';
//start number of critters
const int START_ANTS = 100, START_DO... | ALGO | 0.990128 | 3.502645 | {
"github_metadata": {
"branch": "main",
"commit_count": 68,
"repo_created_at": "2024-09-27T16:36:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "763f8466414... |
f66155d3-5e61-4e36-9d4e-c3f7ee154916 | sid2001/CodingPrac | Codeforces/QueriesForTheArray.cpp | // #include <bits/stdc++.h>
// using namespace std;
// int main(){
// int t;
// cin>>t;
// int flag = 1;
// while(t--){
// char ch;
// int len=0;
// int stat = -1;
// int changes = 0;
// string str;
// cin>>str;
// for(auto ch:str){
// if(ch=='0'){
// changes... | ALGO | 0.999711 | 4.534492 | {
"github_metadata": {
"branch": "master",
"commit_count": 48,
"repo_created_at": "2023-09-21T05:29: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": "d608a7f44... |
51fef5b9-9d91-4e46-8401-a623fc875536 | Sunday111/leetcode | code/1260_shift_2d_grid/1260_shift_2d_grid.hpp | #pragma once
#include <vector>
class Solution
{
public:
[[nodiscard]] static constexpr std::vector<std::vector<int>> shiftGrid(
std::vector<std::vector<int>>& grid,
uint16_t k) noexcept
{
const uint16_t rows = grid.size() & 0xFFFF;
const uint16_t columns = grid.front().size() &... | ALGO | 0.998759 | 7.04713 | {
"github_metadata": {
"branch": "main",
"commit_count": 257,
"repo_created_at": "2025-04-12T19:39: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": "4394abcef4... |
dac30674-4fc0-4e91-b8f8-a435233a2367 | nyxens/Nyxen | c++/stackimplist.cpp | #include <iostream>
using namespace std;
struct Node{
int data;
Node* next;
};
void push(Node*& top,int value){
Node* newNode = new Node;
if(!newNode){
cout << "Stack overflow" << '\n';
return;
}
newNode->data = value;
newNode->next = top;
top = newNode;
cout << value... | ALGO | 0.998313 | 4.162025 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2025-01-17T05:41: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": "413233a1459... |
dcd6cae5-b9d4-4753-979a-5cabc723a15e | hurryhx/PP | n-body/src/pthread.cc |
#include"pthread.hh"
#include<pthread.h>
#include<cstring>
struct PthreadArg{
PthreadWorker *worker;
int task_type;
};
static void *call_pthread(void *arg){ //every thread calc of vel and col
PthreadArg *parg = static_cast<PthreadArg *>(arg);
if (parg->task_type == 0)
parg->worker->thread_calc_vel();
else
... | TOOL | 0.989164 | 5.122572 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2014-03-17T15:34:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f90f764668... |
1f5a734f-031a-4bbb-8f4f-60742e5bbc0c | Divyansh00/Data-Structures-and-Algorithms | Modular_node.cpp | #include<iostream>
using namespace std;
struct node
{
int data;
node *next;
};
void show(node *head)
{
node *current = head;
cout<<"The list is: ";
while(current!=NULL)
{
cout<<current->data<<" ";
current = current->next;
}
cout<<endl;
}
void insert(node **head , int n)
{... | ALGO | 0.999955 | 3.227563 | {
"github_metadata": {
"branch": "master",
"commit_count": 32,
"repo_created_at": "2017-12-06T15:34:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5041a14b2... |
5b1c8e2d-f8c5-4509-92a9-665454d265a9 | DennyKuo0809/leetcode | Array_String/hard/214_fail.cpp | /*
Step 1. Find the longest prefix which is a palindrome. (This can be done by KMP)
Step 2. Reverse the remain part and concate it in front of the original string.
Implementation (KMP Algorithm):
Performing failure function on "{original string}?{reverse string}".
And the failure value of the last elemen... | ALGO | 0.999996 | 5.646934 | {
"github_metadata": {
"branch": "main",
"commit_count": 202,
"repo_created_at": "2023-03-17T01:03: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": "f50126dcb2... |
2e8034ad-9d88-47c0-b0f3-25ad94ae06dd | HzfFrank/Graph-Theory-Tool-Library | include/Algorithms/BreadthFirstSearcher.h | #ifndef BREADTH_FIRST_SEARCHER
#define BREADTH_FIRST_SEARCHER
#include <functional>
#include <optional>
#include <set>
#include <queue>
template <typename TGraph>
class BreadthFirstSearcher {
public:
static void VisitAllVertices(const TGraph *graph, int start, std::function<void(int)> action) {
if (!graph->C... | ALGO | 0.999505 | 6.697724 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2023-07-17T11:14:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b850591aa01... |
245e328c-307b-4212-8b91-732057abc660 | bitcoin/bitcoin | src/rpc/request.cpp | // Copyright (c) 2010 <NAME>
// Copyright (c) 2009-2022 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <rpc/request.h>
#include <common/args.h>
#include <logging.h>
#include <random.h>
#inc... | WEB | 0.903096 | 7.560838 | {
"github_metadata": {
"branch": "master",
"commit_count": 45499,
"repo_created_at": "2010-12-19T15:16:43.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 84603,
"forks": 37529,
"issues": 413,
"pull_requests": 342
},
"file_meta": {
"content_i... |
266aaa5a-b424-4bf2-84fa-bed038fbfb42 | tushar04mishra/coding | c++/stack/largest_area_in_histogram.leetcode.cpp | class Solution {
public:
int largestRectangleArea(vector<int>& arr) {
int n = arr.size();
int nsi[n];
stack<int> st;
nsi[n-1] = n;
st.push(n-1);
for(int i=n-2 ; i>=0 ; i--)
{
while(st.size()>0 && arr[st.top()]>=arr[i]) st.pop();
if(st.s... | ALGO | 0.999903 | 5.968624 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-01-31T16:28: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": "f1d5eea7cd3f... |
f4f12963-f2f4-4a4d-8be7-f05f4b53fecc | yongming-qin/coding | lintcode/lint_486_merget_k_sorted_list.cpp |
#include "common.h"
/**
* @brief Given k sorted integer arrays, merge them into one sorted array.
*
*/
// Yongming
class Solution {
public:
/**
* @param arrays: k sorted integer arrays
* @return: a sorted array
*/
vector<int> mergekSortedArrays(vector<vector<int>> &arrays) {
// wr... | ALGO | 0.99999 | 5.761295 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-03-06T16:55: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": "ff54f3938abf... |
82f03167-4be3-4178-b986-8a865a76aba3 | hoanguyentat/AlgorithmHust | week 1/rockpaperscissors.cpp | /**
* Doc tung dong input
* Kiem tra dau vao khong hop le
* Ham kiem tra kha nang thang thu cua mot van
* Khi nguoi choi thang, thua thi cong them mot vao bien nho tuong ung voi nguoi do, hoa thi giu nguyen
* do phuc tap O(n)
*/
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <string.h>
using... | ALGO | 0.996372 | 3.989942 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2016-09-04T18:35:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3a7b872ce... |
c100f5d7-94e1-44f7-98f4-16e547a3fb6b | lion38925/kit | dp/coin_change_2.cpp | class Solution {
public:
int change(int amount, vector<int>& coins) {
int i,j,k,l,n,count=0;
vector<int>v(amount+1,0);
n=coins.size();
//sort(coins.begin(),coins.end());
// important this is recursive solution
// and specidally for dp problems we use r... | ALGO | 0.999973 | 5.373967 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2021-08-12T16:50: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": "20028dcbca22... |
9326a05b-da89-4c3c-8e76-b611612e06a3 | TakibYeasar/Yeasar_Codeforces_problem_solving | __Contest/Codeforces Round 1037 (Div. 3)/codeforces_2126A.cpp |
// Problem link ===>> https://codeforces.com/contest/2126/problem/A
// submission link ===>> https://codeforces.com/contest/2126/submission/329398737
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ll long ... | ALGO | 0.999922 | 5.748312 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2023-11-19T15:26: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": "0941a1dec12... |
28458d5f-89ad-422a-89c8-32bb4b5a97ea | Amphere/Self_Learning_C-_Projects | Statistical analysis of Rainfall.cpp | //
// main.cpp
// Rain depth Per month
//
// Created by <NAME> on 5/28/18.
// Copyright © 2018 <NAME>. All rights reserved.
//
#include <iostream>
using namespace std;
void IntroDisplay()
{
cout << "This program calculates the average for rainfall per month and year. \n";
}
void GetData(double Data[], int Si... | TOOL | 0.937861 | 5.208625 | {
"github_metadata": {
"branch": "master",
"commit_count": 25,
"repo_created_at": "2018-05-23T06:57: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": "6afc3ceed... |
b6de446a-3be8-4d32-852e-c200d8a972b8 | lonewolfyuri/DataStructures | HW/ggabrich_hw6/testTree.cpp | // <NAME>
//
// 56735102 - ggabrich
#include <fstream>
#include "BinarySearchTree.hpp"
#include "Timer.h"
using namespace std;
void insertAllWords (BinarySearchTree <string, int> &T, int numWords, const char *filename) {
ifstream ifile(filename);
if (!ifile.is_open()) {
cout << "File Error!" << endl;
exit(-1);
... | TOOL | 0.966901 | 4.372904 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-11-07T19:27: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": "ec453a601b... |
959293c7-921a-407e-9794-3efb8e1f187b | M45UDrana/DS-Algo-Problem-Solving | codeforces/437B.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<string, int> psi;
#define ff first
#define ss second
#define pb(a) push_back(a)
#define mp(a,b) make_pair(a,b)
#define input freopen("input.txt","r",stdin)
#define output freopen("output.txt","w",stdout)
#def... | ALGO | 0.999934 | 3.17101 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2021-06-08T17:09: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": "9cb2ef879de... |
c71a1053-ccd9-448f-892a-1e3fbf59d54f | MastersAbh/competitive-programming | Boundary_Traveral.cpp | #include<bits/stdc++.h>
using namespace std;
struct node {
int data;
node *left;
node* right;
};
void printLeaves(node* root)
{
if (root == NULL)
return;
if(root->left == NULL && root->right == NULL){
cout<<root->data<<" ";
}
printLeaves(root->left);
printLeav... | ALGO | 0.999934 | 4.472212 | {
"github_metadata": {
"branch": "master",
"commit_count": 100,
"repo_created_at": "2018-07-12T08:57:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 10,
"issues": 1,
"pull_requests": 2
},
"file_meta": {
"content_id": "9b35f2f... |
12b1df84-a6be-44e7-a25f-368a4d91805b | varuogm/Not-Much-Important | LeCo/Mirror Reflection.cpp | class Solution {
public:
int mirrorReflection(int p, int q) {
int k = 1;
while( p*k % q != 0)
k += 1 ;
if( k % 2 ==0 )
return 0;
int r = p*k /q;
if(r % 2 ==0) return 2;
if(r % 2 ==1) return 1;
return -1;
}
};
/*https://leetcode.com/problems/mirror-reflection/discuss/31... | ALGO | 0.999992 | 5.05238 | {
"github_metadata": {
"branch": "master",
"commit_count": 210,
"repo_created_at": "2020-01-30T16:53:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 2,
"pull_requests": 1
},
"file_meta": {
"content_id": "6e66f93e... |
e85ab2cb-293d-4677-96d3-6a20a9a85390 | BingluCS/CBB-SC25 | Application/MAESTROeX/Source/MaestroBurner.cpp |
#include <Maestro.H>
#include <Maestro_F.H>
using namespace amrex;
#ifndef SDC
void Maestro::Burner(const Vector<MultiFab>& s_in, Vector<MultiFab>& s_out,
const Vector<MultiFab>& rho_Hext,
Vector<MultiFab>& rho_omegadot, Vector<MultiFab>& rho_Hnuc,
[[may... | ALGO | 0.988793 | 5.437773 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-04-27T09:50: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": "a778e113001e... |
a1a6e802-81a1-45b5-a3ba-bc4a11c6e225 | raf0411/data-structures | avlTreeAOL.cpp | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
void pressEnter()
{
char ch;
scanf("%c", &ch);
getchar();
}
struct Data
{
int value;
int height;
Data *left, *right;
};
Data *newNode(int value)
{
Data *temp = (Data*)malloc(sizeof(Data));
temp->value = value;
temp->height = 1;
temp->left = temp->r... | ALGO | 0.999926 | 3.481297 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-09-25T05:15: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": "18f578816e55... |
5fbccb21-08e9-43b5-b6b1-fb6c2ac3f224 | jiaaaaaaaqi/ACM_Code | FZU/2215/19696052_CE_0ms_0kB.cpp | #include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
using namespace std;
typedef long long ll;
const int mx = 10100;
const double eps = 1e-8;
const int mod = 1e9+7;
char str[mx], tmp[mx];
struct NUM {
int x[505];
int maxx;
};
struct Node {
NUM num;
int type;
char symbol;... | ALGO | 0.999899 | 3.838076 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-05-11T16:04:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "331ebe406e... |
699bde54-1dec-482d-8f76-7f28cdd2860e | luhang-HPU/poseidon | src/basics/util/polyarithsmallmod.cpp | #include "src/basics/util/polyarithsmallmod.h"
#include "src/basics/util/uintarith.h"
#include "src/basics/util/uintcore.h"
#ifdef POSEIDON_USE_INTEL_HEXL
#include "hexl/hexl.hpp"
#endif
using namespace std;
namespace poseidon
{
namespace util
{
void modulo_poly_coeffs(ConstCoeffIter poly, std::size_t coeff_count, c... | ALGO | 0.992369 | 7.189582 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2024-11-18T02:29: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": "5ce749936c5... |
8ec252e2-0811-4e04-9417-b77dc908fc0a | ROIcoin/ROIcoin | src/aes.cpp | #include "aes.h"
#ifdef __x86_64__
#include <stdint.h>
#include <x86intrin.h>
static inline void ExpandAESKey256_sub1(__m128i *tmp1, __m128i *tmp2)
{
__m128i tmp4;
*tmp2 = _mm_shuffle_epi32(*tmp2, 0xFF);
tmp4 = _mm_slli_si128(*tmp1, 0x04);
*tmp1 = _mm_xor_si128(*tmp1, tmp4);
tmp4 = _mm_slli_si128... | ALGO | 0.964008 | 5.562989 | {
"github_metadata": {
"branch": "master",
"commit_count": 223,
"repo_created_at": "2017-11-05T04:10:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 18,
"forks": 13,
"issues": 8,
"pull_requests": 1
},
"file_meta": {
"content_id": "4530b0... |
c0f8a3a0-4ccb-410e-8e2a-0c5cb816f784 | BBSSJJ/BOJ | 11660.cpp | // ios_base cin tie 안해주면 시간초과
#include <iostream>
using namespace std;
int N, M, a, b, c, d;
int map[1025][1025];
long long dp[1025][1025];
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> N >> M;
for (int i = 1; i <= N; i++) {
for (int j = 1; j <= N; j++) {
... | ALGO | 0.999907 | 5.072224 | {
"github_metadata": {
"branch": "main",
"commit_count": 209,
"repo_created_at": "2022-06-21T13:38: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": "3b5ec927f8... |
863ec87b-5cd9-424e-acc3-97f64a3ae5d7 | PoeLoren/hackerrank | Running Time of Quicksort.cpp | #include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int qNum = 0;
int partition(vector<int>& a, int l, int r){
int j = l - 1;
int key = a[r-1];
for(int i = l; i < r; ++i){
if(a[i] < key){
++j;
swap(a[i], a[j]);
... | ALGO | 0.999961 | 4.359392 | {
"github_metadata": {
"branch": "master",
"commit_count": 43,
"repo_created_at": "2015-01-24T03:25:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "21b72ed95... |
c8fc0b5f-8b4d-4d37-94a1-73ec748c71da | Smarth2002/GCI_DSA_BOOTCAMP | 14. Sorting Algorithms/merge_sort_2.cpp | #include<bits/stdc++.h>
using namespace std;
void merge(int a[], int start, int mid, int end)
{
int temp[end-start+1];
int i=start, j=mid+1, k=0;
while (i <= mid && j <= end)
{
if(a[i] < a[j])
{
temp[k]=a[i];
i++;
}
else
{
te... | ALGO | 0.999985 | 5.046918 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2022-03-13T14:04: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": "6c8ac22e3eb... |
f02e03ad-cee7-47fe-9845-ee05223e0a8c | Sharmaharshitnone/languages | Cpp/Questions-CPP/GenerateParantheses.cpp | #include <bits/stdc++.h>
using namespace std;
// Step 1. Define the recursive helper function that does the backtracking.
// 'open' and 'close' track the number of open and close parentheses used so far.
void generateParanthesesHelper(int open, int close, int n, string current, vector<string> &result)
{
// Step 2.... | ALGO | 0.999791 | 6.223111 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-07-13T12:10: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": "3937c4b36934... |
cfe4e461-a8e8-4d87-ae73-58beea780066 | zzm99/Algorithm-and-data-structure | 算法/动态规划/使网格图至少有一条有效路径的最小代价.cpp | // https://leetcode-cn.com/contest/weekly-contest-178/problems/minimum-cost-to-make-at-least-one-valid-path-in-a-grid/
class Solution {
public:
int minCost(vector<vector<int>>& grid) {
int n = grid.size(), m = grid[0].size();
int inf = 0x3f3f3f3f;
vector<vector<int> > cost(n, vector(m, inf))... | ALGO | 0.999976 | 5.98462 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2020-06-10T14:05:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4cbcf6e924... |
3ef87888-f802-4f3e-90a4-af40f8e78ae2 | Hanbeom-Park/B_Practice | B_Practice/src/Algo_ver_C++/mergeSort.cpp | #include <stdio.h>
#include "Windows.h"
#include <algorithm>
using namespace std;
const int MAX_SIZE = 500000;
int arr_size;
int ms[MAX_SIZE], qs[MAX_SIZE], stls[MAX_SIZE], buf[MAX_SIZE];
void merge_sort(int* p, int len) {
if (len < 2) return;
int i, j, k, mid;
mid = (len / 2);
i = 0, j = mid, k =... | ALGO | 0.999713 | 4.738635 | {
"github_metadata": {
"branch": "master",
"commit_count": 38,
"repo_created_at": "2019-06-21T01:12:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "313d7f738... |
cf25cf8f-91ce-49d6-9ac2-4f920a3d4e29 | masterchef2209/coding-solutions | codes/codeforces/296B.cpp | /*Read the problem carefully before starting to work on it*/
#include <bits/stdc++.h>
//#include <boost/multiprecision/cpp_int.hpp>
//using namespace boost::multiprecision;
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
//using namespace __gnu_pbds;
typedef lo... | ALGO | 0.999988 | 3.917089 | {
"github_metadata": {
"branch": "master",
"commit_count": 75,
"repo_created_at": "2018-04-02T16:05:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "688ae10cb... |
bbddc16a-b089-4575-9a01-194b00d7b3ef | ValentineKornel/OAiP_2semester | примеры/list_first_example/list_first_example.cpp | #include<iostream>
using namespace std;
class Spisok
{
private:
struct node
{
int elem;
node* sled;
} *phead; //Указатель на начало списка.
public:
Spisok() { phead = new (node); (*phead).sled = NULL; } //Конструктор.
~Spisok() { delete phead; } //Деструктор.
void POSTROENIE();
... | ALGO | 0.998911 | 3.723503 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2023-05-18T09:49:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "edc55dd72f... |
7358763d-00e7-4a01-a86b-e9a253b46e18 | 2112529/Parallel | MPI/MPI_ARM.cpp | #include <malloc.h>
#include <mpi.h>
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <time.h>
#include <fstream>
#include <sys/time.h> //gettimeofday
#include <bits/stdc++.h>
using namespace std;
//进程数
int NUMS_THREADS = 8;
int n;
//方阵
const int N = 5010;
float A[N][N];
typedef long long LARGER_INTE... | ALGO | 0.99975 | 3.199842 | {
"github_metadata": {
"branch": "main",
"commit_count": 64,
"repo_created_at": "2023-03-12T00:48:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ae05c96fbb7... |
4b955b81-d703-4ad9-859e-17fef6ec6424 | gopherWxf/c-c-linux-LearningCode | 1.1.1红黑树/main.cpp | #include <iostream>
#define RED 0
#define BLACK 1
typedef int KEY_TYPE;
typedef struct _rbtree_node {
unsigned char color;//颜色
struct _rbtree_node *left;//左子树
struct _rbtree_node *right;//右子树
struct _rbtree_node *parent;//父结点
KEY_TYPE key;
void *value;
} rbtree_node;//红黑树结点
typedef struct _... | ALGO | 0.999723 | 3.823488 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2022-08-09T06:55:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 45,
"forks": 30,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "e794766... |
356f65f1-d9ea-4508-9713-7a84d66b0aa1 | ishandutta2007/codeforces-x | xiaowuc1/normal/733/B.cpp | #include <algorithm>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unord... | ALGO | 0.99997 | 3.601285 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:38: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": "82382a01dd84... |
5452422f-15ca-4eef-9ea3-fce9a7214482 | lucky5656/C-Code | 05C++提高编程/03STL常用容器/04STL案例1——评委打分案例/评委打分.cpp | #include<iostream>
using namespace std;
#include<vector>
#include<string>
#include<deque>
#include<algorithm>
#include<ctime>
//有5名选手:选手ABCDE,10个评委分别对每一名选手打分,去除最高分,去除最低分,取平均分
//选手类
class Person
{
public:
Person(string name, int score)
{
this->m_Name = name;
this->m_Score = score;
}
string m_Name;
int m_Scor... | ALGO | 0.989953 | 3.616899 | {
"github_metadata": {
"branch": "main",
"commit_count": 55,
"repo_created_at": "2021-03-26T12:13:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cb0caed2890... |
bfa7646b-0267-4c66-b8a1-92e1e7e37766 | IDLabMedia/dyn-lf-renderer | renderer/include/input/program_info.h | //
// Created by brent on 12/10/24.
//
#ifndef PROGRAM_INFO_H
#define PROGRAM_INFO_H
#include <cstddef>
#include <string>
#include <vector>
#include "decompress/decompressor.h"
#include "meshes/mesh_loader.h"
#include "shaders/depth_shader.h"
#include "shaders/shader_program.h"
#include "uniforms/uniforms.h"
enum cl... | TOOL | 0.901391 | 6.888323 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2025-05-26T09:43:03.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f4d41ff30ea3... |
47d2606d-fad8-4dfd-85de-e49fec5fe4df | 311Volt/board-game-ar | app/src/main/cpp/libcatan/src/catan/analysis_settlements.cpp | #include <catan.hpp>
static constexpr float INV_255 = 1.0f / 255.0f;
float rating(float x)
{
return 0.5f - std::atan(4.0f*x - 5) / 3.141591f;
}
enum class BuildingColor: char {
Blue=0, Red=1, Orange=2, None=3, Unknown=4
};
cv::Vec3b BuildingColors1Hot[4] = {
{255,0,0}, {0,255,0}, {0,0,255}, {0,0,0}
};
class... | ALGO | 0.9512 | 4.335366 | {
"github_metadata": {
"branch": "master",
"commit_count": 94,
"repo_created_at": "2022-03-19T13:17:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "65fcd94fc... |
567e0f7d-e9bd-48ab-aa5b-cc53738b6823 | CLDP/ACM-ICPC | Regional-2011/North-America-ECNA/B.cpp | #include <iostream>
using namespace std;
const int MAXN = 20000;
int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
int x[MAXN], y[MAXN];
int times = 0;
while (a != 0 || b != 0 || c!= 0 || d != 0) {
int e, f;
++times;
e = 0, f = 0;
x[0] = a - c;
for (int ... | ALGO | 0.999774 | 3.775493 | {
"github_metadata": {
"branch": "master",
"commit_count": 486,
"repo_created_at": "2013-09-24T19:04:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "016d17f6... |
9e3d49cc-a771-4939-a41b-35c6683b8e31 | Seifalla/Binary-Expression-Tree | BinaryTree.cpp | #include "BinaryTree.h"
#include <iostream>
using namespace std;
//constructor & distructor
BinaryTree::BinaryTree(){
root = NULL;
}
BinaryTree::~BinaryTree(){}
//this function accepts a string
//as a parameter and store it in
// a vector of string then it
// sends it to the function that
//builts the tree
v... | ALGO | 0.999473 | 4.016893 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2017-05-14T17:58: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": "3d7cd5cd12... |
9a458bb4-3f36-4698-bcdb-a962881fca23 | SCR01/-CrackYourPlacement | Trees/MinDistance.cpp | class Solution{
private:
Node* lca(Node*root, int a, int b){
// base case
if(!root){
return nullptr;
}
if(root->data == a || root->data == b){
return root;
}
Node*l = lca(root->left,a,b);
... | ALGO | 0.99999 | 6.152689 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2024-07-15T02:58:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d484634aa47... |
0cbce715-fb6b-4536-815d-1ec18a038d78 | kogehipo/atcoder | ABC351-400/ABC370/abc370_b.cpp | #include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
using ll = long long;
const int INF = 0x7FFFFFFF;
const long long LINF = 0x7FFFFFFFFFFFFFFF;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define range(i, s, e) for (int i = (s); i <= (int)(e); i++)
#define all(a) begi... | ALGO | 0.999969 | 3.861806 | {
"github_metadata": {
"branch": "main",
"commit_count": 26,
"repo_created_at": "2022-11-18T04:17: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": "94c2396f2c0... |
1e7afebc-528d-48da-835d-9d455226d03b | RajaKunalPandit1/CodeForces_Questions | 381A - Sereja and Dima.cpp | Output Status:
By Rajakunalpandit, contest: Codeforces Round #223 (Div. 2), problem: (A) Sereja and Dima, Accepted
// #include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <climits>
#include <cmath>
#include <algorithm>
#include <map>
#include <vector>
#include <unordered_set>
#include <cctype>
#d... | ALGO | 0.999996 | 3.985379 | {
"github_metadata": {
"branch": "main",
"commit_count": 188,
"repo_created_at": "2021-11-11T10:27: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": "ada67f3ad3... |
61b10135-dbca-40b8-ac39-15c7fdff334e | Ce28/CursoCPPTrabajo | 04/ArreglosMulti.cpp | #include <iostream>
using namespace std;
int main(int argc, char const *argv[])
{
/*Formas de declarar un arreglo multidimencial.
int arreglo[2][5];
int arreglo[2][5] = {{16, 2, 77, 40, 12071}, {16, 2, 77, 40, 12071}};
int arreglo[][5] = {{16, 2, 77, 40, 12071}, {16, 2, 77, 40, 12071}};
//*/ ... | ALGO | 0.969585 | 4.173651 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2018-03-23T06:49: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": "d5883e2e6... |
dd7ee2a3-33ec-4286-afbe-1ff94c1ba222 | ishandutta2007/codeforces-d | darkkcyan/normal/732/B.cpp | #include <bits/stdc++.h>
using namespace std;
#define ve vector
#define xx first
#define yy second
#define long long long
#define sz(v) ((int)v.size())
#define bb begin()
#define ee end()
#define rbb rbegin()
#define ree rend()
typedef ve<int> vi;
typedef pair<int, int> ii;
int n, k;
vi a;
ve<vi> dp, tr;
void print... | ALGO | 0.99999 | 3.922969 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:31: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": "73651911ef31... |
146efd06-699a-4b5a-b833-c9db9890bf87 | zjw0722/CppPrimer | oop4/oop4/main.cpp | #include <iostream>
using namespace std;
const double PI = 3.14159;
class Shape
{
public:
virtual void show() = 0;
virtual double area() = 0;
virtual ~Shape()
{}
};
class Shape2D:public Shape
{
public:
Shape2D(double x, double y)
{
this->x = x;
this->y = y;
}
protected:
double x;
double y;
};
class Shap... | ALGO | 0.961259 | 3.649954 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2013-11-09T13:09: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": "9a12a2d10... |
25dd71a9-ee70-4d7f-aed7-bf5905e92f13 | alagner/Nokia-PK-2025 | src/COMMON/Messages/LimitedVector.hpp | #pragma once
#include <vector>
#include <algorithm> // for std::min
namespace common
{
template <typename ValueType, typename SizeType, SizeType MaxSize>
class LimitedVector : private std::vector<ValueType>
{
using Impl = std::vector<ValueType>;
public:
using value_type = typename Impl::value_type;
using... | TOOL | 0.97485 | 7.288428 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2025-02-20T10:10:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 53,
"issues": 18,
"pull_requests": 0
},
"file_meta": {
"content_id": "4c87c6f... |
4d3dbff6-285f-4eda-b8b7-eadb1d1f8d81 | ningenMe/compro-solver-cpp | yosupo-judge/point_add_range_sum.solve.cpp | #include <iostream>
#include <vector>
#include <numeric>
using namespace std;
/*
* @title DynamicSegmentTree - 非再帰抽象化動的セグメント木
* @docs md/segment-tree/DynamicSegmentTree.md
*/
template<class Monoid> class DynamicSegmentTree {
using TypeNode = typename Monoid::TypeNode;
using i64 = long long;
struct Node... | ALGO | 0.999856 | 5.689503 | {
"github_metadata": {
"branch": "master",
"commit_count": 127,
"repo_created_at": "2020-03-15T14:12:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "2cebf4d4... |
60f81b92-5764-4c2d-b076-84063379d6ff | ibudiselic/contest-problem-solutions | tc 160+/PackingShapes.cpp | #include <algorithm>
#include <cassert>
#include <cstdio>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <cstring>
#include <cmath>
using namespace std;
double calc(int W, int H, int w, int h, double alpha) {
double beta = M_PI/2 - alpha;
return h*cos(alpha) + w*cos(beta) - W;
... | ALGO | 0.998513 | 4.130136 | {
"github_metadata": {
"branch": "master",
"commit_count": 75,
"repo_created_at": "2011-08-14T11:43:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9a78bc491... |
338401c3-7c32-43ad-aad7-d612a0f6e974 | hiabed/CPP_MODULES | MODULE08/ex01/Span.cpp | #include "Span.hpp"
// member functions (methods);
void Span::addNumber(int number)
{
if(vArr.size() >= _N)
throw std::runtime_error("the vector is full\n");
vArr.push_back(number);
}
void Span::addRangeNumbers(std::vector<int>::iterator begin , std::vector<int>::iterator end)
{
if(vArr.size() >=... | ALGO | 0.965967 | 4.440656 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2023-09-18T23:35:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7d173f98332... |
8fa34613-d015-4b0a-98b9-8b31adb4b882 | gameprogcpp/code | Exercises/4.2/Board.cpp | // ----------------------------------------------------------------
// From Game Programming in C++ by <NAME>
// Copyright (C) 2017 <NAME>. All rights reserved.
//
// Released under the BSD License
// See LICENSE in root directory for full details.
// ----------------------------------------------------------------
#... | ALGO | 0.974259 | 6.08534 | {
"github_metadata": {
"branch": "master",
"commit_count": 165,
"repo_created_at": "2017-11-13T00:30:50.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1151,
"forks": 374,
"issues": 11,
"pull_requests": 7
},
"file_meta": {
"content_id": "c27... |
b4651013-dbe6-4c7b-b69d-761ff26295bf | Rahul10052002/C-Foundation-Coding | arrary_Largeset_smallest.cpp | #include<iostream>
#include<climits> // This header is for INT_MAX and INT_MIN
#include<algorithm> // This header is for Max and Min Function
using namespace std;
int main() {
int size = 7;
int sum=0;
int Num[size] = {10, 20, -10, 30, 10, 0, 10};
int smallest = INT_MAX; // for smallest, compare Nu... | ALGO | 0.999206 | 3.205143 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-02-29T15:00: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": "dc1976a2e19b... |
63bcf023-b45e-4f3b-89a5-48943cb8b9e6 | yagnasrinath/code | observe.cc | // Our program receives inputs in the form of a text string (it might come from
// a web service or something.) The maximum input size is 30 MB. The text data
// comprise lines of input rows. Each row contains some number of columns,
// separated by commas. Each column for each row contains a numeric value. The
// goa... | DATA | 0.969815 | 6.716594 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-08-02T16:35: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": "41be978b60d8... |
f6262a3d-58dd-4d45-817a-cbd59e50befa | mavd09/competitive-programming | ieee/IEEEXTREME 11.0/Maximum Sum.cpp | #include <bits/stdc++.h>
#define PB push_back
#define PF push_front
#define MP make_pair
#define FI first
#define SE second
#define SIZE( A ) int( ( A ).size( ) )
#define ALL( A ) ( A ).begin( ), ( A ).end( )
#define ALLR( A ) ( A ).rbegin( ), ( A ).rend( )
using na... | ALGO | 0.999774 | 3.532087 | {
"github_metadata": {
"branch": "master",
"commit_count": 61,
"repo_created_at": "2015-08-13T01:19:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1e022dc7f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.