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 |
|---|---|---|---|---|---|---|---|
8855dbc1-c699-4b59-a0d1-fd71269ee179 | RadioFreeAsia/RDacity | src/effects/FindClipping.cpp | /**********************************************************************
Audacity: A Digital Audio Editor
FindClipping.cpp
<NAME>
*******************************************************************//**
\class EffectFindClipping
\brief Locates clipping and inserts labels when found
*//************************... | TOOL | 0.930563 | 6.710782 | {
"github_metadata": {
"branch": "master",
"commit_count": 28,
"repo_created_at": "2016-08-10T15:37:18.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2,
"forks": 6,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "d1c3a2d9c4... |
4225994b-4ea3-4f4e-94c3-9b46496d7e6f | ausendzhikova/uni-data-structure-and-algorithms | Smaller.cpp | #include <bits/stdc++.h>
using namespace std;
void findSmaller(vector<int>& nums,multimap<int, int>& sortNums, int k,vector<int>&small) {
int size = nums.size();
for (int i = size - 1; i >= 0; i--) {
auto it = sortNums.lower_bound(nums[i]);
vector<multimap<int, int>::iterator> numsToDelete;
... | ALGO | 0.999998 | 4.911588 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2022-08-08T12:49: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": "a6748328b3c... |
02cc2d98-4732-4dd3-96cd-60ce99acb928 | dagp06/AdventOfCode_2022 | Source/Challenges/Challenge_06.cpp | #include "Challenge_06.h"
#include "../Helpers/FileHelpers.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
string const CChallenge_06::sm_inputFilePath = "Inputs/Input_Challenge_06.txt";
///////////////////////////////////////////////////////////////////////... | ALGO | 0.981062 | 4.392039 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2022-12-10T20:33: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": "a1e9c2101a6... |
8b4b6c4b-d67c-48c1-8b14-c8b377c44bdf | abhishekkumar08/Competitive-Sites-Solutions | LoveBabbar DSA 450/SubarrayWith0Sum.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int t;
cin >> t;
while (t--)
{
int n;
cin >> n;
int arr[n];
for (int i = 0; i < n; i++)
cin >> arr[i];
// int flag ... | ALGO | 0.999762 | 4.81835 | {
"github_metadata": {
"branch": "master",
"commit_count": 31,
"repo_created_at": "2020-10-11T17:10:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3e12784bb... |
2e6269f9-c7ec-4ef1-b108-2eb49dfa3345 | leeeju/Arduino_set_up | Arduino/Piezo_music/Piezo_music.ino | //*******************************************************************************
// Project : Piezo in music (떳다 떳다 비행기)
// 피에조 (piezo)는 일반적으로 압전 소자 (piezoelectric element)를 뜻하며, 압력을 가함으로써 전압을 발생 (압전 효과)시키거나,
// 전압을 가함으로써 변형을 (역압전 효과)일으키는 디바이스입니다
// Board : Arduino Uno
// 도 레 미 파 솔 라 시 도의 주파수는 도(523Hz), 레(587Hz), 미(... | TOOL | 0.962617 | 5.256974 | {
"github_metadata": {
"branch": "main",
"commit_count": 39,
"repo_created_at": "2022-01-24T04:20:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2f9f036da03... |
e79dc6dc-5c34-4374-8eea-c171f3e2335d | nillerusr/source-engine | game/client/portal/Portal_DynamicMeshRenderingUtils.cpp | //========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#include "cbase.h"
#include "Portal_DynamicMeshRenderingUtils.h"
#include "iviewrender.h"
extern ConVar mat_wireframe;
i... | ALGO | 0.999714 | 5.62821 | {
"github_metadata": {
"branch": "master",
"commit_count": 551,
"repo_created_at": "2020-10-22T15:16:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1850,
"forks": 286,
"issues": 89,
"pull_requests": 19
},
"file_meta": {
"content_id": "e... |
613cbc5a-ee97-4f28-bed5-8663871d744b | imranBappy/phitron1 | firs_semister/ds/week_08/binary_tree/makeTree.cpp | #include "Tree.h"
#include <bits/stdc++.h>
using namespace std;
#include <bits/stdc++.h>
using namespace std;
int makeSum(Node<int> *root, int binary[1000], int n, static int sum)
{
binary[n] = root->data;
n++;
if (root->left == NULL)
{
// sum += to_binary(binary, n);
// for (int i = 0; ... | ALGO | 0.999992 | 4.981091 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2022-12-08T09:06:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "21649055ea... |
f8d235b6-01ac-4ab7-83d3-130bdc905a30 | osamahatem/CompetitiveProgramming | Codeforces/_Gym/2016-2017 ACM-ICPC, NEERC, Northern Subregional Contest/G. Gangsters in Central City.cpp | /*
* G. Gangsters in Central City.cpp
*
* Created on: Nov 1, 2016
* Author: <NAME>
*/
#include <bits/stdtr1c++.h>
#include <ext/numeric>
using namespace std;
const int MAXN = 1e5 + 5;
const int LOG = 17;
int n, q, par[LOG][MAXN], depth[MAXN], indx[MAXN], idx;
int ancestor[MAXN], lastAns[MAXN], tree[MAXN]... | ALGO | 0.999879 | 3.93802 | {
"github_metadata": {
"branch": "master",
"commit_count": 125,
"repo_created_at": "2017-12-09T14:02:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e67a7d4e... |
e93d5f56-8584-4422-9672-9ffac869d706 | Philo-Li/PAT-Solutions | PAT-A/PAT_A1027.cpp | #define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
#include <string>
#include <iostream>
#include <algorithm>
using namespace std;
//A1027 Colors in Mars -2nd
string change(int x){
int a = x / 13, b = x % 13;
string temp;
temp = temp + (char)(a >= 10 ? (a - 10 + 'A'):(a + '0'));
temp += (char)(b >= 10 ? (b - 10 ... | ALGO | 0.999558 | 4.387428 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2017-06-02T05:54:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "58628eff00... |
0c2cfc99-5e7a-4111-8adb-67810f437266 | 1knowledge1/Laba3 | main.cpp | #include <iostream>
#include <sstream>
#include <cmath>
double f(double x)
{
return -sqrt(x)*sin(x);
}
double f2(double x)
{
return -sqrt(x)*sin(x)*sin(5*x);
}
void random_search(double a, double b, double P, double e)
{
int n = log10(P) / log10(1 - (e / (b - a)));
double x;
double min = f(a);
double Xmin = a;
... | ALGO | 0.999942 | 4.546567 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2018-11-11T22:23:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4b31b028de... |
440a9312-ea81-48ae-abe7-d0c9d4dfe7f2 | songsuyoung/Algorithm | Study/3055 탈출.cpp | #include <iostream>
#include <queue>
#include <climits>
using namespace std;
class Pos
{
public:
int _r, _c;
int _min;
Pos(){}
Pos(int r,int c,int min):_r(r),_c(c),_min(min){}
};
void bfs(int R,int C,char road[][55],queue<Pos>& ani, queue<Pos>& water, bool isVisited[][55])
{
int rows[4] = { -1,1,0,0 };
int cols... | ALGO | 0.999633 | 3.953397 | {
"github_metadata": {
"branch": "main",
"commit_count": 659,
"repo_created_at": "2022-02-04T01:22: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": "007f230599... |
1fdbb6f8-e136-43b7-9e6d-e6b39ae5569d | wangsiping97/My-LeetCode-Solutions | 225.cpp | // Implement the following operations of a stack using queues.
// push(x) -- Push element x onto stack.
// pop() -- Removes the element on top of the stack.
// top() -- Get the top element.
// empty() -- Return whether the stack is empty.
#include <queue>
using namespace std;
class MyStack {
public:
queue<int> ... | ALGO | 0.996379 | 5.674704 | {
"github_metadata": {
"branch": "master",
"commit_count": 393,
"repo_created_at": "2019-02-07T16:23:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 17,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b2343f4... |
5a056f4f-c1d0-4813-9731-404c36aceb07 | MSP07/Projects | Dictionary Using Trie/src.cpp | #include <iostream>
using namespace std;
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define endl "\n"
#define MAXN 100001
#define INF 1e18 + 1
#define MAX_WORD_SIZE 500
#define MAX_MEANING_SIZE 10000
int letterToInt(char letter)
{
if (letter >= 'A'... | ALGO | 0.983279 | 3.958261 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2024-06-15T11:08: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": "057aa3ea4f4... |
aa6bd33d-0fa9-4b7b-a675-2632172f64d0 | MIT-SPARK/TEASER-plusplus | teaser/include/teaser/linalg.h | /**
* Copyright (c) 2020, Massachusetts Institute of Technology,
* Cambridge, MA 02139
* All Rights Reserved
* Authors: <NAME>, et al. (see THANKS for the full author list)
* See LICENSE for the license information
*/
#pragma once
#include <iostream>
#include <Eigen/Core>
#include <Eigen/SparseCore>
#include <... | ALGO | 0.999956 | 6.357423 | {
"github_metadata": {
"branch": "master",
"commit_count": 53,
"repo_created_at": "2020-01-21T03:43:04.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2000,
"forks": 366,
"issues": 33,
"pull_requests": 2
},
"file_meta": {
"content_id": "c248... |
4893f463-d65d-4c4b-9280-fc4f3703f894 | LennyBrewster/Penny | project4.cpp | #include <stdio.h>
#include <stdlib.h>
#include <GL/glut.h>
#include <fstream>
#include <math.h>
#include <iostream>
using namespace std;
float xangle = 0;
float yangle = 0;
float zangle = 0;
const int SPACE = 2;
const int SIZE = 500 / SPACE;
class Surface
{
public:
double Px[SIZE][SIZE];
double Py[S... | TOOL | 0.937411 | 3.909042 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-01-25T23:29: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": "b7da84864d9c... |
9467c3cc-b9ca-4f2a-8ed9-fad7f683fe5d | rongkai-zhang/Cpp-Learning-Record | Cpp-learning_record/C++基础编程/冒泡排序.cpp | #include <iostream>
using namespace std;
int main()
{
int a[9] = {1, 5, 4, 8, 9, 6, 3, 2, 7};
//冒泡排序从小到大排序
cout << "排序前" << endl;
for (int i = 0; i < 9; i++)
{
cout << a[i] << " ";
}
cout << endl;
int t;
for (int i = 0; i < 9 - 1; i++)
{
for (int j = 0; j < 9 - i... | ALGO | 0.999919 | 4.069787 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2020-08-17T01:28:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1f5761829... |
9c7953fa-6a0e-4017-ba21-33ac2506b1e4 | HoangDung05/PTIT | data structure & algorithm/toanroirac2/codeptit/dothi13.cpp | #include<bits/stdc++.h>
using namespace std;
int main()
{
ifstream inFile("DT.INP");
ofstream outFile("DT.OUT");
if (inFile.is_open())
{
int t, n, bac = 0;
inFile >> t >> n;
string line;
vector<vector<int>> a;
while (getline(inFile, line))
{
... | ALGO | 0.999353 | 3.639364 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-07-07T02:05:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d281965e8cc7... |
63c00008-f34d-431b-9335-758b0ecfe681 | ML-UCV/ML-CodeBert-DistinctSolutions | Raw Dataset/party/tarjan/train/4e3d79d5-02b2-11ec-91f8-2cf05d84bfc2.cpp | #include <bits/stdc++.h>
using namespace std;
vector <int> L[210],ans;
int level[210],low[210],viz[210],sol[210];
deque <int> s;
int n,m,i,x,y,tip,idx,nx,ny;
void dfs (int nod){
level[nod] = low[nod] = ++idx;
viz[nod] = 1;
s.push_back(nod);
for (auto vecin : L[nod]){
if (!leve... | ALGO | 0.999975 | 3.32192 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2022-03-06T17:44:46.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "908cfadb59c07... |
2c17924a-5fd7-45ce-a9f6-fb0d67b65434 | Errichto/youtube | leetcode/april-2020-challenge/24-lru-cache.cpp | class LRUCache {
private:
unordered_map<int,pair<int,list<int>::iterator>> value; // will keep only existing elements
list<int> accessed;
// unordered_map<int,int> cnt_in_queue;
int capacity;
void erase(int key) {
auto it = value.find(key);
// for(int x : accessed) cout << x << ", ";... | ALGO | 0.999748 | 5.979417 | {
"github_metadata": {
"branch": "master",
"commit_count": 88,
"repo_created_at": "2019-02-03T13:25:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2725,
"forks": 523,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "4ad3... |
aec25ffa-d7a8-4999-bc74-df77444e8032 | skk1faker/icpc | pp/vj/uva1601.cpp | #include<iostream>
#include<cstring>
#include<queue>
using namespace std;
char map[16][20];
int vis[16777217];
int w,h,n;
struct posi_ghost{
int n;
int posi[3][2];
int step;
posi_ghost(int n)
{
step = 0;
for(int i = 0;i< n;i++){
posi[i][0] = 0;
posi[i][1] ... | ALGO | 0.999925 | 3.251168 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2022-11-02T11:06:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "409e075c4... |
9581ae1c-76be-409a-8fb2-dc9ddb70b99c | Randowlh/Project_ACM | code/competition/Educational Codeforces Round 74/3.cpp | #include <bits/stdc++.h>
using namespace std;
#pragma optimize(2)
//#pragma GCC optimize("Ofast,no-stack-protector")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
const int inf = 0x7FFFFFFF;
typedef long long ll;
typedef double db;
typedef long double ld;
template<class T>inline v... | ALGO | 0.999819 | 3.894102 | {
"github_metadata": {
"branch": "master",
"commit_count": 516,
"repo_created_at": "2017-07-20T06:34:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "23a3726e... |
9bf5c85d-66df-40fd-8578-2d275ad82650 | mushfiq-906/cp__training | Codeforces__Problems/contest/1004/c/66969631.cpp | // Author : <NAME>
// Problem : C
#ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS
#endif
#include <bits\stdc++.h>
#define vll vector<ll>
#define vi vector<int>
#define sz size()
#define pii pair<int,int>
#define IO ios_base::sync_with_stdio(0),ios::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define all(v) ((v).begin()),... | ALGO | 0.999036 | 3.501502 | {
"github_metadata": {
"branch": "master",
"commit_count": 515,
"repo_created_at": "2021-07-04T23:18: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": "6c6d2565... |
454e4bcd-8b4d-407d-b5e2-839b19b8835c | Komorebi-bit/c-cpp | C++/STL/2/kmp.cpp | #include <iostream>
using namespace std;
char s[100000]; // 主串
char p[10000]; // 模式串
int n, m;
int kmp(int[]);
int main()
{
cin >> n >> (s + 1) >> m >> (p + 1); // 下标从1开始
int next[m + 1];
int res = kmp(next);
cout << res << '\n';
system("pause");
return 0;
}
int kmp(int next[])
{
next... | ALGO | 0.999968 | 3.984205 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-03-15T12:39:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "714cc676c61c... |
fbf0745e-de67-41f4-98ff-b2938b663394 | SohithPenumajji/codespace | DSA/Array_ADT/ArrayClass/main.cpp | #include <iostream>
using namespace std;
template <class T>
class Array
{
private:
T *A;
int a_size;
int length;
public:
Array()
{
a_size = 10;
A = new T[a_size];
length = 0;
}
Array(int sz)
{
a_size = sz;
length = 0;
A = new T[a_size];... | ALGO | 0.999112 | 4.678103 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-01-30T08: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": "b85cc8d44aae... |
a106b460-7b28-4e4f-b706-2ee2302f4a42 | richardyantas/utec-ads-2022-1 | week08/main.cpp | #include <iostream>
#include <algorithm>
#include "dstree.h"
#include "dsarray.h"
using namespace std;
int main(int argc, char const *argv[])
{
int n, option1, option2, x, y;
char elem;
vector<char> data, set1;
DisjoinSet<char>* ds = nullptr;
cin>>n;
for (int i = 0; i < n; i++){
... | ALGO | 0.998909 | 4.49798 | {
"github_metadata": {
"branch": "main",
"commit_count": 32,
"repo_created_at": "2022-03-26T15:20:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bb82627d777... |
883de996-bb25-408c-9f6c-66348d524a59 | opencv/opencv | cmake/checks/cpu_neon_fp16.cpp | #include <stdio.h>
#if (defined __GNUC__ && (defined __arm__ || defined __aarch64__)) || (defined _MSC_VER && (defined _M_ARM64 || defined _M_ARM64EC))
#include "arm_neon.h"
float16x8_t vld1q_as_f16(const float* src)
{
float32x4_t s0 = vld1q_f32(src), s1 = vld1q_f32(src + 4);
return vcombine_f16(vcvt_f16_f32(... | ALGO | 0.925478 | 3.895424 | {
"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"... |
08f35876-f568-43a7-9d22-e619eca82be3 | PerfectionistAF/Finite_Pushdown_Automatons | 0011_dfa.cpp | #include <iostream>
#include <vector>
#include <array>
#include <stack>
#include <string>
#include <iomanip>
#include <cstdio>
#include <bits/stdc++.h>
#include <vector>
using namespace std;
/*This code uses a dfa to check whether or not the input string is accepted.
The criterion used here is an even no of 0's and an... | ALGO | 0.998693 | 3.89488 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2023-04-30T16:47: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": "af8d1ebe15c3... |
9fc5a41c-a9b0-468f-a6a3-4be801b3c875 | lonelam/SolveSet | cf840B.cpp | #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const int inf = 0x3f3f3f3f;
const int maxn = 300000 + 100;
int d[maxn];
bool vis[maxn];
vector<pair<int,int> > G[maxn];
vector<int> ans;
int cnt;
void dfs(int u,int fa, i... | ALGO | 0.999974 | 4.137701 | {
"github_metadata": {
"branch": "master",
"commit_count": 276,
"repo_created_at": "2016-07-09T12:38:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d288d4c7... |
17196579-720d-4964-9a80-7f77fc071dfc | ishandutta2007/codeforces-nonalphabetic | 131131yhx/normal/936/D.cpp | #include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#define M 4000010
#define Inf 1000000007
#define PII pair <int, int>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
int n, m[2], T, X[2][M], F[2][M];
bool Pr[2][M];
vector <int> V, Ans1;
vector <PII> Ans2, Ans3;
... | ALGO | 0.999972 | 3.449397 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:49:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c69b4e359f01... |
f8796d97-f140-4218-9882-cb9970a64ad0 | Liang-bk/BigInt-Template | bigInt.h | //
// Created by Kxq03 on 25-5-16.
//
#ifndef BIGINT_H
#define BIGINT_H
#include <algorithm>
#include <cassert>
#include <deque>
#include <iomanip>
#include <iostream>
#include <vector>
// TODO: 模运算, FFT乘法
class BigInt {
private:
using i64 = long long;
using ui64 = unsigned long long;
const static int BASE... | ALGO | 0.995406 | 4.260183 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2025-05-17T14:08: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": "ab08430bc0f0... |
2fb55c37-985c-440c-a3cc-e7ee857faa4d | OloieriAlexandru/Competitive-Programming-Training | campion arhiva/829.cpp | #include <bits/stdc++.h>
#define pii pair<int,int>
#define mp make_pair
#define nmax 105
#define lld long long
#define ld long double
#define pb push_back
using namespace std;
int n, p[nmax], sum1, sum2, num, x;
bool erased[nmax];
vector<int>g[nmax];
void rem(vector<int> & v, int e){
int rm = -1;
for (int i=0;i... | ALGO | 0.999845 | 3.395369 | {
"github_metadata": {
"branch": "master",
"commit_count": 27,
"repo_created_at": "2019-05-29T19:18:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0fb119d7f... |
dfede72f-9f22-4de6-9c70-c326bff3c13c | DionysiosB/CodeForces | CodeforcesEDU/PracticeSegmentTree1C-NumberOfMinimumsOnASegment.cpp | #include <cstdio>
#include <vector>
typedef long long ll;
//Segment Tree, RST
struct segtree{
long sz; std::vector<std::pair<ll, ll> > f;
void init(ll num){
const ll MAX = 1e17;
sz = 1; while(sz < num){sz *= 2;}
f.assign(2 * sz, std::make_pair(MAX, 1LL));
}
void set(long idx,... | ALGO | 0.999927 | 4.158824 | {
"github_metadata": {
"branch": "master",
"commit_count": 4487,
"repo_created_at": "2013-06-27T18:15:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 690,
"forks": 163,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e19... |
645c3e1b-9c83-4d1c-8e9b-2b90dfc06a5a | CraigDaGama/Computer-Engineering | Modern Algorithm Design Foundation (SE)/Recursive-Binary-Search/recursiveBinarySearch.cpp | #include<iostream>
using namespace std;
int Sort(int a[], int n)
{
for(int i=0;i<n;i++)
{
for (int j=0;j<n-i-1;j++)
{
if (a[j]>a[j+1])
swap(a[j],a[j+1]);
}
}
}
int BinarySearch(int a[], int key, int low, int high)
{
int mid;
if(low > high)
cout... | ALGO | 0.999917 | 4.267136 | {
"github_metadata": {
"branch": "main",
"commit_count": 97,
"repo_created_at": "2024-08-15T11:41:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e15e3946d8c... |
ad49c13e-0a38-411a-8b2d-e7a7a8f8da63 | JiakunYan/arl | include/backend/reduce.hpp | // This file is simplified based on UPC++(https://bitbucket.org/berkeleylab/upcxx/wiki/Home) reduce.hpp, reduce.cpp
#ifndef ARL_BACKEND_REDUCE_HPP
#define ARL_BACKEND_REDUCE_HPP
namespace arl::backend {
template<int bits, bool is_signed>
struct reduce_ty_id_integral {
static const datatype_t ty_id;// the MPI Dataty... | TOOL | 0.98645 | 7.372019 | {
"github_metadata": {
"branch": "master",
"commit_count": 222,
"repo_created_at": "2019-12-30T19:03:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0b3f8e34... |
9abeba3f-6939-450a-b6c3-468aca419522 | Halofreak1990/XFXFramework | include/Matrix.h | /*****************************************************************************
* Matrix.h *
* *
* XFX::Matrix definition file *
* Copyright (c) XFX Team. All Rights Reserved *
*****************************************************************************/
#ifnd... | ALGO | 0.955277 | 4.701027 | {
"github_metadata": {
"branch": "master",
"commit_count": 42,
"repo_created_at": "2013-05-05T14:45:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 22,
"forks": 10,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "99a6ada... |
2f3dff4a-cd3d-4504-bbb9-715fe204d486 | LumbaBalumba/CMC_CPP | 3/4.cpp | #include "cmc_complex.h"
#include "cmc_complex_stack.h"
#include "cmc_complex_eval.h"
#include <cmath>
#include <vector>
#include <string>
#include <iostream>
int
main(int argc, char **argv)
{
const numbers::complex C(argv[1]);
const double R = fabs(strtod(argv[2], nullptr));
const int N = (int) strtol(arg... | ALGO | 0.990383 | 5.064737 | {
"github_metadata": {
"branch": "main",
"commit_count": 44,
"repo_created_at": "2023-02-20T07:23: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": "ed09f13e82a... |
5fb32b7e-bbe4-4dc5-973c-accfdf02eb95 | chunzhang/practice | leetcode/0912_sort_an_array/sol.cpp | /*
Given an array of integers nums, sort the array in ascending order.
Example 1:
Input: nums = [5,2,3,1]
Output: [1,2,3,5]
Example 2:
Input: nums = [5,1,1,2,0,0]
Output: [0,0,1,1,2,5]
Constraints:
1 <= nums.length <= 5 * 10^4
-5 * 10^4 <= nums[i] <= 5 * 10^4
*/
// mrege sort
class Solut... | ALGO | 0.999999 | 6.280922 | {
"github_metadata": {
"branch": "master",
"commit_count": 179,
"repo_created_at": "2017-09-16T23:04: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": "5d3177d6... |
4b67b9cb-e3d9-4aa6-85a3-a7f36a06a264 | jiwon824/codetree-TILs | 241017/노드의 공통 조상 2/common-ancestor-of-node-2.cpp | #include <iostream>
#include <vector>
using namespace std;
const int MAX_N = 50'001;
const int MAX_H = 16; // 2^16=65,536 이므로 50,000개의 노드를 커버할 수 있다
int n, q;
vector<int> edges[MAX_N];
bool visited[MAX_N]={false, };
int depth[MAX_N];
int parent[MAX_H][MAX_N];
// DFS를 통해 parent 초기 조건을 채움
void DFS(int x){
for(int ... | ALGO | 0.999992 | 5.044892 | {
"github_metadata": {
"branch": "main",
"commit_count": 1826,
"repo_created_at": "2024-03-07T07:30: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": "38439e977... |
aef121ed-c45c-4f3f-8aae-55928a1b2b96 | satkur/progexer | ExhaustiveSearch.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
vector<int> collectSumCombination(const vector<int>& inVec) {
int n = inVec.size();
vector<int> outVec(1 << n);
for (int bit = 1; bit < (1 << n); bit++) {
for (int i = 0; i < n; i++) {
int mask = 1 << ... | ALGO | 0.999992 | 5.673888 | {
"github_metadata": {
"branch": "main",
"commit_count": 30,
"repo_created_at": "2022-06-27T03:14: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": "3dabc8dff2e... |
95f1801e-556a-4862-9824-6437f5e70e3b | miggule2/infinite-coding-hell | leekak/week5/[BOJ]2205.cpp | #include <iostream>
#include <cstring>
using namespace std;
bool is_squared(int num) {
return (num & (num-1)) == 0;
}
int main() {
int n;
cin >> n;
int result[n+1]; // 결과 저장할 배열
memset(result, 0, sizeof(result));
bool sn[n+1]; // 이미 썼는지 확인하려고
memset(sn, false, sizeof(result));
for(int ... | ALGO | 0.999816 | 3.808582 | {
"github_metadata": {
"branch": "main",
"commit_count": 468,
"repo_created_at": "2024-12-16T07:26:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6a7f75fbb5... |
3f622c28-84c8-4234-ba22-c6bd4ceee1db | sjh04/NEUoj | datastructure/33.cpp | #include <iostream>
#include <vector>
using namespace std;
void swap(int &a, int &b)
{
int tmp = a;
a = b;
b = tmp;
}
void maxHeapify(vector<int> &maxHeap, int i)
{
int left = 2 * i +1;
int right = 2 * i + 2;
int largest;
if (left < maxHeap.size() && maxHeap[left] > maxHeap[i])
{
... | ALGO | 0.999942 | 4.492882 | {
"github_metadata": {
"branch": "main",
"commit_count": 27,
"repo_created_at": "2024-06-08T08:48:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "823cab2708f... |
b6d7421f-0cb4-4e38-accc-a8a872131982 | vermouth1992/hipc21 | libs/src/segment_tree_cppopt.cpp | //
// Created by <NAME> on 9/21/21.
//
#include "replay_buffer/segment_tree_cppopt.h"
// SegmentTreeCPPOpt
rlu::replay_buffer::SegmentTreeCPPOpt::SegmentTreeCPPOpt(int64_t size, int64_t partition_height) :
m_partition_height(partition_height),
m_block_branch_factor(1 << (partition_height - 1)) {
... | ALGO | 0.98579 | 6.625517 | {
"github_metadata": {
"branch": "master",
"commit_count": 153,
"repo_created_at": "2021-06-29T23:53:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ba09cc46... |
df907399-d4e8-4700-80d5-308cb0d5d662 | Yawn-Sean/Daily_CF_Problems | daily_problems/2024/08/0819/personal_submission/cf827b_metal_frog.cpp | void solve() {
int n, k;
cin >> n >> k;
vector<pii> edges;
vector<int> prev;
int inner = n - k, it = 2;
prev.push_back(1);
vector<int> cnt(n + 1), dep(n + 1);
while (it <= inner) {
vector<int> nextLevel;
for (int i = 0; i < k && it <= inner; i++, it++) {
nextL... | ALGO | 0.999927 | 3.977105 | {
"github_metadata": {
"branch": "main",
"commit_count": 20410,
"repo_created_at": "2024-02-26T01:04:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 478,
"forks": 302,
"issues": 0,
"pull_requests": 7
},
"file_meta": {
"content_id": "6f14... |
e9de172b-64c3-4d86-825e-49ebe95f837a | FranzOle/Belajar_Personal | LATIHAN CPP/C++/batu gunting kertas.cpp | #include <iostream>
#include <stdlib.h>
#include <time.h>
#include <string.h>
using namespace std;
string status[3]={"Gunting","Batu","Kertas"};
string m[3]={"Kamu Menang Kali ini ! ","Lawan Menang Kali ini ","Seri ! "};
string statuS(int *p1, int *p2){
if(*p1==1){
if(*p2==2){
return m[1];
}
else if(*p2==3)... | ALGO | 0.999768 | 3.180227 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2023-09-10T12:34:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3262332f85c... |
bc804b81-e77d-466e-9514-d54e55a28e17 | ricarditt0/IA_avancada_Lista4 | pdb.cc | #include "pdb.h"
#include "../utils/logging.h"
#include <queue>
#include <limits>
using namespace std;
namespace planopt_heuristics {
/*
An entry in the queue is a tuple (h, i) where h is the goal distance of state i.
See comments below for details.
*/
using QueueEntry = pair<int, int>;
PatternDatabase::Patter... | ALGO | 0.999865 | 4.698347 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-08-05T02:11: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": "584a9069455d... |
8b185291-8a75-434f-b927-24bf2605ee09 | mollynova/Undergraduate_Work | CS261/Asgmt03/Item.h | #pragma once
#include <ostream>
#include <vector>
#include <string>
#include<algorithm>
using namespace std;
class Item
{
private:
const string title;
const string artist;
vector<string> keywords;
int numStuff;
public:
Item(const string title, const string artist, int numStuff);
//Item();
virtual ~Item();
v... | TOOL | 0.911745 | 4.741956 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2017-01-17T04:26:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5bc4f1ed1... |
f73ec01b-a399-4741-a7c4-eb5ce56e7a45 | gabrys0099/WiezaHanoi | WiezaHanoi.cpp | //============================================================================
// Algorytmy i Struktury Danych
// Zadanie 5.1
// wieże hanoi
//
// WCY21IY1S1 <NAME>
//============================================================================
#include <iostream>
#include <stdlib.h>
#include <cmath>... | ALGO | 0.999748 | 4.503852 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-10-31T21:08: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": "9b8b2bb004f0... |
4b60f305-bb21-4c33-be90-6e7d53454724 | ChiragRajput101/SDESheet | Arrays-III/majorityElementI.cpp | #include <bits/stdc++.h>
using namespace std;
int majorityElement(vector<int>& nums) {
// bit manipulation -- TC: O(32n), Const Space
int ans = 0;
for(int i=0;i<32;i++) {
// chk leftmost bit by masking all others then chk second last and so on
int mask = 1;
mask <<= i;
int... | ALGO | 0.999975 | 5.224092 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2023-06-19T13:50: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": "549c2590fe... |
7feefdfb-884a-474c-86bb-933cb36d9d02 | Jae-Hyuk-Jang/baekjoon-source-code | 11780/main.cpp | #include<bits/stdc++.h>
#define MX 110
#define INF 1e9
using namespace std;
int n, m;
int mat[MX][MX];
int a, b, c;
vector<int> route[MX][MX];
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cin >> n >> m;
for (int i = 1; i <= n; i++) {
fill(mat[i] + 1, mat[i] + n + 1, INF);
mat[i][i] = 0;
route[i]... | ALGO | 0.99999 | 3.741014 | {
"github_metadata": {
"branch": "main",
"commit_count": 111,
"repo_created_at": "2024-09-23T06:35: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": "2e6a729641... |
a3f8c369-dcf4-49d1-8696-cdcb6fc74304 | Deepsen7744/encryption-decryption-technique | modules/padding.cpp | #include <bits/stdc++.h>
using namespace std;
string padding(string &bin, int bl)
{
/*
This function takes a bit string 'bin' and returns a modified bit string.
In the modified bit string, there are some random garbage bits added after
each 'bl' bits.
*/
string encrypted = "";
int i = 0;
... | ALGO | 0.999705 | 4.007054 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-06-18T18:02: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": "3ec9c42d4bfe... |
8769dbb2-e839-4358-ac41-72c37372df8c | muazhussain/Blind-75-and-Beyond | 02. Linked List/intersection-of-two-linked-list/intersection-of-two-linked-list-better-2.cpp | // Problem link: https://leetcode.com/problems/intersection-of-two-linked-lists/
// Time: O(len(headA + headB))
// Space: O(1)
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
private:
Lis... | ALGO | 0.999959 | 5.679619 | {
"github_metadata": {
"branch": "master",
"commit_count": 141,
"repo_created_at": "2024-05-01T12:27:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "ef4a85c8... |
e19692a8-87ce-4d58-b51a-e337ef36c5ae | dianyunPCL/OpenSourceCode | apollo-master/modules/perception/obstacle/fusion/probabilistic_fusion/pbf_track_object_distance.cc | /******************************************************************************
* Copyright 2017 The Apollo Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
... | TOOL | 0.958501 | 7.247097 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2019-06-15T07:38:46.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 7,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8483a8d9561... |
cc75b098-69a7-462b-a259-544c3ad54e1a | PatelManav/Codeforces_Backup | 1323A.cpp | /*May The Force Be With Me*/
#include <bits/stdc++.h>
#define ll long long
#define MOD 1000000007
#define endl "\n"
#define vll vector<long long>
#define pll pair<long long, long long>
#define all(c) c.begin(),c.end()
#define f first
#define s second
#define inf INT_MAX
#define size_1d 10000000
#define size_2d 10000
#d... | ALGO | 0.999261 | 3.43545 | {
"github_metadata": {
"branch": "master",
"commit_count": 98,
"repo_created_at": "2020-10-01T14:54:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "84fa80076... |
84d07386-b213-46c4-af20-de989c3275ee | ravigupta0210/CrackYourPlacement | Daily/03_Feb.cpp | // Sliding Window Maximum
class Solution {
public:
vector<int> maxSlidingWindow(vector<int>& nums, int k) {
int n=nums.size();
priority_queue<pair<int,int>> pq;
vector<int> ans;
for(int i=0;i<k;i++)
pq.push({nums[i],i});
ans.push_back(pq.top().first);
for(i... | ALGO | 0.999963 | 5.934097 | {
"github_metadata": {
"branch": "main",
"commit_count": 559,
"repo_created_at": "2023-07-19T04:31:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b0d2ccf347... |
cf8b9f57-3bdf-4a2c-8a49-bdbb0617b786 | cjh-19/ALST | cjh-19/algorithm/week15/BOJ_보석_도둑.cpp | #include <iostream>
#include <queue>
#include <vector>
#include <algorithm>
using namespace std;
int N, K;
vector<pair<int, int>> dia; // { 무게, 가격 }
vector<int> bag;
long long sum = 0;
int main() {
ios_base::sync_with_stdio(0); cin.tie(0);
cin >> N >> K;
for (int i = 0; i < N; i++) {
int m, v;
cin >> m >> v;... | ALGO | 0.99998 | 4.676307 | {
"github_metadata": {
"branch": "main",
"commit_count": 550,
"repo_created_at": "2024-06-20T06:39:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5d2f547079... |
69ffa523-d936-41e1-b65b-644be56b7667 | conradsoon/competitive_programming | kattis/solved/artichoke.cpp | #include <iostream>
#include <string>
#include <vector>
#include <iomanip>
#include <math.h>
using namespace std;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<pii> vii;
typedef vector<vi> vvi;
typedef long int l;
typedef unsigned long int ul;
typedef long long int ll;
t... | ALGO | 0.999841 | 3.840309 | {
"github_metadata": {
"branch": "master",
"commit_count": 32,
"repo_created_at": "2021-06-07T07:44: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": "1be9c5673... |
491095c9-6808-4ed5-abe8-06cac8cdee92 | aaxx98/til | algorithm/simulation/7682.cpp | #include <iostream>
#include <queue>
#include <deque>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <set>
#include <map>
#include <math.h>
#include <string.h>
#include <bitset>
#include <cmath>
using namespace std;
string str = "";
bool judge(char c)
{
for (int i = 0; i < 3; ... | ALGO | 0.999921 | 4.290042 | {
"github_metadata": {
"branch": "main",
"commit_count": 76,
"repo_created_at": "2021-02-26T16:22: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": "847918cf423... |
47fc20d5-b5ba-4983-a6e0-dbd9dabda86a | stefaneduard-deaconu/poo2021-2022 | Proiect1/152/Voicu Stefan/main(3).cpp | // voicu stefan grupa 152 proiect 1 lab poo
#include <iostream>
#include <set>
#include <stdlib.h>
#include <time.h>
#include <string>
using namespace std;
class Comanda{
private:
int durata, id;
string nume, telefon;
public:
int getDurata() const {
return durata;
}
int getId() const {
... | TOOL | 0.972681 | 4.435699 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2022-02-22T03:13: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": "d9cef3664... |
6ede6649-7ec9-47e1-9b74-f9a1cfb7f00e | 15999shivam/ADI | Queues/circularQueue.c++ | #include <iostream>
using namespace std;
struct node
{
int data;
node *next;
};
class LinkedQueue
{
node *queue;
node *tail;
public:
LinkedQueue()
{
queue = NULL;
tail = NULL;
}
int peek()
{
if (queue != NULL)
{
return queue->data;
... | ALGO | 0.997651 | 4.322963 | {
"github_metadata": {
"branch": "master",
"commit_count": 48,
"repo_created_at": "2019-10-06T18:27: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": "330a83cb3... |
018fb216-cd32-4df4-8584-dfa5d5f1f8a7 | kzvd4729/Problem-Solving | codechef/SSTRPREF2/Accepted.cpp | /****************************************************************************************
* @author: kzvd4729 created: 19-10-2021 16:55:11
* solution_verdict: Accepted language: C++14
* run... | ALGO | 0.999875 | 4.605487 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2022-02-01T09:12:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a39c06df6b6... |
6d061a87-ab04-44f4-93dc-9144456095ea | arp99/leetcode-practice | linked-list/linked-list-cycle-ii/solution.cpp | #include<bits/stdc++.h>
using namespace std;
struct ListNode {
int val;
ListNode *next;
ListNode(int x) : val(x), next(NULL) {}
};
class Solution {
public:
ListNode* getMeetingPoint(ListNode* list){
ListNode* hare = list , *turtle = list;
while(turtle and hare and hare->next){
... | ALGO | 0.99999 | 5.170023 | {
"github_metadata": {
"branch": "main",
"commit_count": 71,
"repo_created_at": "2021-01-01T06:30:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "65c24a5a710... |
a1bd4bdd-cd79-4dd6-8d29-16cd4f943cbc | BinomialSheep/CompetitiveC-- | RasenBook/MinumumCostSort.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
static const int MAX = 1000;
static const int VMAX = 10000;
int n, A[MAX], small;
int B[MAX], T[VMAX+1];
int solve() {
int ans = 0;
bool V[MAX]; // 探索済みフラグの配列
// B[]にA[]をコピーし、V[]を初期化
for (int i = 0; i < n; i++ ) {
B[i] = A[i];
V[... | ALGO | 0.999951 | 3.468701 | {
"github_metadata": {
"branch": "master",
"commit_count": 34,
"repo_created_at": "2023-12-12T17:45:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "89a819929... |
f7b9dcef-6e0c-4372-9d70-c3b48bc3588d | ppatel03/CPP-Assignment-Git | Assignment 4/code/ConsoleApplication1/ConsoleApplication1/main.cpp | ///////////////////////////////////////////////////////////////////////////
// NAME : <NAME> //
// //
// FILENAME : main.cpp //
// //
// COURSE NUMBER : CIS 554 //
// //
// DESC : SelectionSort.h contains the main function im... | ALGO | 0.996649 | 5.420298 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2015-12-03T10:44: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": "0c23c6392c... |
3474ddcb-b0f0-4d69-8ed1-81ac3c76f46f | gabrielrussoc/competitive-programming | codejam/2016/round1a/c.cpp | #include <bits/stdc++.h>
#define mp make_pair
#define pb push_back
#define ff first
#define ss second
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const double eps = 1e-9;
const int inf = INT_MAX;
//////////////0123456789
const int N = 10004;
const int modn = 10000000... | ALGO | 0.999875 | 4.101798 | {
"github_metadata": {
"branch": "master",
"commit_count": 470,
"repo_created_at": "2015-10-24T20:27:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8a94d958... |
74abe8a5-f575-4a27-b144-7e05a49db842 | cananella/baekjoonSolution | CPP/9019_DSLR.cpp | #include<iostream>
#include<queue>
#include<cstring>
using namespace std;
int D(int num){
int ans= num*2 % 10000;
return ans;
}
int S(int num){
int ans= num-1;
return ans;
}
int L(int num){
int ans;
if(!num) ans=9999;
else ans=(num*10)%10000+num/1000;
return ans;
}
int R(int num){
... | ALGO | 0.999976 | 4.138433 | {
"github_metadata": {
"branch": "main",
"commit_count": 39,
"repo_created_at": "2024-03-21T01:08: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": "40b6e5b15c1... |
dff31c15-c592-4408-b739-86c1d7385ce3 | devparkk01/cpp | Algorithms/Graphs/prequisitesTasks.cpp | /*
There are a total of N tasks, labeled from 0 to N-1. Some tasks may have prerequisites,
for example to do task 0 you have to first complete task 1, which is expressed as a pair: [0, 1]
Given the total number of tasks N and a list of prerequisite pairs P,
find if it is possible to finish all tasks.
*/
/*
The root ... | ALGO | 0.999567 | 6.256399 | {
"github_metadata": {
"branch": "main",
"commit_count": 132,
"repo_created_at": "2020-07-28T08:16:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ce3e6869dd... |
7fefb87c-c467-4f6e-ab69-31ec9a87f80c | raincross7/code-similarity | codes/train_code/problem314/problem314_186.cpp | #include <bits/stdc++.h>
#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 (int i = 0; i < (int)(n); i++)
#define repi(i, n) for (int i = 1; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
#define pu... | ALGO | 0.999904 | 3.75819 | {
"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": "f79935474100... |
de9f7d2a-8ee1-41c7-b391-fe94baf98097 | google/jni-bind | metaprogramming/modified_max.h | /*
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | ALGO | 0.955717 | 6.872907 | {
"github_metadata": {
"branch": "main",
"commit_count": 437,
"repo_created_at": "2021-05-17T20:10:39.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 291,
"forks": 34,
"issues": 3,
"pull_requests": 20
},
"file_meta": {
"content_id": "5afb022... |
c1d74c3f-f9e3-4e30-921f-878c9d9446b3 | Isha123-maker/DSA-CODES-FILES | singleElement.cpp | #include<iostream>
#include<vector>
using namespace std;
int singleDuplicate(vector<int>& arr){
int n = arr.size();
if(n == 1){return arr[0];}
int st = 0 , end = n - 1;
while(st <= end){
int mid = st + (end - st) / 2;
if(mid == 0 && arr[0] != arr[1]){return arr[mid];}
else i... | ALGO | 0.999862 | 4.703907 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2025-05-15T07:48: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": "e60a5d325074... |
01be8116-6df1-4932-a27a-08b154b5dfca | ElmerCSC/elmerfem | ElmerGUI/Application/src/meshutils.h | /*****************************************************************************
* *
* Elmer, A Finite Element Software for Multiphysical Problems *
* *
* ... | TOOL | 0.924266 | 6.20961 | {
"github_metadata": {
"branch": "devel",
"commit_count": 9284,
"repo_created_at": "2014-02-12T15:12:24.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1353,
"forks": 344,
"issues": 55,
"pull_requests": 3
},
"file_meta": {
"content_id": "738... |
2361012a-ca63-4cd3-b1a5-5ffdb4e1528a | demercurizer/Algorithms-mipt-tasks | algorithms_sem_2_2/M.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <set>
void DFS(const int& vertex, const int& prev, int& timer, const std::vector<std::vector<int>>& graph,
std::vector<int>& tin, std::vector<int>& ret, std::vector<bool>& used, std::set<int>& queue) {
tin[vertex] = timer++;
ret[vertex] =... | ALGO | 0.999916 | 4.698608 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2025-04-23T19:06: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": "25f8b0413a... |
3e161552-b488-4882-b674-03810d690829 | iamutkarshyadav/DAA_F | w1q2.cpp | #include <iostream>
using namespace std;
int binarySearch(int arr[], int left, int right, int key, int &comparisons)
{
if (right >= left)
{
int mid = left + (right - left) / 2;
comparisons++;
if (arr[mid] == key)
{
return mid;
}
if (arr[mid] > key)
... | ALGO | 0.999953 | 5.804438 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2023-04-11T13:03: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": "e34bc284a5... |
06ab0843-edd9-4862-9b71-6ccf4de8f4a8 | Navy10021/CODE_is_ART | Backtracking/permute_with_duplicate.cpp | #include <bits/stdc++.h>
using namespace std;
// permutations of a given string with duplicates
// 1. find the index of the smallest character which is greater than 'first'
int find_ceil(string str, char first, int l, int h){
// initialization
int ceil_idx = l;
// find the smallest character greater tha... | ALGO | 0.999972 | 4.95227 | {
"github_metadata": {
"branch": "main",
"commit_count": 1837,
"repo_created_at": "2023-04-14T06:18:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1c56f3315... |
b9b31f49-f056-4455-b690-ad131a3e53e2 | kiruba-r11/LeetCode-Solutions | 92-reverse-linked-list-ii/92-reverse-linked-list-ii.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.999999 | 5.678021 | {
"github_metadata": {
"branch": "main",
"commit_count": 3218,
"repo_created_at": "2022-01-26T12:07:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cad7c9022... |
b93ca98b-9f8d-44cf-9445-a120ff06bf93 | anagorko/informatyka | home/kblankiewicz/sort.odkonca.cpp | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
string odwrot(string s)
{
string t = s;
for(int i = 0; i < s.length(); i++)
{
t[i] = s[s.length() - 1 - i];
}
return t;
}
class Slowo
{
string n; //normalne słowo
string q; //słowo od tyłu
public:
/*Slowo()
{
}*/
Slowo(string ... | ALGO | 0.998986 | 3.92384 | {
"github_metadata": {
"branch": "master",
"commit_count": 704,
"repo_created_at": "2016-02-14T07:41: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": "676d9705... |
8ca1f696-5745-4309-859d-52ec7c8f311b | annalaurams/Sistema-de-Autocompletar-e-Sugest-es-de-Palavras | src/avl.cpp | #include "./include/avl.hpp"
int cont = 0;
// AVL
// calcula a altura da subárvore
int height(AVL *alt) {
if (alt == nullptr)
return 0;
return alt->height;
}
int max(int a, int b) {
return (a > b) ? a : b;
}
AVL *newNode(WordInfo data) {
AVL *node = new AVL();
node->keyAVL = data;
node->leftAVL ... | ALGO | 0.996523 | 4.292275 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2023-09-13T00:39: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": "11bd2fedac1f... |
3068ceab-7888-4711-b2ed-45a18f877604 | niello/deusexmachina | DEM/Low/src/Render/ImageUtils.h | #pragma once
#include <StdDEM.h>
// API-independent image processing and attribute calculation utility functions
namespace Data
{
struct CBox;
}
namespace Render
{
struct CImageData;
enum ECopyImageFlags
{
CopyImage_AdjustSrc = 0x01, // States that src pointer must be adjusted to offset
CopyImage_AdjustDest =... | TOOL | 0.914654 | 6.814596 | {
"github_metadata": {
"branch": "master",
"commit_count": 3230,
"repo_created_at": "2015-09-09T06:21:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 25,
"forks": 2,
"issues": 19,
"pull_requests": 0
},
"file_meta": {
"content_id": "8ef2a... |
162bcf55-4fbb-4408-a42a-da7508a1a4c6 | Moidda/Lightoj | 1258_kmp.cpp | /*
lightoj 1258:
anncb aaababaaa ..... -> s
..... aaababaaa bcnna -> reverse of s
*/
#include <bits/stdc++.h>
using namespace std;
#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//... | ALGO | 0.99967 | 3.905755 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2020-11-14T18:04: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": "7d117b7527f0... |
db09aa7a-004d-4b2d-9d67-8db2eb17f07b | UScuber/Algorithm-Library | test/yosupo/Data-Structure/Range-Affine-Range-Sum.test.cpp | #define PROBLEM "https://judge.yosupo.jp/problem/range_affine_range_sum"
#include "../../../template/template.hpp"
#include "../../../SegmentTree/lazysegtree.hpp"
#include "../../../math/mint.hpp"
#include "../../../others/fastIO.hpp"
using mint = Mint<998244353>;
struct Data {
mint a, len;
};
struct Lazy {
min... | ALGO | 0.998747 | 5.566453 | {
"github_metadata": {
"branch": "main",
"commit_count": 205,
"repo_created_at": "2021-05-01T14:11:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "227b87141e... |
d6291add-615c-41eb-a931-384043c59d9f | kimsj0302/algorithm_study | algospot/FENCE.cpp | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int solve(int L, int R,vector<int> &fence) {
if (L == R) return fence[R];
int mid = (L + R) / 2;
int tmpmax = max(solve(L, mid, fence), solve(mid + 1, R, fence));
int height = min(fence[mid], fence[mid + 1]);
tmpmax = max(height * 2, tmp... | ALGO | 0.999946 | 4.192107 | {
"github_metadata": {
"branch": "master",
"commit_count": 36,
"repo_created_at": "2018-04-16T16:59:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ea957b56e... |
0292f2b3-7b43-4f50-98f4-ef86740b095b | aajjbb/contest-files | Red/ShoppingSpree.cpp | #include <bits/stdc++.h>
template<typename T> T gcd(T a, T b) {
if(!b) return a;
return gcd(b, a % b);
}
template<typename T> T lcm(T a, T b) {
return a * b / gcd(a, b);
}
template<typename T> void chmin(T& a, T b) { a = (a > b) ? b : a; }
template<typename T> void chmax(T& a, T b) { a = (a < b) ? b : a; ... | ALGO | 0.999768 | 4.009089 | {
"github_metadata": {
"branch": "master",
"commit_count": 892,
"repo_created_at": "2016-03-02T13:05:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b5028b73... |
273e01b2-e5a1-4602-8392-214aa76c865f | masaraksh79/ncqrs | RLScheduler.cc | //
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it wil... | ALGO | 0.987345 | 5.895382 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2017-03-07T10:31: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": "923b751014... |
ecc37a0b-e1b4-4be7-936e-532cf67b838f | plaveczlambert/nonlinearbubbledynamics | DEM/data_gen/data_gen.cpp | /* Bubble Dynamics with Chebyshev Spectral Collocation */
#include <iostream>
#include <fstream>
#define _USE_MATH_DEFINES
#include <cmath>
#include <vector>
#include <algorithm>
#include <random>
#include <string>
#include <sstream>
#include <chrono>
#include <thread>
#include <boost/numeric/odeint.hpp>
#include <Eig... | ALGO | 0.999798 | 3.743824 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2021-12-10T18:34: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": "a16437291067... |
a70ef999-82ef-4e22-83fc-a7c7a71c58f2 | akshaali/LeetCode- | 1502-can-make-arithmetic-progression-from-sequence/1502-can-make-arithmetic-progression-from-sequence.cpp | using namespace std;
class Solution {
public:
bool canMakeArithmeticProgression(vector<int>& arr) {
// // sort(arr.begin(), arr.end());
// int n = arr.size();
// if(n==1) return true;
// int min = INT_MAX, max = INT_MIN;
// for(auto a : arr){
// if(a>max) max = a;... | ALGO | 0.999929 | 5.654446 | {
"github_metadata": {
"branch": "main",
"commit_count": 2324,
"repo_created_at": "2022-08-07T07:48: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": "54d02fe0d... |
181666f4-b544-4e12-93eb-1f345a4d4e92 | strcoder4007/Codeforces-Solutions | Solutions/681-C/681-C-18953349.cpp | #include <fstream>
#include <iostream>
#include <string>
#include <complex>
#include <math.h>
#include <set>
#include <vector>
#include <map>
#include <queue>
#include <stdio.h>
#include <stack>
#include <algorithm>
#include <iomanip>
#include <list>
#include <ctime>
#include <memory.h>
#include <bitset>
#include <clim... | ALGO | 0.99918 | 3.119563 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2016-11-27T00:34:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4e3fd23de2... |
d77247b5-1971-4fdb-af8e-0d1468a4e088 | lokeshmogulla/SOC-CP | contests/C_1_Magnitude_Easy_Version.cpp | #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 int long long
#define double long double
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;
// *find_by_order, ord... | ALGO | 0.999775 | 4.40107 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2024-06-26T03:08:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "feb6c79f4b41... |
ddf4e89c-8607-4e1c-a57e-52e0c7ff693e | ishandutta2007/codeforces-e | egor.lifar/normal/1534/F2.cpp | /*
KAMUI!
*/
#include <iostream>
#include <complex>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <numeric>
#include <cstring>
#include <ctime>
#include <cstdlib>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered... | ALGO | 0.999927 | 3.81494 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:34: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": "ecb0f8aa2d88... |
60ab2b85-fc21-4b8d-b3a8-9a8086f7a77c | deltaintegrate/HPC | parcial I/jacobi.cpp | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <iostream>
#include <fstream>
#include <time.h>
#include <cstdlib>
#include <string>
#include <vector>
#include <ctime>
#include <numeric>
#include <cmath>
#include <sstream>
#include <thread>
#include <chrono>
#include <ctime>
#include <mutex>
#incl... | ALGO | 0.999891 | 5.0924 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2020-02-26T12:53: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": "6dcff96357... |
8efe506f-8317-4628-b5a6-ff387e70c7a5 | syc9612/BeakJun | Polynomial.cpp | #include <cstdio>
#define MAX_DEGREE 80
class Polynomial{
int degree;
float coef[MAX_DEGREE];
public:
Polynomial() { degree =0;}
void read(){
printf("다항식의 최고 차수 입력: ");
scanf("%d", °ree);
printf("각 항의 계수를 입력하시오 (총 %d개:) ", degree + 1);
for(int i=0; i<=degree;i+... | TOOL | 0.967974 | 3.508168 | {
"github_metadata": {
"branch": "main",
"commit_count": 43,
"repo_created_at": "2024-07-21T06:56:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0a6cbb3974d... |
27efd830-fe70-4b0b-a6fc-ae445aa07255 | shokushwaha/Striver-SDE-Sheet-Challenge-2023 | Binary Tree Part-III/Construct_binary_tree_from_inorder_postorder_traversal.cpp | int findpos(vector<int> in, int ele, int n)
{
for (int i = 0; i < n; i++)
{
if (in[i] == ele)
{
return i;
}
}
return -1;
}
TreeNode<int> *solve(vector<int> post, vector<int> in, int &idx, int inorderstart, int inorderend, int n)
{
if (inorderend < 0 || inorderstar... | ALGO | 0.999998 | 5.721948 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2023-06-19T06:15:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bd36dfc64a7... |
3b4159db-4df4-4d0f-9112-7c4bc5b3ad01 | CapTopGrade/SuperComp | MPI/11/11.cpp | #include <mpi.h>
#include <iostream>
int main(int argc, char** argv) {
MPI_Init(&argc, &argv);
int rank, size;
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_size(MPI_COMM_WORLD, &size);
const int dims[2] = {2, 2}; // Прямоугольная решетка 2x2
const int periods[2] = {0, 0};
MPI_Comm grid_... | ALGO | 0.999641 | 5.061338 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-01-19T08:21: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": "f6a0c810f861... |
9b36a897-916a-4746-ad8f-67fb536057d4 | Agony5757/SU2-Quantum | SU2-Quantum/SU2_CFD/src/solvers/CTransLMSolver.cpp | /*!
* \file CTransLMSolver.cpp
* \brief Main subrotuines for Transition model solver.
* \author <NAME>
* \version 7.0.6 "Blackbird"
*
* SU2 Project Website: https://su2code.github.io
*
* The SU2 Project is maintained by the SU2 Foundation
* (http://su2foundation.org)
*
* Copyright 2012-2020, SU2 Contributors... | ALGO | 0.998876 | 5.932359 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2021-11-24T06:18:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "eff051d52d31... |
6a9d767a-b475-43d4-b409-989f95590a2a | anshhxsinghh4666/Cpp-Programs-DSA | Chapter 8 (Arrays)/Reverse_Array.cpp | // WAF to Reverse an Array.
// Check Notepad for More info and notes.
#include <iostream>
using namespace std;
// Function Declaration :
void ReverseArray(int arr[], int n);
// n is size of array.
// Function Call :
int main() {
int arr1[] = {1, 2, 3, 4, 5};
int arr2[] = {1, 2, 3, 4, 5, 6, 7, 8};
Rever... | ALGO | 0.998939 | 5.802068 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-07-03T17:06: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": "a16e458f6e4c... |
2fb1ce8b-4c5c-4b9a-a5cd-d7bb020768e4 | Liuwt1997/Wangdao-OJ-Guide | 二叉排序树/例3-6.cpp | /*
判断两序列是否为同一二叉排序树
*/
#include <stdio.h>
#include <string.h>
struct BiTree{
BiTree *lchild, *rchild;
int data;
}Tree[110];
int loc;
char str1[25], str2[25]; //将后序与中序得到的字符串连接起来
int size1, size2; //保存在字符数组中遍历得到的字符个数
char *str; //当前字符串
int *size; //当前字符串的字符个数
BiTree *creat(){
Tree[loc].lchild = T... | ALGO | 0.999958 | 3.730759 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2020-04-16T03:48: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": "f35a8f4139... |
fad856be-6b66-4651-9d44-bc7a25474843 | ishandutta2007/codeforces-r | roki/normal/455/D.cpp | #define _USE_MATH_DEFINES
#include <iostream>
#include <cstdio>
#include <vector>
#include <cmath>
#include <list>
#include <iomanip>
#include <stack>
#include <map>
#include <set>
#include <queue>
#include <string>
#include <algorithm>
#include <iomanip>
#include <cstring>
#include <cstdlib>
#include <cassert>
#inclu... | ALGO | 0.999808 | 4.598413 | {
"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": "083abd17abbc... |
c174fca8-f690-4dd7-8883-d082296876fb | kyun1016/algorithm | 프로그래밍 대회에서 배우는 알고리즘 문제 해결 전략/28. 그래프의 깊이 우선 탐색/28.8 간선을 구분하는 깊이 우선 탐색의 구현.cpp | //#include<iostream>
//#include<vector>
//
//using namespace std;
//
////그래프의 인접 리스트 표현
//vector<vector<int> > adj;
////discoverded[i]=i번 정점의 발견 순서
////finished[i]=dfs(i)가 종료했으면 1, 아니면 0
//vector<int> discovered, finished;
////지금까지 발견한 정점의 수
//int counter;
//
//void dfs2(int here) {
// discovered[here] = counter++;
// ... | ALGO | 0.999262 | 4.278353 | {
"github_metadata": {
"branch": "master",
"commit_count": 169,
"repo_created_at": "2019-05-01T02:34: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": "c1edcdac... |
f4590100-5279-48e8-9aa3-002eb0431475 | Artelove/Code-Task | LeetCode/C++/1. Easy/9. Palindrome Number/9. Palindrome Number.cpp | #include <iostream>
#include <cmath>
using namespace std;
class Solution {
public:
bool isPalindrome(int x) {
int countNumbers = 1;
int counter = 2;
double xDublicate = x;
while (xDublicate / 10.0 >= 1){
xDublicate /= 10.0;
countNumbers++;
}
... | ALGO | 0.999826 | 4.728297 | {
"github_metadata": {
"branch": "main",
"commit_count": 71,
"repo_created_at": "2022-07-14T16:41:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2e5b7edb48f... |
e61c59fc-7b45-4e9a-bac7-857d742d660c | ishandutta2007/codeforces-k | ko_osaga/normal/739/E.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long lint;
const int MAXN = 2005;
int n, p, q;
double a[MAXN], b[MAXN];
pair<double, int> trial(double K){
vector<pair<double, int>> v;
double ret = 0;
int cnt = 0;
for(int i=1; i<=n; i++){
pair<double, int> ans1 = min(make_pair(1.0, 0), make_pair(b[i] ... | ALGO | 0.999949 | 3.822332 | {
"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": "7ed94f67596a... |
84e22870-0f90-47fe-a955-ba2e73906375 | mursalin117/Competitive-Programming | c++ program/codeforce B Divide Candies.cpp | #include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main()
{
/*unsigned long long n, m, i, j, coun = 0;
scanf("%ull%ull", &n, &m);
unsigned long long a[n];
if(m == 1) coun = n * n;
else
{
for(i = 0; i < n; i++)
{
a[i] = (i+1) * (i+1);
}
... | ALGO | 0.99958 | 3.266025 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2023-09-30T09:46: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": "d27f6a8b5... |
e33d8d7f-cb0d-4ffb-8a6c-8fed31e925ae | AnasImloul/Leetcode-Solutions | scripts/algorithms/F/Find the Longest Valid Obstacle Course at Each Position/Find the Longest Valid Obstacle Course at Each Position.cpp | class Solution {
public:
// ranking each element to make segment tree of small size
void compress(vector<int>& a){
vector<int> b=a;
sort(b.begin(),b.end());
map<int,int> mp;
int prev=b[0],rnk=0,n=a.size();
for(int i=0;i<n;i++){
if(b[i]!=prev){
pre... | ALGO | 0.999938 | 5.167134 | {
"github_metadata": {
"branch": "main",
"commit_count": 5405,
"repo_created_at": "2022-08-07T11:14:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 382,
"forks": 120,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "64b32... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.