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 |
|---|---|---|---|---|---|---|---|
61bb1e36-6fb6-450c-abaa-af1d0e0eca3e | TimothyGu/json-parser-cpp | json.h | #ifndef JSON_H
#define JSON_H
#include <cstddef>
#include <memory>
#include <optional>
#include <string>
#include <string_view>
#include <unordered_map>
#include <utility>
#include <variant>
#include <vector>
namespace json {
class Value;
using Object = std::unordered_map<std::string, std::unique_ptr<Value>>;
using... | TOOL | 0.914001 | 7.386506 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2021-09-07T23:07:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "61a23634df3e... |
2ccf3bd9-fbf2-4b86-a8cf-e8868668cd07 | Kitware/VTK | ThirdParty/viskores/vtkviskores/viskores/viskores/filter/density_estimate/ParticleDensityNearestGridPoint.h | //============================================================================
// The contents of this file are covered by the Viskores license. See
// LICENSE.txt for details.
//
// By contributing to this file, all contributors agree to the Developer
// Certificate of Origin Version 1.1 (DCO 1.1) as stated in DCO... | ALGO | 0.900565 | 7.306646 | {
"github_metadata": {
"branch": "master",
"commit_count": 94968,
"repo_created_at": "2010-04-27T15:12:58.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2910,
"forks": 1246,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2... |
6c304524-8511-4ace-b86f-0d7303ee6c28 | aditya9125/SPOJ-Problems-Solution | SP-Foxlings.cpp | typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
#include<bits/stdc++.h>
#include<cmath>
#include<cstdlib> //for qsort
#include<cstdio>
#define rep(x,a,b) for(x=a;x<b;x++)
#define reptill(x,a,b) for(x=a;x<=b;x++)
#define scani(x) scanf("%d",&x)
#define scan2i(x,y) scanf("%d %d",&x,&y)
#d... | ALGO | 0.999931 | 3.371527 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2017-01-07T10:00: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": "e1e6f595d9... |
0ea4fd27-1418-4750-b70f-f16ea391d3f7 | TheRetikGM/SwIC | src/config.h | /**
* @brief Provides ability to load and save configuration options.
* @file config.h
*/
#pragma once
#include <nlohmann/json.hpp>
#include <imguiwrapper.hpp>
#include <optional>
/// Name of the directory in which the configuration is stored.
#define CONFIG_DIR "swic"
#define CONFIG_FILE "config.json"
using json_... | TOOL | 0.958643 | 6.457778 | {
"github_metadata": {
"branch": "master",
"commit_count": 27,
"repo_created_at": "2023-02-03T15:38: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": "2959f91c3... |
8247fd1b-351d-4b93-a29f-5272071f1a2b | trilinos/Trilinos | packages/stokhos/src/cusp/precond/block_smoothed_aggregation.h | // @HEADER
// *****************************************************************************
// Stokhos Package
//
// Copyright 2009 NTESS and the Stokhos contributors.
// SPDX-License-Identifier: BSD-3-Clause
// *****************************************************************************
// @... | ALGO | 0.993935 | 5.734415 | {
"github_metadata": {
"branch": "master",
"commit_count": 104031,
"repo_created_at": "2015-11-16T19:39:16.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1299,
"forks": 593,
"issues": 263,
"pull_requests": 61
},
"file_meta": {
"content_id":... |
4eca8f06-9220-44ea-9540-f921de4ca61d | dario-santos/Haifa-ICPC-Notebook | CP/Codeforces/2020/7.24/a.cpp | #include <bits/stdc++.h>
#define int int64_t
#define vi vector<int>
#define ii pair<int,int>
#define vb vector<bool>
#define vvi vector<vi>
#define vvb vector<vb>
#define vii vector<ii>
#define vvii vector<vii>
#define x first
#define y second
#define pb push_back
#define loop(i,s,e) for(int i=s;i<e;i++)
#define loopr(... | ALGO | 0.999809 | 3.482888 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2021-03-09T11:07: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": "34759c6bd... |
1538be71-2e64-40dd-9997-e2a1068ef4a4 | SiesmicMash/oldFiles | BlackJackSimulation.cpp | #include <iostream>
#include <cstdlib>
#include <ctime>
#include <fstream>
using namespace std;
// Function: rollDice
// Simulates rolling a 14-sided die, returning a card value.
// Numbers 2-10 represent their face values, 11-13 represent Jack, Queen, King (all 10 points), and 14 represents Ace (11 points).
int roll... | ALGO | 0.998892 | 5.786444 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2025-02-11T07:53: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": "b7d1e0dfd2e0... |
597d326c-ba93-439a-8cbc-c66986be1c92 | Creamy1137689/kyopro | solved/abc162/d.cpp | #include <iostream>
#include <iomanip>
#include <utility>
#include <cmath>
#include <random>
#include <vector>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <algorithm>
using namespace std;
#define rep(i,n) for(int i = 0; i<n; ++i)
#define REP(i,n) for(int ... | ALGO | 0.99965 | 3.795432 | {
"github_metadata": {
"branch": "master",
"commit_count": 25,
"repo_created_at": "2020-05-22T15:25: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": "0c9914795... |
7db591fd-d6ea-489f-94aa-9fe2f2bfdeca | RohannMogalii/TCS-NQT-Coding-Sheet | 05]. Strings/19_Remove_Characters_from_first_String_present in_the_Second_String.cpp | /*
Example 1:
Input: String str1 = “abcdef”
String str2 = “cefz”
Output: abd
Explanation: The common characters in both strings are c, e, f.
So after removing these characters from string 1 we get string resulting string as abd.
Example 2:
Input: String str1 = “xyzpw”
String str2 = “lmno”
Output: xyzpw... | ALGO | 0.999997 | 5.396366 | {
"github_metadata": {
"branch": "main",
"commit_count": 102,
"repo_created_at": "2024-02-13T17:19:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "43a44528fb... |
c14014fb-bca2-431a-8d4a-a8f2779340c8 | KhoiBui16/28Tech_Code_Online | C++/Source Code C++ Contest/SapXepTimKiem/B23_SapXepTheoTanSuat.cpp | #include <bits/stdc++.h>
using namespace std;
bool cmp1(pair<int,int> a , pair<int,int>b)
{
if(a.second != b.second) return a.second > b.second;
return a.first < b.first;
}
bool cmp2(pair<int,int>a , pair<int,int>b)
{
return a.second > b.second;
}
int main()
{
int n ; cin >> n;
int a[n]; map<i... | ALGO | 0.999997 | 3.544248 | {
"github_metadata": {
"branch": "main",
"commit_count": 104,
"repo_created_at": "2024-01-13T13:33:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "390cb3c3ad... |
c3b6163a-ac87-46ab-a1f1-2de1b52d9105 | FryeLun/algorithm-journey | DP/Linear DP/Class67/Code04_NodenHeightNotLargerThanm.cpp | // 节点数为n高度不大于m的二叉树个数
// 现在有n个节点,计算出有多少个不同结构的二叉树
// 满足节点个数为n且树的高度不超过m的方案
// 因为答案很大,所以答案需要模上1000000007后输出
// 测试链接 : https://www.nowcoder.com/practice/aaefe5896cce4204b276e213e725f3ea
// 请同学们务必参考如下代码中关于输入、输出的处理
// 这是输入输出处理效率很高的写法
// 提交以下所有代码,把主类名改成Main,可以直接通过
#include <iostream>
#include <vector>
using namespace std;
co... | ALGO | 0.999995 | 4.669309 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2024-07-12T13:43: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": "538cbf392c6... |
63414e9b-a051-4c54-8df8-53450370e5cc | daily1313/algorithm | 백준 알고리즘/9019.cpp | #include <iostream>
#include <queue>
#include <cstring>
#include <string>
bool check[10001];
int start, End;
using namespace std;
void bfs()
{
queue<pair<int, string>> q;
q.push(make_pair(start, ""));
check[start] = true;
while (!q.empty())
{
int x = q.front().first;
string result ... | ALGO | 0.999936 | 4.780676 | {
"github_metadata": {
"branch": "main",
"commit_count": 527,
"repo_created_at": "2022-01-10T06:59:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1b5c5a0ff2... |
51b431dc-0b21-451d-9490-24085606b747 | Hannleeee/myWebServer | exam/neteaseLeiHuo/3.cpp | #include <bits/stdc++.h>
using namespace std;
// int find(char b, string a) {
// int ret = 0;
// int maxCnt = 0;
// for (int i=0; i<a.size(); ) {
// int cnt = 0;
// while (i<a.size() && a[i]==b) {
// ++cnt;
// ++i;
// }
// if (cnt>maxCnt) {
// ... | ALGO | 0.999931 | 3.832428 | {
"github_metadata": {
"branch": "master",
"commit_count": 76,
"repo_created_at": "2021-08-06T05:38: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": "5a9bc6178... |
a404fbdb-b367-4624-a8ce-936e909b429f | yancouto/competitive-programming | ojs/cf/100989N.cpp | #include <bits/stdc++.h>
using namespace std;
#define fst first
#define snd second
typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
#define pb push_back
const ll modn = 1000000007;
inline ll mod(ll x) { return x % modn; }
#ifdef ONLINE_JUDGE
# define lld I64d
# define debug(args...) {}
... | ALGO | 0.999943 | 3.492887 | {
"github_metadata": {
"branch": "master",
"commit_count": 143,
"repo_created_at": "2016-08-26T11:17:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cf7dcc81... |
97493566-5ec9-41b0-8542-e6301860be17 | ayush-gupta2002/Datastructures-and-Algorithms | n-stacks-in-array.cpp | #include <bits/stdc++.h>
class NStack
{
int *arr;
int *top;
int *next;
int freespot;
int n;
int s;
public:
// Initialize your data structure.
NStack(int N, int S)
{
n = N;
s = S;
arr = new int[s];
next = new int[s];
top = new int[n];... | ALGO | 0.999671 | 4.480264 | {
"github_metadata": {
"branch": "main",
"commit_count": 306,
"repo_created_at": "2021-12-23T14:48: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": "468ab27dcc... |
c5fda48b-dfd0-4284-bb16-8ed5dbec20f2 | kimwalisch/primecount | test/gourdon/Sigma.cpp | ///
/// @file Sigma.cpp
/// @brief Test the Sigma function used in Gourdon's algorithm.
///
/// Copyright (C) 2023 <NAME>, <<EMAIL>>
///
/// This file is distributed under the BSD License. See the COPYING
/// file in the top level directory.
///
#include <primecount.hpp>
#include <gourdon.hpp>
#include <stdint.h>
... | TEST | 0.906933 | 6.97974 | {
"github_metadata": {
"branch": "master",
"commit_count": 5531,
"repo_created_at": "2013-06-09T21:03:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 330,
"forks": 41,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "3a53... |
deca4aa7-ea8a-4e70-8fa9-debf5c4234f3 | tongzx/nt5src | Source/XPSP1/NT/net/config/shell/advcfg/order.cpp | //+-------------------------------------------------------------------
//
// File: order.cpp
//
// Synopsis: code for Advanced Options->Provider Order
//
// History: 1-Dec-97 SumitC Created
//
// Copyright 1985-1997 Microsoft Corporation, All Rights Reserved
//
//---------------------------------... | TOOL | 0.987473 | 3.667973 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2020-10-12T04:28:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1012,
"forks": 555,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "e5be6... |
93bc3789-9818-47c6-9a29-02b0c41dd377 | coderuntheworld/sentenceManipulator | LinkedList.cpp | // LinkedList.cpp
// Created by: <NAME>
// Student No.: C3204936
// Program: Bachelor of Software Engineering (Honours)
// Updated on: 18-04-2020
#include <iostream>
#include <string>
#include <sstream>
#include "LinkedList.h"
// Constructors and Destructor
LinkedList::LinkedList() {
head = NULL; // ... | TOOL | 0.997625 | 5.913013 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2020-04-22T05:38: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": "2d4fd2d6f... |
62caba16-84e7-41af-a408-7b1b8cf47e4e | yushyn-andriy/algo | competitions/onlinejudge/ch4/11902/11902.cpp | #include <iostream>
#include <unordered_map>
#include <vector>
class Graph {
private:
std::unordered_map<int, std::unordered_map<int, bool>> _outgoing;
std::unordered_map<int, std::unordered_map<int, bool>> _incoming;
bool directed;
public:
Graph(bool directed = false) : directe... | ALGO | 0.99979 | 5.029264 | {
"github_metadata": {
"branch": "main",
"commit_count": 392,
"repo_created_at": "2022-12-28T23:10: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": "2ea45d515d... |
4e4d929e-8de5-47a7-b77e-1358d966cd00 | CharlesHua/Polynomial-and-expression | main.cpp | /***************************************************
Copyright (C) 2017 <NAME>. All rights reserved.
Last edited date: 2017.4.10
project name: Polyn
file name: main.cpp
多项式计算器菜单界面
int PrintManu()
输出菜单
int string_to_int(string& str)
string类型转int类型
double string_to_double(string& str)
string类型转double类型
Polyn... | TOOL | 0.997117 | 3.311888 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2017-04-11T09:12:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2c1033f393... |
9729ee03-8354-43b9-bc7b-4aa38df46a4b | LachezarTsK/Minimum-Jumps-to-Reach-Home | Solution.cpp |
#include <queue>
#include <array>
#include <vector>
using namespace std;
class Solution {
struct Point {
int index{};
bool priorJumpIsBackward{};
Point(int index, bool priorJumpIsBackward) : index {index}, priorJumpIsBackward {priorJumpIsBackward}{}
};
public:
int minimumJumps(v... | ALGO | 0.999994 | 5.143185 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2022-04-01T05: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": "5d7c3ec12a0e... |
7acead83-f00c-4f1b-a723-435be3630a0b | peridyno/peridyno | src/Core/Matrix/MatrixFunc.inl | #include "Vector.h"
#include "Matrix.h"
#ifdef CUDA_BACKEND
#include "SparseMatrix/svd3_cuda.h"
#endif // CUDA_BACKEND
namespace dyno
{
template<typename Real>
DYN_FUNC void jacobiRotate(SquareMatrix<Real, 3> &A, SquareMatrix<Real, 3> &R, int p, int q)
{
// rotates A through phi in pq-plane to set A(p,q) = 0
... | ALGO | 0.998941 | 5.19796 | {
"github_metadata": {
"branch": "master",
"commit_count": 2064,
"repo_created_at": "2021-02-04T10:08:40.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 266,
"forks": 52,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "23493... |
721e3182-ec25-4a5f-ab6f-2913cd7013bb | cheuk-fung/Programming-Challenges | Codeforces/Div2/R178/C.cc | #include <iostream>
#include <algorithm>
using namespace std;
const int MOD = 1000000007;
long long two[1024];
long long C[2048][2048];
int main()
{
int n, m;
cin >> n >> m;
two[0] = 1;
for (int i = 1; i <= n; i++) two[i] = two[i - 1] * 2 % MOD;
for (int i = 0; i <= n << 1; i++) {
C[i]... | ALGO | 0.999992 | 4.046746 | {
"github_metadata": {
"branch": "master",
"commit_count": 423,
"repo_created_at": "2011-03-05T17:28:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "af8aac55... |
ab759936-fc6c-45c3-8597-43868b6bd990 | Surajvatsya/Leetcode | 1329-sort-the-matrix-diagonally/1329-sort-the-matrix-diagonally.cpp | typedef pair<int, int> pi;
#define debug(x) cout<<#x<<" = "<<x<<endl;
class Solution {
public:
vector<vector<int>>ans;
void solve(int i, int j, vector<vector<int>>& mat){
int n = mat.size();
int m = mat[0].size();
vector<int>v;
while(i<n and j<m){
v.pus... | ALGO | 0.999986 | 5.586943 | {
"github_metadata": {
"branch": "main",
"commit_count": 1294,
"repo_created_at": "2022-02-24T18:31:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "31c935f89... |
7a976136-aa6f-4004-a42d-95c08f666b8e | ishandutta2007/codeforces-s | stevenkplus/normal/359/B.cpp | // =========== Template ========== //
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef long double ld;
#define fi first
#define se second
// =========== Book ============ //
int fastio() {
ios_base::sync_with_stdio(0);
cout << fixed ... | ALGO | 0.999944 | 3.758845 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:07:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2f865b92c442... |
5041f087-6ccd-4e53-bf3e-0153e48b35cb | its-symon/DSA | binary_search/smallest_divisor_given_a_threshold.cpp | // Given an array of integers arr and an integer threshold/limit, we will choose a positive integer divisor, divide all the array by it, and sum the division's result.
// Find the smallest divisor such that the result mentioned above is less than or equal to threshold/limit
#include<bits/stdc++.h>
using namespace std;
... | ALGO | 0.999993 | 5.164084 | {
"github_metadata": {
"branch": "master",
"commit_count": 88,
"repo_created_at": "2023-10-19T06:24: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": "23337000f... |
ecf06a0d-7d39-4805-909c-fc3b05479c92 | bvquoc/CP-Trainning-2021 | 0 - Contest 2020/Ninh Binh PreVNOI 2017/PREVNOIB/Contestants/Ti145/bubbletea.cpp | // MR.J
#include<bits/stdc++.h>
#define maxn 50005
#define maxC 1000000000
#define MOD 1000000007
#define mp make_pair
#define PB push_back
#define F first
#define S second
#define pii pair<int, int>
#define ll long long
#define rep(i, a, b) for(int i=(a) ; i<=(b) ; ++i)
#define repd(i, a, b) for(int i=(a) ; i>=(b) ; -... | ALGO | 0.999698 | 3.829355 | {
"github_metadata": {
"branch": "master",
"commit_count": 611,
"repo_created_at": "2020-06-03T07:47:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7df088c1... |
e5fc3f5c-b9ec-4110-b2f6-57b536a1c098 | theoskille/rogue-like | src/game/combat/TurnManager.cpp | #include "TurnManager.h"
#include "Battlefield.h"
#include "../entities/components/StatsComponent.h"
#include "../entities/components/PositionComponent.h"
#include <iostream>
#include <algorithm>
namespace Game {
TurnManager::TurnManager()
: currentEntity(nullptr),
currentRound(0) {
}
void TurnManager::In... | TOOL | 0.904674 | 7.333281 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2025-06-12T05:18: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": "d82dfa7ea7db... |
7a353b38-f8de-4084-b69a-bdb73807881f | CGAL/cgal | Triangulation_3/examples/Triangulation_3/regular_3.cpp | #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Regular_triangulation_3.h>
#include <cassert>
#include <vector>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::FT Weight;
typedef K::Point_3 ... | ALGO | 0.972204 | 5.553771 | {
"github_metadata": {
"branch": "master",
"commit_count": 113659,
"repo_created_at": "2014-10-01T12:22:47.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5443,
"forks": 1475,
"issues": 511,
"pull_requests": 136
},
"file_meta": {
"content_id... |
44a85bc4-2b4a-45d9-89e2-36f3e9eeaeef | Ohj2MatLap/ohj2Apua | network/main.cpp | #include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
using namespace std;
const std::string HELP_TEXT = "S = store id1 i2\n P = print id\n"
"C = count id\n D = depth id";
class person{
public:
person(st... | TOOL | 0.974475 | 3.962658 | {
"github_metadata": {
"branch": "master",
"commit_count": 29,
"repo_created_at": "2019-02-04T14:06: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": "34cb257a4... |
684e2e3a-3e2b-4587-b2cd-3cbf06ab81a7 | puRe1337/adventcoder | 2016/problem_c/problem_c.cpp | #include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include <algorithm>
void split( const std::string& s, char delim, std::vector< std::string >& elems ) {
std::stringstream ss;
ss.str( s );
std::string item;
while ( std::getline( ss, item, delim ) ) {
elems.push_back( item );
}
}
std:... | ALGO | 0.999615 | 4.304697 | {
"github_metadata": {
"branch": "master",
"commit_count": 113,
"repo_created_at": "2016-12-01T17:37: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": "ca887a38... |
90b2b471-d32b-4bed-93c2-694b29ac05ff | sky2012/letcode | C++/isPalindrom.cc | class Solution {
public:
bool isPalindrome(string s) {
// Start typing your C/C++ solution below
// DO NOT write int main() function
int len = s.length();
if (len <= 1)
{
return true;
}
int i = 0;
int j = len - 1;
... | ALGO | 0.971403 | 3.364821 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2014-03-07T04:40: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": "72f442adcf... |
90dea8fa-1125-4c19-b651-6aa27e331f68 | Miltonbhowmick/Uva-OJ- | UVA 10116 (robot motion).cpp | #include<bits/stdc++.h>
using namespace std;
bool moveCheck(int position,char ch,int colum,int row){
if(ch=='S')
position+=colum;
else if(ch=='N')
position-=colum;
else if(ch=='E'){
position++;
if((position%colum)==1)
return false;
}
else if(ch=='W'){
... | ALGO | 0.999991 | 3.42652 | {
"github_metadata": {
"branch": "master",
"commit_count": 39,
"repo_created_at": "2017-06-21T17:04:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f28af07a9... |
6342e25b-ec14-4500-b872-03b622886d0c | aaditimanjalkar/C-plusplus | Basic.cpp | #Some basic program in C++
#Sum of n natural no.
using namespace std;
int main()
{
int n,sum=0;
cout<<("Value of n: ")<<endl;
cin>>n;
for(int i=1;i<=n;i++)
{
sum=sum+i;
}
cout<<("sum of n natural no.:")<<sum;
}
#Average of three numbers
using namespace std;
int main ()
{
int a,b,c,avg;
cout<<"Enter ... | ALGO | 0.986685 | 3.426384 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-03-13T02:59: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": "9362a2137930... |
725c7b3d-434f-48b1-823e-d2ae76a0b8bd | SR-Sunny-Raj/Hacktoberfest2021-DSA | 01. Mathematics/fibonacci matrix.cpp | #include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define int long long
void mul(int a[2][2] , int b[2][2] )
{
int i, j, k;
int res[2][2];
for (i = 0; i < 2; i++)
{
for (j = 0; j < 2; j++)
{
res[i][j] = 0;
... | ALGO | 0.999977 | 3.492255 | {
"github_metadata": {
"branch": "master",
"commit_count": 2783,
"repo_created_at": "2020-05-08T05:36:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 236,
"forks": 982,
"issues": 3,
"pull_requests": 161
},
"file_meta": {
"content_id": "e... |
ddaa5e5c-eff1-4e4a-92d1-98317cdc7b80 | OwOrider/2023aaib3 | week07/week07-2b.cpp | class Solution {
public:
void myDrawBoard(int board[3][3])
{
for(int i=0;i<3;i++)//strp01:印出模擬的棋盤的內容
{
for(int j=0;j<3;j++)
{
cout << board[i][j]<<" ";
}
cout <<"\n";
}
cout << "\n";
}
bool testWin(int board[... | ALGO | 0.999596 | 4.903821 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2024-09-11T01:48: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": "153f4dfcb87... |
f861d004-2962-4df4-9cfc-74a262811d37 | rinrin529/Algorithm | 백준_우주신.cpp | #include <iostream>
#include <vector>
#include <queue>
#include <cmath>
#include <cstdio>
using namespace std;
int n = 0, m = 0;
vector<pair<int, int>> xy;
priority_queue <pair<double,pair<int,int>>,vector<pair<double, pair<int, int>>>, greater<pair<double, pair<int, int>>>> lines;
int parent[1002] = { 0, };
int get_p... | ALGO | 0.999983 | 3.723385 | {
"github_metadata": {
"branch": "master",
"commit_count": 201,
"repo_created_at": "2020-05-12T02:36: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": "89a477ad... |
5e796838-e796-4c55-9dd3-ba3695555c34 | sanus912/leetcode-solutions | Num_of_Islands.cpp | #include <iostream>
#include <vector>
using namespace std;
class Solution {
public:
int numIslands(vector<vector<char>> &grid) {
if (grid.empty()||grid[0].empty())
return 0;
int n = grid.size();
int m = grid[0].size();
vector<vector<bool>> visited(n,vector<bool>(m,false)... | ALGO | 0.999899 | 5.96661 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2015-06-19T19:56: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": "99e6d7c396... |
03a822bf-92b9-429b-bb6a-833845546fe7 | FedorGorshkov/CppUrFU | main4.cpp | //#include <iostream>
//#include <cmath>
//using namespace std;
//
//int factorial(int num) {
// int res = 1;
// for (int i = 2; i <= num; i++) res *= i;
// return res;
//}
//
//int my_pow (int num, int step) {
// int res = 1;
// for (int i = 0; i < step; i++) res *= num;
// return res;
//}
//
//
//do... | ALGO | 0.999667 | 4.302813 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2022-09-28T07:09: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": "b4297b1b7a... |
a016d330-c7f6-4341-8f26-e6ebe6cf2137 | NeoGangawan-studentacc/InventoryCheck-student | Store sort by price(heaps).cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
class Item
{
public:
string name;
double price;
Item(string name, double price)
{
this->name = name;
this->price = price;
}
};
class Store
{
public:
vector<Item> items;
void addItem(st... | ALGO | 0.999636 | 5.236488 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-12-03T16:04: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": "1080714c82eb... |
150a4dd0-65e2-4f12-8786-d9b0d33e93e9 | SimFlowCFD/RapidCFD-dev | src/thermophysicalModels/specie/reaction/reactionRate/FallOffReactionRate/FallOffReactionRateI.H | /*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
--------... | TOOL | 0.913321 | 5.857503 | {
"github_metadata": {
"branch": "master",
"commit_count": 144,
"repo_created_at": "2015-02-12T11:35:40.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 369,
"forks": 103,
"issues": 69,
"pull_requests": 1
},
"file_meta": {
"content_id": "ae3e... |
629dd401-82ab-4eb7-9206-cc71fb22205c | plops/cl-cpp-generator2 | example/165_fast/source02/src/main.cpp | #include <benchmark/benchmark.h>
#include <random>
#include <vector>
std::vector<uint64_t> GenerateShuffledIndices(uint64_t n) {
std::mt19937 gen(std::random_device{}());
std::vector<uint64_t> v(n);
std::iota(v.begin(), v.end(), 0);
std::shuffle(v.begin(), v.end(), gen);
return v;
}
uint64_t Sum(std::vector... | TEST | 0.97228 | 6.905222 | {
"github_metadata": {
"branch": "master",
"commit_count": 5411,
"repo_created_at": "2019-08-10T18:04:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 36,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "43fb43... |
47e6b9f6-3252-4150-87ec-7df6100efb0b | simonnguyen175/cp-repo | tuhoc/baitapcodeforce/sumdiv.cpp | #include<bits/stdc++.h>
#define simon "sumdiv"
#define FASTio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long
using namespace std;
ll a, b;
ll ans = 0;
ll dd[100005];
ll sum(ll l, ll r){
return (l+r)*(r-l+1)/2;
}
int main(){
FASTio
if ( fopen(simon".inp", "r") ){
freopen... | ALGO | 0.999788 | 4.135632 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2024-11-16T14:21: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": "175281b9ab... |
275e5869-91a8-4b5f-ade6-85facc4db09f | minus3theta/contest | poj/2155.cpp | #include <cstdio>
#include <climits>
#include <cassert>
#include <cmath>
#include <iostream>
#include <string>
#include <algorithm>
#include <numeric>
#include <functional>
#include <list>
#include <map>
#include <queue>
#include <stack>
#include <set>
#include <vector>
#define REP(i,s,n) for(int i=(int)(s);i<(int)(n)... | ALGO | 0.999717 | 4.091103 | {
"github_metadata": {
"branch": "master",
"commit_count": 601,
"repo_created_at": "2016-10-02T12:21:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 407
},
"file_meta": {
"content_id": "fac281... |
c78e7194-9ce7-4850-9a55-8d519226d685 | opencv/opencv | modules/objdetect/src/cascadedetect.cpp | /*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, instal... | ALGO | 0.999108 | 3.933537 | {
"github_metadata": {
"branch": "4.x",
"commit_count": 35401,
"repo_created_at": "2012-07-19T09:40:17.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 83079,
"forks": 56217,
"issues": 2595,
"pull_requests": 138
},
"file_meta": {
"content_id"... |
3c64f8cb-4836-4275-8284-916fcf6b02a2 | appsaprinsky/optim-col-gen | old/cpp/main_bigger.cpp | // g++ -std=c++11 main_bigger.cpp -o main_bigger
// ./main_bigger
#include <iostream>
#include <vector>
#include <algorithm>
#include <limits>
#include <ctime>
#include <cstdlib>
#include <iomanip>
using namespace std;
// Solve Restricted Master Problem (RMP)
vector<double> solveRMP(const vector<double>& costs, co... | ALGO | 0.999457 | 5.954455 | {
"github_metadata": {
"branch": "main",
"commit_count": 22,
"repo_created_at": "2025-02-10T01:27: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": "c279d23f218... |
2a70facd-c1f8-4fd3-8c8a-c3060c5a12c8 | Hooollin/luogu | P2036.cpp | #include <bits/stdc++.h>
using namespace std;
int dfs(int taste[][2], int i, int k, int cs, int cw, bool vis[], int N){
if(i == k){
return abs(cs - cw);
}
int ans = 0x3f3f3f3f;
for(int j = 0; j < N; j++){
if(vis[j]) continue;
vis[j] = true;
ans = min(dfs(taste, i + 1, k, cs == 0 ? taste[j][0] : cs * taste[j... | ALGO | 0.999965 | 3.917961 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2020-08-07T12:45: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": "260b96119... |
abf78463-7c8a-4cb9-a40e-13bb1b7ba579 | rafaelbarretorb/trajectory_tracking_control | src/trajectory_generator.cpp | /*
Copyright 2021 - <NAME>
*/
#include "trajectory_tracking_control/trajectory_generator.hpp"
namespace trajectory_tracking_control {
TrajectoryGenerator::TrajectoryGenerator(ros::NodeHandle *nodehandle) : nh_(*nodehandle) {
// Reference States Service
ref_states_srv_ = nh_.serviceClient<trajectory_tracking... | TOOL | 0.969984 | 6.435195 | {
"github_metadata": {
"branch": "kinetic-devel",
"commit_count": 90,
"repo_created_at": "2020-04-26T20:31:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 39,
"forks": 5,
"issues": 9,
"pull_requests": 1
},
"file_meta": {
"content_id": "8... |
6571d991-0393-467e-928b-ec8362f7f3ec | chemiczny/automateusz_gto_d2 | include/gto_d2_kit/d2_ne_ps_BC.hpp | #ifndef D2_NE_PS_BC_HPP
#define D2_NE_PS_BC_HPP
#include <cstdlib>
void vne_second_derivative_10_23( double ae, double be,
double xA, double yA, double zA,
double xB, double yB, double zB,
double xC, double yC, double zC,
const double* bs,
double* const d2nexx,
double* const d2nexy,
doub... | ALGO | 0.948289 | 3.933173 | {
"github_metadata": {
"branch": "master",
"commit_count": 27,
"repo_created_at": "2018-06-26T09:38: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": "68e35ec63... |
8536829d-1cc2-43b0-8dbd-5f61028ebfd1 | Shikhar-S/Analysis-of-Competitive-Codebase | Data/Contest1244/Standings2/28894977_62477210.cpp | #include <stdio.h>
#include <bits/stdc++.h>
using namespace std;
#include <x86intrin.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
template <typename T> using ordered_set = tree<T, null_type, std::less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#define all(x) x.begin(), x.end()
#... | ALGO | 0.999992 | 3.260746 | {
"github_metadata": {
"branch": "master",
"commit_count": 74,
"repo_created_at": "2019-11-22T14: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": "03fcb4cdc... |
7d89ce21-61c7-4623-a63e-49431fc35571 | hsaputra/cuda_training | latticeBoltzmann/cpu_lbm.cpp | /*
Simulation of flow inside a 2D square cavity
using the lattice Boltzmann method (LBM)
Written by: <NAME> (<EMAIL>)
Last modified on: Saturday, March 23 @ 6:41 pm
Build instructions: g++ cpu_lbm.cpp -o lbmCPU.x
Run instructions: ./lbmCPU.x
*/
#include<iostream>
// problem parameters
const int N ... | ALGO | 0.999984 | 5.228162 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2018-07-27T22:34: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": "314a85023e... |
a676e967-ae31-4abc-81ef-4c0e84522b4b | udcode/studies | firstYear/firstSemester-introducing/targil8/8_1.cpp | //yudi noiman
//id: 301759692
//this code manage a demo bus company
//feature: it is possible to add line with number of stops and the duration of the ride
//and it is possible to delete line, and search for line, and print the avg of the travel and stops
//and the shortest line
#include <iostream>
#include <cmath>
usi... | ALGO | 0.963103 | 3.605339 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2016-11-07T19:58: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": "6e80d19758... |
b817ab77-be73-459d-85b3-10dc526fdd1c | thoughtworks-recruit-camp/performance-test-session | cpp/sci2b/main.cpp | #include <iostream>
#include <ctime>
#include <cmath>
double calcPi(int iterations);
int main() {
clock_t tBegin, tEnd;
double tPassed;
int seq;
double pi;
for (seq = 1; seq <= 5; seq++) {
int ITERATIONS = (double)100000000 +(double)rand()/15000;
tBegin = clock();
pi = calc... | ALGO | 0.999701 | 5.912793 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2019-12-28T01:37:10.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "89924dacba6... |
2c507373-1482-4fdc-a21b-7a26f8cbbccb | shalupatidar22/DSA_2024 | Day_86.cpp | #include<bits/stdc++.h>
using namespace std;
void solve(vector<vector<char>>& grid, int i, int j){
//base case
int n,m;
if(i<0 || j<0 || i>=n || j>=m || grid[i][j]=='0'){
return;
}
grid[i][j]='0';
solve(grid,i-1,j-1);//left upper diagonal
solve(gri... | ALGO | 0.999983 | 6.132859 | {
"github_metadata": {
"branch": "main",
"commit_count": 98,
"repo_created_at": "2024-09-02T11:44: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": "773782a40e2... |
cf89e568-3ce9-454b-9a49-d9bb28ca0296 | OptimalAlgorithm/algo-study | 2020-02-06 1주차/종범/구슬 찾기.cpp | // https://www.acmicpc.net/problem/2617
#include<iostream>
#include<vector>
#include<algorithm>
#include<cstring>
using namespace std;
const int MAX = 100;
int N, M, ans;
bool check[MAX];
bool result[MAX]; // 중간에서 제외되는 구슬은 true
vector<int> graph1[MAX]; // 보다 큰 구슬
vector<int> graph2[MAX]; // 보다 작은 구슬
int dfs1(i... | ALGO | 0.999982 | 3.53271 | {
"github_metadata": {
"branch": "master",
"commit_count": 176,
"repo_created_at": "2020-01-13T10:36:23.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "197c059ff... |
d0f488ff-6e50-4bb2-aa68-6388df38168a | cuom1999/AlgoLibrary | Optimization/SimulatedAnnealing.h | // Example: solving TSP, mat[i][j] = dist i -> j
// -----------------------------------------------------------------------
// Initialize SA
mt19937_64 gen(chrono::steady_clock::now().time_since_epoch().count());
long long rand(long long l, long long r) {
uniform_int_distribution<long long> rnd(l,r);
r... | ALGO | 0.999972 | 4.791867 | {
"github_metadata": {
"branch": "main",
"commit_count": 45,
"repo_created_at": "2021-06-20T07:32:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4bc7c36b48b... |
4cecd894-7e7c-4cf3-8a16-90d9f008c555 | Shikhar-S/Analysis-of-Competitive-Codebase | Data/Contest1248/Standings1/29138182_62979961.cpp | #include <bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
// #include <boost/multiprecision/cpp_int.hpp>
#define gc getchar//_unlocked
#define pc putchar//_unlocked
#define ll long long
#define ld long double
#define pb push_back
#define mp make_pair
#define pp pair<int,int>... | ALGO | 0.999971 | 4.498983 | {
"github_metadata": {
"branch": "master",
"commit_count": 74,
"repo_created_at": "2019-11-22T14: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": "e34b9d096... |
669254bc-6e61-4164-93fe-d48e0ee74597 | rltonoli/MO815 | Tarefa7.cpp | #include "mainwindow.h"
#include <QApplication>
#include "mc920.h"
#include <string>
#include <time.h>
MedicalImage *MedImage;
GrayImage* GetMIP(MedicalImage *MedImage, int AnguloX, int AnguloY, int AnguloZ,Vector VetorNormal, int modo);
int sign( int x );
MedicalImage* Normaliza(MedicalImage *MedImage);
struct voxel... | ALGO | 0.946934 | 4.136684 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2016-12-09T16:13:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5873c79142... |
9b1006e2-20f3-468e-86b0-484fa4b53c46 | azaky/cp | other/tokilearning/OSN2013/cuti.cpp | #include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <algorithm>
#include <utility>
#include <numeric>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cass... | ALGO | 0.99991 | 3.511952 | {
"github_metadata": {
"branch": "main",
"commit_count": 41,
"repo_created_at": "2020-05-23T01:00:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7472bd857f0... |
40c309b2-ddec-4eb6-a9a9-df2d04ad744e | extrastufff054/NFSU | Assingments./ljfwithmoreVariables.cpp | //Implementing longest job first in cpp with AT, BT, CT,RT
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cout<<"Enter the no of processes: ";
cin>>n;
int bt[n],wt[n],tat[n],p[n],i,j,at[n],ct[n],rt[n];
float awt=0,atat=0,art=0;
for(i=0;i<n;i++)
{
cout<<"Enter the ar... | ALGO | 0.999924 | 4.248702 | {
"github_metadata": {
"branch": "main",
"commit_count": 94,
"repo_created_at": "2022-08-14T07:59: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": "3788849a0d8... |
e08f22dd-1e11-4d08-9ee7-febbc0e4614f | thegamer1907/Code_Analysis | Graphs/2329.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vec vector <int>
#define vecl vector <long long>
#define rep(i,a,b) for (int i=a;i<b;i++)
#define pb push_back
#define pii pair <int,int>
#define pll pair <long long,long long>
#define mp make_pair
#define ff first
#define ss second... | ALGO | 0.999717 | 3.46044 | {
"github_metadata": {
"branch": "master",
"commit_count": 73,
"repo_created_at": "2019-05-24T10:35:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f310f7999... |
11fbd29e-bc25-4024-b2d8-0c2a9f0dbd90 | joaoandreotti/competitive_programming | sieve_eratosthenes/sieve.cpp | #include <bits/stdc++.h>
const int MAXN = 1e7 + 1;
std::vector <long long> isp (MAXN, true), p, spf (MAXN);
void sieve () {
isp [0] = false;
isp [1] = false;
for (int i = 2; i <= MAXN; i++) {
if (isp [i]) {
p.push_back (i);
spf [i] = i;
}
for (long long j = 0; (j < p.size ()) && (i * ... | ALGO | 0.999672 | 3.897597 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2019-11-22T15:52: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": "3c042bd0af... |
509a5ccc-8388-4411-bb89-812754087385 | ptt743/leetcodeDaily | problems/4_4_taipt3.cpp | #include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<queue>
#include<stack>
#include<set>
#include<unordered_map>
#include<cmath>
#include<functional>
#define ll long long
using namespace std;
//*****taipt*****//
/*
*/
void solve(){
vector<vector<int>> matrix={{-5}};
int k= 1;
int n = m... | ALGO | 0.999785 | 3.917778 | {
"github_metadata": {
"branch": "main",
"commit_count": 54,
"repo_created_at": "2024-11-15T05:25: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": "ace321b5b54... |
c4b5dc47-f534-4a75-8d42-4b49d200f3ef | siddharthlal25/Object-Oriented-Systems-Design-Lab-Assignments | day8/al-kindi/al-kindi.cpp | #include <bits/stdc++.h>
using namespace std;
bool sb(const pair< char,int> &a, const pair< char,int> &b)
{
return a.second > b.second;
}
string remove_space(string s)
{
string ans;
for(int i = 0;i<s.length();i++)
{
if(s[i] == ' ' || s[i] == '!' || s[i] == ',' || s[i] == '.') continue;
... | ALGO | 0.999809 | 3.783574 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2019-08-08T06:15: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": "5118a3e9d... |
b7370195-5086-487e-835c-82dbc55cce94 | kunyavskiy/competitive-programming-archive | ProblemArchives/acm.sgu.ru/olimp/201.cpp | #include <iostream>
#include <fstream>
#include <vector>
#include <set>
#include <map>
#include <string>
#include <cmath>
#include <cassert>
#include <ctime>
#include <algorithm>
#include <queue>
#include <memory.h>
#include <stack>
#define mp make_pair
#define pb push_back
#define setval(a,v) mems... | ALGO | 0.999995 | 3.157461 | {
"github_metadata": {
"branch": "main",
"commit_count": 53,
"repo_created_at": "2022-10-08T20:56:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "21d7f118d96... |
3520b20e-026d-46bd-8709-d195e892239c | ishandutta2007/codeforces-r | ronnie007/normal/1388/C.cpp | #include<bits/stdc++.h>
using namespace std ;
#define MAXN 100007
int n , m ;
int cnt[ MAXN ] ;
long long h[ MAXN ] ;
vector < int > v[ MAXN ] ;
bool bad = false ;
long long subtree[ MAXN ] ;
long long happy[ MAXN ] ;
long long sad[ MAXN ] ;
void dfs ( int x , int prv ) {
int sz = v[ x ].size ( ) ;
subtre... | ALGO | 0.999978 | 3.833314 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:58:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bc6ec1d53a9d... |
a8e29629-d157-4e5a-b267-cf78f8bab2f6 | scilab/scilab | scilab/modules/interpolation/sci_gateway/cpp/sci_splin2d.cpp | /*
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
* Copyright (C) 2011 - DIGITEO - <NAME>
*
* Copyright (C) 2012 - 2016 - Scilab Enterprises
*
* This file is hereby licensed under the terms of the GNU GPL v2.0,
* pursuant to article 5.3.4 of the CeCILL v.2.1.
* This file was originally licensed ... | ALGO | 0.940182 | 5.479762 | {
"github_metadata": {
"branch": "master",
"commit_count": 55253,
"repo_created_at": "2017-06-12T08:25:19.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 373,
"forks": 87,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3cb4... |
0bfc3402-5e03-4507-9aa7-e2434546a806 | iocodz/coj-solutions | codes/raulcr-p1071-Accepted-s556558.cpp | #include <iostream>
#include <cassert>
#include <string>
#include <algorithm>
using namespace std;
typedef long long LL;
string eliminZerIzq(string a){
string sol = "";
int x = 0;
for (int i = 0 ; i < a.length() ; i++){
if (a[i] == '0')
x++;
else
break;
}
... | ALGO | 0.999932 | 3.823955 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2019-12-16T05:46:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "14ecc3d6d3... |
2b09f846-cbcc-4b3c-9d84-52eb2f99697f | Leo4Truth/LeetCode | problems/1329_SortTheMatrixDiagonally.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
class Solution {
public:
vector<vector<int>> diagonalSort_1(vector<vector<int>>& mat) {
int m = mat.size();
if (m == 0) return {};
int n = mat[0].size();
vector<vector<int>> res(mat);
vector<v... | ALGO | 0.99997 | 5.685574 | {
"github_metadata": {
"branch": "main",
"commit_count": 265,
"repo_created_at": "2020-12-30T14:14: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": "2276a6889d... |
dd2316f6-b7c8-4abe-8e85-5c68136fed2a | yingluosanqian/chh-graduation | Source/DataSet/codeforces/1733/1733-E.cpp | #define REP(x,n) for(int x=0;x<n;++x)
#define REP2(x,a,b) for(int x=a;x<b;++x)
#define IT(x) (x).begin(), (x).end()
#include <cstdio>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
#include <cstring>
#include <string>
#include <tuple>
#include <optional>
#include <utility>
#include <c... | ALGO | 0.999606 | 3.421996 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2024-05-25T12:59: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": "f3183e86a5... |
57f8f35b-0e78-4b26-98ee-6d7824cc6966 | HongYoungGee/Algorithm | BOJ/05373/5373.cpp14.cpp | #include<stdio.h>
using namespace std;
char cube[9][12];
void fill_cube()
{
for (int x = 0; x < 3; x++) for (int y = 3; y < 6; y++) cube[x][y] = 'w';
for (int x = 3; x < 6; x++) for (int y = 0; y < 3; y++) cube[x][y] = 'g';
for (int x = 3; x < 6; x++) for (int y = 3; y < 6; y++) cube[x][y] = 'r';
for (int x = 3;... | ALGO | 0.999827 | 4.04858 | {
"github_metadata": {
"branch": "master",
"commit_count": 44,
"repo_created_at": "2015-11-17T09:32: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": "e259ee356... |
bc444bb8-7d4a-4cf3-83c7-f32327d39e75 | NUbots/DirectorSoccer | shared/utility/math/stats/resample/multinomial.hpp | /*
* This file is part of the NUbots Codebase.
*
* The NUbots Codebase is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The ... | ALGO | 0.993959 | 7.540822 | {
"github_metadata": {
"branch": "main",
"commit_count": 9444,
"repo_created_at": "2023-04-14T05:00:39.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 5
},
"file_meta": {
"content_id": "c85e5f180c... |
d28092ef-fe87-4a56-9ba6-0abefa8b16a6 | viennamesh/viennamesh-dev | plugins/vgmodeler/external/csg/revolution.cpp | #include <mystdlib.h>
#include <linalg.hpp>
#include <csg.hpp>
namespace vgmnetgen
{
void RevolutionFace :: Init(void)
{
const LineSeg<2> * line = dynamic_cast<const LineSeg<2>*>(spline);
const SplineSeg3<2> * spline3 = dynamic_cast<const SplineSeg3<2>*>(spline);
if(line)
{
checklines_start.Ap... | ALGO | 0.991487 | 4.589238 | {
"github_metadata": {
"branch": "master",
"commit_count": 1333,
"repo_created_at": "2013-07-25T10:54:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 12,
"issues": 9,
"pull_requests": 0
},
"file_meta": {
"content_id": "3fd2dd... |
cb29e83a-9d7f-44be-a6a0-17049a58f427 | c21/Leetcode | medium/25*.46 Permutations.cpp | /*
Given a collection of numbers, return all possible permutations.
For example,
[1,2,3] have the following permutations:
[1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], and [3,2,1].
*/
class Solution
{
public:
map<vector<int>, int> my_map;
vector<vector<int> > result;
vector<int> g_num;
vector<vector<in... | ALGO | 0.999989 | 5.65952 | {
"github_metadata": {
"branch": "master",
"commit_count": 309,
"repo_created_at": "2015-09-28T15:32: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": "f0a5cd94... |
3efb46aa-f191-452b-8ae0-0e8753fb45f4 | shrutikaj1098/LeetCode-GFG---Solutions | Print first n Fibonacci Numbers - GFG/print-first-n-fibonacci-numbers.cpp | //{ Driver Code Starts
//Initial function template for C++
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
//User function template for C++
class Solution
{
public:
//Function to return list containing first n fibonacci numbers.
int rec(int n, vector<long long>&vec,vector<int>&dp)
... | ALGO | 0.999877 | 6.044359 | {
"github_metadata": {
"branch": "main",
"commit_count": 1033,
"repo_created_at": "2022-05-25T17:42:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "390d17e5e... |
d361d9a5-285f-4f7b-9290-51efca018771 | prafullpandey614/DataStructure | Tree/Traversals/Right_View_Of_Binary_tree.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.999941 | 5.87502 | {
"github_metadata": {
"branch": "main",
"commit_count": 438,
"repo_created_at": "2022-07-30T20:34:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7caf26f13a... |
78bc2c8f-ceb8-46a9-a8fe-89477c788e66 | mfrosenberg68/WorkRegOld | LIB/src/template/tnumarray.h | /*TEX
% Dortmund C++ Class and Template Library
% Copyright (C) 1994 <NAME> and others
% The code in this file was derived from routines published in
% Numerical Recipes, it its the responsibility of the user to insure that
% he is authorized to use them. Please read the appropriate section entitled
% LICENSE ... | ALGO | 0.977254 | 5.519238 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2015-08-30T20:09: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": "1b19f11b95... |
71e9a0ed-2f80-4954-903c-4f75563ee917 | thilio/Competitive-programming-team | Notebook/Problems/RangeSum_sqrt.cpp | /*
Title: Square root decomposition
Description: Use square root decomposition to solve range sum with point update
Complexity: O(n + q sqrt(n))
Details: This a simple example of the technique. You can think in
sqrt decomposition when you can handle "small" queries
and "large" queries in differe... | ALGO | 0.999371 | 5.069436 | {
"github_metadata": {
"branch": "main",
"commit_count": 391,
"repo_created_at": "2021-01-09T16:55:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6b29cbdcf4... |
46ed2466-b3f7-4972-85ff-ac89b8426977 | deep-in-apeirophobia/CompetetiveProgramingCodes | CF/CONTEST_477D1/B.cpp | #include <bits/stdc++.h>
using namespace std;
const int MAXN = 3e5+6.66;
int arr[MAXN];
pair<int,int> srt [ MAXN ] ;
int cnt1[MAXN];
int cnt2[MAXN];
int main ( ) {
int n,x1,x2;cin >> n >> x1 >> x2;
for( int i = 0 ;i < n;i ++ ) cin >> arr[i];
for( int i = 0 ; i < n;i ++ ) srt[i].first = arr[i];
for ( int i = 0... | ALGO | 0.999995 | 3.328024 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2019-12-17T13:48:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "061ef33dd4... |
005840e9-c94a-4f60-9047-b9763598aeb6 | gautamkushwaha/DCCN-Lab | Link_state_routing/link.cpp | #include <iostream>
#include <vector>
#include <map>
#include <queue>
#include <algorithm>
using namespace std;
const int INFINITY = 9999; // Represents an infinite distance
class Router {
public:
int routerID; // Router ID
map<int, int> LSD; // Link state database: [destinati... | ALGO | 0.99971 | 6.010654 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2023-11-08T05:03: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": "41ec9d9c3f68... |
10a4c57a-711b-4518-aa16-a0d96b776157 | jitendrajat10099/Competitive-Programming--Solution | Codechef/REMMAX.cpp | #include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define pie 3.14
typedef long long int ll;
/*
.d8b. d8888b. db db .d8b. d8b db
d8' `8b 88 `8D `8b d8' d8' `8b 888o 88
88ooo88 88oobY' `8bd8' 88ooo88 88V8o 88
88~~~88 88`8b 88 88~~~88 88 V8o88
88 88 88 `88. 88 88 88 ... | ALGO | 0.999977 | 4.56054 | {
"github_metadata": {
"branch": "master",
"commit_count": 187,
"repo_created_at": "2019-10-01T18:10:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 28,
"forks": 54,
"issues": 8,
"pull_requests": 15
},
"file_meta": {
"content_id": "0eb63... |
9435be78-ad81-4f7d-8288-7f256d08b90b | simunova/mtl4 | libs/numeric/mtl/examples/matrix_free_1.cpp | // Filename: matrix_free_1.cpp (part of MTL4)
#include <iostream>
#include <cassert>
#include <boost/numeric/mtl/mtl.hpp>
struct poisson2D_dirichlet
{
poisson2D_dirichlet(int m, int n) : m(m), n(n) {}
template <typename Vector>
Vector operator*(const Vector& v) const
{
assert(int(size(v)) == m * n);... | ALGO | 0.997804 | 4.930932 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2019-03-26T14:53:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 31,
"forks": 18,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "0cb2ca8... |
0a72c459-5cc2-4de9-9616-eb77e59caf6c | nowheretobefound008/MAJORS_ASPI | string intermediate.cpp | #include <iostream>
#include <string.h>
#include <fstream>
#include <cstdlib>
using namespace std;
#define MAX_USERS 100
#define MAX_LENGTH 50
struct User {
char username[MAX_LENGTH];
char password[MAX_LENGTH];
bool isActive;
};
User users[MAX_USERS];
int userCount = 0;
void loadUsers();
void saveUser... | TOOL | 0.919344 | 3.939904 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2025-03-14T03:43: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": "670fa8627fa7... |
3379902e-2176-472a-9c3b-5340a4552c03 | wintersnow212/Coding | cuckooHashBetter.cpp | #include <iostream>
#include <sstream>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <string>
//#include <ctime>
//using namespace std;
#include <iostream>
#include <chrono>
#include <cmath>
#include <random>
#include <functional>
using namespace std;
// UniformRandom class
//
// CONSTRUCTION: wit... | ALGO | 0.993478 | 4.564598 | {
"github_metadata": {
"branch": "master",
"commit_count": 412,
"repo_created_at": "2018-08-23T07:29: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": "39abd0dd... |
ea8efaa0-61d7-4973-83d9-1ed08fe66d71 | sinhadiptiprakash/dsa | Array/find_subarray_with_given_sum.cpp | #include <bits/stdc++.h>
using namespace std;
//these versions of solution handles only the case when all the array elements are positive
/*
Algorithm:
1.Traverse the array from start to end.
2.From every index start another loop from i to the end of array to get all subarray starting from i, keep a varibale ... | ALGO | 0.999947 | 5.620994 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-01-08T07:31:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f12da1b57b79... |
1df5cfce-6201-4bc0-90c9-7c4f1b735ad3 | Lombren/DataContainers | List/main.cpp | #include<iostream>
using namespace std;
#define tab "\t"
//#define BASE_CHECK
#define CONSTRUCTORS_CHECK
class List
{
class Element
{
int Data;
Element* pNext;
Element* pPrev;
public:
Element(int Data, Element* pNext = nullptr, Element* pPrev = nullptr) :Data(Data),pNext(pNext),pPrev(pPrev)
{
cout << "... | TOOL | 0.953442 | 4.204397 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2019-08-15T18:00:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1bfa0e29ad... |
3f0eb948-7d18-43bb-98c2-948a7186c444 | TheSeeven/personal-projects | Cloud computing si IoT/Tema6_CCIOT/Tema6_CCIOT/Tema6_CCIOT.cpp | // Tema6_CCIOT.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
template<typename T>
int squareSum(T number){
return number * number;
}
template<typename T, typename... Args>
int squareSum(T number, Args... args) {
return squareSum(number) + squar... | ALGO | 0.996309 | 5.577037 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2020-10-06T14:04: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": "b0be2413de9... |
0c5d5d7c-51b7-4025-a775-2e335414f4fd | giech/pdtl | code/src/pdtlmaster.cpp | /*
* PDTL: Parallel and Distributed Triangle Listing for Massive Graphs
* <NAME>, <NAME>, <NAME>
* 44th International Conference on Parallel Processing (ICPP), Beijing 2015
*
* DOI: 10.1109/ICPP.2015.46
*
* https://github.com/giech/pdtl
*/
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <... | ALGO | 0.98631 | 4.050932 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2015-10-03T20:11:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f67ee90a2e... |
718d4dc8-a5e7-4d07-8f8e-fe4d5cf1a14a | abbinayaa92/TestRep | fingerwalk_viewer -Test/fingerwalk_viewer/Hop.cpp | #include "Hop.h"
#include <iostream>
using namespace std;
#define clamp(val, a, b) max(min(val, b), a)
Hop::Hop() :
_t(0),
_alpha(0),
_whichFootBehind(0),
_phase(kHopPreAligning),
_alignDelta(0),
_alignDuration(0.5)
{
_footActive[0] = false;
_footActive[1] = false;
}
Hop::~Hop() {
}
void Hop::reset() {
FootAnim... | ALGO | 0.946495 | 4.506558 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2013-03-29T07:32:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "97e8e0c6e9... |
6cd54197-d6ae-43d7-ad47-e49484fb6495 | InnovatorMind/ZeroToHeroDSAPractice | 1. Core (or Fundamentals)/05_Loops/Practice_Problems/problem28.cpp | // Write a program to find
// next Prime number of a given number
#include <iostream>
using namespace std;
int main()
{
int num;
cout << "Enter a number: ";
cin >> num;
int nextPrime = num + 1; // Start checking from the next number
while (true)
{
int isPrime = 1; // Assume the numbe... | ALGO | 0.999894 | 4.384092 | {
"github_metadata": {
"branch": "main",
"commit_count": 57,
"repo_created_at": "2025-01-06T18:52:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "698a8fd4aaf... |
8c78dd86-4558-450f-8ba2-3f90a7e8efb7 | ammrit2312/Hacktober-amrit | Dynamic-programming/Unique_Paths_2.cpp | /*
We have to find the number of paths to reach from (0 , 0) --> (N , M)
considering obstacles in the grid.
We can use the same approach as in Unique Paths 1. Just a small modification
when we encounter an obstacle.
*/
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
typedef vector<int>... | ALGO | 0.999982 | 5.01691 | {
"github_metadata": {
"branch": "main",
"commit_count": 129,
"repo_created_at": "2022-09-30T18:15:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 14,
"issues": 0,
"pull_requests": 5
},
"file_meta": {
"content_id": "02a87c515... |
2bea393c-35a7-42b7-a5d6-3a9c5edb0ab2 | ta1qo/ADS2024 | lab6/QuickSort2.cpp | #include <iostream>
using namespace std;
int partition(int arr[], int left, int right, int pivot) {
while (left <= right) {
while (arr[left] < pivot) left++;
while (arr[right] > pivot) right--;
if (left <= right) {
swap(arr[left], arr[right]);
left++;
rig... | ALGO | 0.999989 | 5.831133 | {
"github_metadata": {
"branch": "main",
"commit_count": 122,
"repo_created_at": "2024-06-25T13:14:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3f814f5158... |
8fda3e8c-ba87-4f85-8289-02a2e13da7b7 | Ayushiverma844/Learning_Cpp_and_Dsa | DSA/1_ARRAY/16_4_Sum.cpp | // 4Sum
// Given an array nums of n integers, return an array of all the unique quadruplets [nums[a], nums[b], nums[c], nums[d]] such that:
// 0 <= a, b, c, d < n
// a, b, c, and d are distinct.
// nums[a] + nums[b] + nums[c] + nums[d] == target
// You may return the answer in any order.
// Example 1:
// Input: nums... | ALGO | 0.999936 | 6.166444 | {
"github_metadata": {
"branch": "main",
"commit_count": 313,
"repo_created_at": "2024-12-03T05:20: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": "da8458b8d8... |
9373f2e6-7173-4298-862d-d61cce55f9c1 | qawbecrdtey/BOJ-sol | problems/acmicpc_31628.cpp | #include <iostream>
#include <string>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr); cout.tie(nullptr);
auto a = new string*[10];
for(int i = 0; i < 10; i++) {
a[i] = new string[10];
for(int j = 0; j < 10; j++) {
cin >> a[i][j];
... | ALGO | 0.9996 | 3.35289 | {
"github_metadata": {
"branch": "master",
"commit_count": 2082,
"repo_created_at": "2019-08-29T04:11: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": "5ed97a0... |
0f0d27b3-9b54-4b5d-b2b5-e6b1712775ba | sgishere/competitive_coding | make_them_zero.cpp | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define ff first
#define ss second
#define lop(n) for (int i = 0; i < n; i++)
#define lopj(n) for (int j = 0; j < n; j++)
#define all(x) x.begin(), x.end()
#define sortd(x) sort(x.rbegin(), x.rend())
#define bitcount(x) __builtin_popcount(x)
#define... | ALGO | 0.999625 | 4.465725 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2022-06-11T12:31: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": "1d41782b1d0... |
d4bfe37f-d4df-427d-952b-0dd2260726ae | Mtaylorr/Competitive-programming-Solutions | DS/Treap/codeforces_863_D_session.cpp | //https://codeforces.com/contest/863/problem/D
// Mtaylor
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define fi first
#define se second
#define mp make_pair
#define endl '\n';
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
void dbg... | ALGO | 0.999989 | 4.438099 | {
"github_metadata": {
"branch": "main",
"commit_count": 1208,
"repo_created_at": "2021-07-28T20:32:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 49,
"forks": 7,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fa098f91... |
d8cf48de-7c61-4963-9ce2-82612bfd3b41 | Jabed-Kaium/Problem-Solving | UVA/369 - Combinations.cpp | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define endl "\n"
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define clr(a) memset(a,0,sizeof(a))
#define reset(a) memset(a,-1,sizeof(a))
#define mod 1000000007
#define pi acos(-1)
#define fastio ios_base::sync_with_std... | ALGO | 0.99996 | 4.822348 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2021-09-22T20:03: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": "2cc6b4e1a34... |
682e98ac-2b12-4ff8-b789-152c8da68d6d | akulkanojia2414/Spoj_questions | ndivisors.cpp |
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <utility>
#include <map>
#include <vector>
#include <list>
#include <string>
#include <set>
#include <queue>
#include <ctime>
#include <fstream>
#include <sstream>
#include <cmath>
#include <limits.h>
#include <cstdlib>
#include <st... | ALGO | 0.999884 | 3.487045 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2014-09-12T23:16: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": "29d842f247... |
403b1daa-3c93-472d-9938-d68be53eee2f | K-Ganguly/DSA | 6_linked_list/find_the_duplicate_number.cpp | // LeetCode Link: https://leetcode.com/problems/find-the-duplicate-number/
class Solution
{
public:
int findDuplicate(vector<int> &nums)
{
int slow = nums[0], fast = nums[0];
// Phase 1: Finding the intersection point
while (true)
{
slow = nums[slow]; // Move '... | ALGO | 0.999967 | 6.477242 | {
"github_metadata": {
"branch": "main",
"commit_count": 23,
"repo_created_at": "2023-10-15T11:30: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": "32aab11f35a... |
8b85d03e-ea0b-4b21-b471-a8b3655a2630 | rahul-aggarwal000005/Data-Structures-and-Algorithms | Day-6/Reverse a LinkedList in groups of size k.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
public:
ListNode *reverse(Lis... | ALGO | 0.999994 | 5.663689 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2022-05-03T16:46:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b35f13864... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.