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 |
|---|---|---|---|---|---|---|---|
6732f0b0-0ec0-4c85-b0e3-7c34a97de97a | theproudswan/yandex-coursera | white-belt/2-week/Автобусные.остановки.1.cpp | #include <iostream>
#include <string>
#include <vector>
#include <map>
using namespace std;
void All_buses(const map<string, vector<string>>& f) { //вывод всех маршрутов
if (f.size() == 0) cout << "No buses" << endl; //если размер контейнера = 0, то напишем что ничего нет
else { //если что-то есть
for ... | ALGO | 0.962644 | 4.534335 | {
"github_metadata": {
"branch": "main",
"commit_count": 116,
"repo_created_at": "2020-11-24T18:27:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9371089900... |
005d41af-95fc-4276-af41-6538e5341276 | Dcar0803/Hw2 | test.cpp | #include <iostream>
#include <cassert>
#include <string>
#include <sstream>
using namespace std;
// Duplicate function definition for testing purposes
void findMostCommonCharacter(const std::string& input){
int indexes[128] = {0};
// Iterate over each character in the input string
for (char character : ... | TEST | 0.990829 | 7.18796 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2024-09-20T03:01: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": "fae78af2f856... |
62281156-d82b-4a06-9866-4c53b996a2bd | RenatoBrittoAraujo/Competitive-Programming | UVa-Online-Judge/10141.cpp | #include <bits/stdc++.h>
using namespace std;
int main(){
int n,p,ca=1;
string s;
while(cin>>n>>p,bool(n+p)) {
if (ca!=1)cout<<endl;
getline(cin, s);
for (int i=0;i<n;i++)getline(cin,s);
double bp;
int c=-1;
string na;
for (int i=0;i<p;i++){
string pn;
double pr;
in... | ALGO | 0.989866 | 3.526813 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2019-05-14T01:40: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": "f870965d2f... |
c87c8828-a924-4c2b-b18a-73bf9b95d35a | arasHi87/OnlineJudgeExercise | poj2251.cpp | #include <iostream>
#include <queue>
#include <cstring>
using namespace std;
const int maxN=35;
struct Node {
int x, y, z, w;
// Node(): x(0), y(0), z(0) {};
Node(int a, int b, int c, int d): x(a), y(b), z(c), w(d) {};
};
int L, R, C, sx, sy, sz, ex, ey, ez, ans;
int mp[maxN][maxN][maxN];
int vis[maxN][maxN... | ALGO | 0.999838 | 4.300544 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2019-07-20T16:53: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": "4c1ee66a4f... |
5e92f461-fa8b-4633-9a61-9a3c7429b0a3 | GQH123/Renatus-ACM-Codes | Codeforces Global Round 8/1368/e/__e.cpp | #include <bits/stdc++.h>
#define rep(i, l, r) for (register int i = l; i <= r; i++)
#define per(i, r, l) for (register int i = r; i >= l; i--)
#define srep(i, l, r) for (register int i = l; i < r; i++)
#define sper(i, r, l) for (register int i = r; i > l; i--)
#define erep(i, x) for (register int i = h[x]; i; i = e[i].... | ALGO | 0.999883 | 3.728217 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2022-08-17T06:57: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": "561fc94353... |
ce9e4f6b-436b-4bf7-b8ae-c4b1e942d5cb | tarpit230/Data-Structures | LinkedList/DoublyLinkedList.cpp | #include<iostream>
using namespace std;
class Node {
public:
int data;
Node* prev;
Node* next;
Node(int d){
this -> data = d;
this -> prev = NULL;
this -> next = NULL;
}
~Node() {
int val = this -> data;
if(next != NULL) {
delete next;
... | ALGO | 0.999153 | 5.024035 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2025-02-22T13:49: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": "0d27387bd... |
65e0e416-e5ad-4878-85f5-ae20d3889ed9 | priyanka97588/programs | binary2.cpp | #include<iostream>
#include<bits/stdc++.h>
#include<cstdlib>
#include<ctime>
using namespace std;
parti_tion(int *a,int start,int last)
{
int pivot=a[last];
int i=start;
for(int j=start;j<=(last-1);j++)
{
if(a[j]<=pivot)
{
int c;
c=a[j];
a[j]=a[i];
... | ALGO | 0.999977 | 4.169322 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-02-02T10:50: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": "db16e23ea5... |
6e3ce04a-9ba3-41c8-94f8-cfc1f9e76476 | gutty333/Medium-Programming-Challenges | 54_StringExpression.cpp | // For this challenge you will convert a string of written numbers to an actual number.
/*
have the function StringExpression(str) read the str parameter being passed which will contain the written out version of the numbers 0-9 and the words "minus" or "plus" and convert the expression into an actual final number writ... | ALGO | 0.9999 | 5.413742 | {
"github_metadata": {
"branch": "master",
"commit_count": 29,
"repo_created_at": "2016-04-19T17:22:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 58,
"forks": 33,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "2048c97... |
612c8a57-566c-4714-9247-7cfdcd78fce2 | ishandutta2007/codeforces-a | aropan/normal/866/B.cpp | #include <iostream>
#include <cstdio>
#include <cassert>
#include <ctime>
#include <cmath>
#include <cstring>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
using namespace std;
#ifdef LOCAL
#define dbg(x) cerr << #x " = " << x << endl;
#includ... | ALGO | 0.999814 | 3.645733 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-04-11T00:51:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6f123b7d231a... |
36578291-9153-431c-82e6-4734b92c4f96 | YebinKim/Algorithm-Study | BaekJoon Online Judge/C++/Step11-Sorting/2751.cpp | //
// 2751.cpp
// Step11-Sorting
//
// Created by 김예빈 on 2019. 9. 6..
// Copyright © 2019년 김예빈. All rights reserved.
//
#include <iostream>
using namespace std;
const int MAX = 1000000;
int arr[MAX];
int tempArr[MAX];
// Using Sorting Algorithms with Time Complexity O(nlogn)
void merge(int, int, int);
void merge... | ALGO | 0.999988 | 5.776678 | {
"github_metadata": {
"branch": "main",
"commit_count": 244,
"repo_created_at": "2019-08-28T15:20:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5698b2dabc... |
06caf440-90c0-43eb-94cb-e769d80f960f | meonst/competitive-programming | c++/N-Queen.cpp |
#include <string>
#include <iomanip>
#include <utility>
#include <iostream>
#include <stdexcept>
#include <cmath>
#include <stdint.h>
#include <inttypes.h>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <vector>
#include <map>
#include <unordered_map>
#include <numeric>
#include <algorithm>
using... | ALGO | 0.99996 | 3.888251 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2023-01-29T08:47:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9f17e339ecb... |
e3e79d24-8363-4afa-8b2c-6ee3ab7c4e6c | Tagore22/algorithmSolve | algorithmSolve/백준/1439.cpp | #include <iostream>
using namespace std;
// 풀이.
// 입력받은 문자열의 각 원소를 순회하며 앞원소와 값이 두번 다를때마다 최종답 answer를 1씩 증가시켜
// 순회 후에 answer를 출력하면 된다. 첫번째 다를때에는 값이 바로 증가하지만 그 이후부터는 2번째부터
// 증가하기에 bool 변수를 이용하여야 했다.
// 자세한 설명은 주석으로 남긴다.
string str;
void MakeAnswer()
{
// 값의 변동을 체크하는 bool 변수.
bool isTrans = false;
int a... | ALGO | 0.999994 | 3.680172 | {
"github_metadata": {
"branch": "master",
"commit_count": 1452,
"repo_created_at": "2022-04-27T10:40:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7b56ad7... |
a95436db-5870-4bcd-80be-4659549b7b59 | Super-long/Summer-of-2019 | LZL/Solution/回溯/ZOJ-1002.cpp | //学到的东西 可以把一个二维数组抽象成线性 用整除和取余获取坐标
#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int bestn;
char map[10][10];
int n;
int canput(int row,int col)
{
int i;
for(i=row-1;i>=0;i--)
{
if(map[i][col]=='X')
{
break;
}
if(map[i][col]=='K')
{
retur... | ALGO | 0.999889 | 4.017516 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-09-23T02:03:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "babbcdc03e... |
2298c0e6-5089-46a4-963e-9f9a850b2b5e | google-deepmind/open_spiel | open_spiel/algorithms/policy_iteration.h | // Copyright 2021 DeepMind Technologies Limited
//
// 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 l... | ALGO | 0.999922 | 7.332213 | {
"github_metadata": {
"branch": "master",
"commit_count": 4660,
"repo_created_at": "2019-07-22T13:50:21.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4631,
"forks": 1006,
"issues": 17,
"pull_requests": 6
},
"file_meta": {
"content_id": "1... |
b6820b7d-89f3-40d5-a726-f5ce48cff06a | thejkane/AGM | libs/graph_parallel/example/breadth_first_search.cpp | // Copyright (C) 2004-2012 The Trustees of Indiana University.
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// Authors: <NAME>
// <NAME>
// <NAME>
// Exam... | ALGO | 0.999764 | 5.478056 | {
"github_metadata": {
"branch": "master",
"commit_count": 71,
"repo_created_at": "2018-02-18T21:10:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8270fdc9e... |
799ea870-fb42-434b-8033-65ba75300614 | 14-somil/cp | Contest/1847B.cpp | #include <iostream>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
int T;
cin >> T;
while (T--)
{
int n;
cin >> n;
ll int a[n];
ll int count = 0;
for (int i = 0; i < n; i++)... | ALGO | 0.999774 | 4.929751 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-08-13T13:50:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cb736cbb9a26... |
56bb9ef4-1a5d-4629-99ce-706bbc21397b | Barbariansyah/OOP-Tubes-1-Harvest-Moon | LinkedList.h | #ifndef LINKEDLIST_H
#define LINKEDLIST_H
#include <iostream>
template <class T>
class ListEl{
private:
T data;
ListEl *nextEl;
public:
ListEl(T newel){
data = newel;
nextEl = nullptr;
}
void setNext(ListEl *_nextEl){
nextEl = _nextEl... | TOOL | 0.992093 | 4.817831 | {
"github_metadata": {
"branch": "master",
"commit_count": 141,
"repo_created_at": "2019-03-10T06:39: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": "1d535372... |
4a1b879e-a7ee-4655-aa04-793327f58e56 | alexandraback/datacollection | solutions_5708921029263360_0/C++/paraschadha/sum.cpp | #include <bits/stdc++.h>
using namespace std;
vector<pair<long long, pair<long long, long long> > > arr;
vector<pair<long long, pair<long long, long long> > > ans;
bool check(pair<long long, pair<long long, long long> > p, long long K){
long long i, a=0, b=0, c=0;
for(i=0;i<ans.size();i++){
if(ans[i].first==p.fir... | ALGO | 0.999015 | 3.300707 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2017-03-08T11:33:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5b057ec50... |
204b037d-acd4-4697-98d0-bd8f2f06021b | tmastercoding/clang | USACO/Comps/SIlver2025Feb/s01.cpp | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int n, arr[1000000] = {};
int main(){
int t = 0;
cin >> t;
for(int c = 0; c < t; c++){
vector<int> comp, cur, out;
cin >> n;
for(int i = 0; i < n; i++){
cin >> arr[i];
comp.... | ALGO | 0.999996 | 4.431126 | {
"github_metadata": {
"branch": "main",
"commit_count": 28,
"repo_created_at": "2023-10-01T10:39:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "1275037f866... |
ec9a91f5-a23f-423d-b258-f067c2fbb509 | cheerconi/online-judge | poj/1769 Minimizing maximizer/main.cpp | #include <iostream>
#include <algorithm>
#include <limits.h>
#define leftnode (node<<1)
#define rightnode ((node<<1)|1)
#define getmid ((left+right)>>1)
using namespace std;
const int MAXN = 50000 + 10;
int tree[MAXN<<2], info[MAXN<<2], n;
void build (int node, int left, int right) {
if (left == right) {
tr... | ALGO | 0.999998 | 4.157506 | {
"github_metadata": {
"branch": "master",
"commit_count": 407,
"repo_created_at": "2017-07-19T16:20:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c54f6400... |
f9a41f7c-103b-4bab-9daf-48ce2f540a50 | jswigart/omni-bot | Omnibot/dependencies/WildMagic5/LibMathematics/Approximation/Wm5ApprCylinderFit3.cpp | // Geometric Tools, LLC
// Copyright (c) 1998-2012
// Distributed under the Boost Software License, Version 1.0.
// http://www.boost.org/LICENSE_1_0.txt
// http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
//
// File Version: 5.0.1 (2010/10/01)
#include "Wm5MathematicsPCH.h"
#include "Wm5ApprCylinderFit3.h"
... | ALGO | 0.999614 | 7.11923 | {
"github_metadata": {
"branch": "master",
"commit_count": 940,
"repo_created_at": "2015-03-15T01:21:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 80,
"forks": 23,
"issues": 5,
"pull_requests": 0
},
"file_meta": {
"content_id": "4567ec... |
7a9988cf-29b6-420e-aa4b-ca1e01f4f4c2 | naughtybear/leetcode | Q12/Q12.cpp | // 2022.04.29
// Runtime: 7 ms, faster than 78.70% of C++ online submissions for Integer to Roman.
// Memory Usage: 5.9 MB, less than 79.24% of C++ online submissions for Integer to Roman.
#include <bits/stdc++.h>
using namespace std;
class Solution {
public:
string intToRoman(int num) {
pair<int, char> r... | ALGO | 0.999852 | 5.766806 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2022-04-29T08:08: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": "80af68b8f88... |
b5b54228-4ce6-405a-b1da-0bdf7d4d2b08 | nguyenquivinhquang/competitive_programming | codeforces/problemset/368B.cpp | #include <bits/stdc++.h>
#define maxn 100002
using namespace std;
int n, m, lim = 0, dp[maxn];
vector<int> temp, a;
map<int, int> trace;
int encode(int x)
{
return lower_bound(temp.begin(), temp.end(), x) - temp.begin() + 1;
}
void compressed()
{
sort(temp.begin(), temp.end());
temp.resize(distance(temp.beg... | ALGO | 0.999986 | 3.849521 | {
"github_metadata": {
"branch": "master",
"commit_count": 116,
"repo_created_at": "2020-08-08T01:50:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e0a71456... |
e6c4f048-a953-4978-868d-c07f6cd2651f | algoboy101/LeetCodeCrowdsource | backup/source/cpp/[1177]构建回文串检测.cpp | //给你一个字符串 s,请你对 s 的子串进行检测。
//
// 每次检测,待检子串都可以表示为 queries[i] = [left, right, k]。我们可以 重新排列 子串 s[left], ..., s[ri
//ght],并从中选择 最多 k 项替换成任何小写英文字母。
//
// 如果在上述检测过程中,子串可以变成回文形式的字符串,那么检测结果为 true,否则结果为 false。
//
// 返回答案数组 answer[],其中 answer[i] 是第 i 个待检子串 queries[i] 的检测结果。
//
// 注意:在替换时,子串中的每个字母都必须作为 独立的 项进行计数,也就是说,如果 s[lef... | ALGO | 0.999946 | 6.149915 | {
"github_metadata": {
"branch": "master",
"commit_count": 194,
"repo_created_at": "2020-03-06T03:43:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 3,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "6adc9c63... |
a2bab04c-2ee9-4964-8430-f3682f93ffa3 | bqi343/cp-notebook | Contests/USACO Solutions/2012-13/Dec 2012/12 Dec G2.cpp | // #include<iostream>
#include<fstream>
#include<set>
#include<map>
#include<unordered_map>
#include<cmath>
#include<cstring>
#include<string>
#include<bitset>
#include<algorithm>
#include<vector>
using namespace std;
//using namespace __gnu_pbds;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> ... | ALGO | 0.999969 | 3.419601 | {
"github_metadata": {
"branch": "master",
"commit_count": 1350,
"repo_created_at": "2017-07-11T03:52:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2642,
"forks": 429,
"issues": 4,
"pull_requests": 0
},
"file_meta": {
"content_id": "b1... |
829de72f-cde0-42f2-8825-a2946686abbf | ChhYoung/Coding_Diary | LeetCode&PAT/PAT/ad_1003.cpp | #include<iostream>
#include<algorithm>
using namespace std;
int n,m,c1,c2;
// weight 最大点权和,num最短路径条数
int e[510][510], weight[510], dis[510], num[510],w[510];
bool visit[510];
const int inf = 9999999;
int main(){
cin>>n>>m>>c1>>c2;
for(int i=0; i<n; ++i){
cin>>weight[i];
}
fill(e[0],e[0]+510*510,... | ALGO | 0.999955 | 3.419335 | {
"github_metadata": {
"branch": "master",
"commit_count": 215,
"repo_created_at": "2019-03-29T05:07:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dcc7a360... |
6f8e091e-49f7-4825-af86-93dcef97764c | Harika-Dondapati/Computer-Networks | ipa.c++ | #include <stdio.h>
int main ()
{
int ipadd_old[4],ip_new_na[4],ip_new_ba[4];
int ref []={256,128,64,32,16,8,4,2,1};
int i,cidr,q,r,delta,temp1,temp2,temp3;
printf("Please enter ip address octet 1 by 1\n");
for(i=0;i<4;i++)
{
scanf("%d",&ipadd_old[i]);
}
printf("\nEntered ip addre... | ALGO | 0.997502 | 3.471203 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-01-04T04:48:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "55664406d891... |
30de2fb3-b52e-4204-ab55-edf54476ea2a | RamanjaneyuluErni/Data-Structures | LINKED LIST/ll queue as ll.cpp | #include<iostream>
using namespace std;
struct queue{
int sice;
int front;
int rear;
int element[20];
};
int dequeue(struct queue &q)
{if(q.front==-1)
{cout<<"queue is empty\n";}
else
{ int t;
t=q.element[q.front];
if(q.front==q.rear)
{q.front=-1;q.rear=-1;}
else
{q.front=(q.fro... | ALGO | 0.999741 | 3.865551 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2018-08-04T14:22: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": "3ef914d3e9... |
187e3a98-9521-469b-a687-d8b91f14c6fc | liyiling-zju/practice | practise/daliy practise/20-11-30/Eulersolver.h | #ifndef EULERSOLVER
#define EULERSOLVER
#include"Real.h"
#include<vector>
#include<algorithm>
template<class func>
class Eulersolver {
protected:
std::vector<Real> initial;
Real anwserT;
func rightf;
Real stepsize;
public:
Eulersolver(){};
Eulersolver(std::vector<Real>& init, func right)... | ALGO | 0.998878 | 4.912268 | {
"github_metadata": {
"branch": "master",
"commit_count": 68,
"repo_created_at": "2020-12-24T06:27:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d7b3328ff... |
7b2df0ac-3b6b-4974-acb8-e41cc21ae497 | GRBurst/gates | src/SimplexNoise.cpp | /*
* SimplexNoise.cpp
*
* Created on: Jan 26, 2016
* Author: adrian
*/
#include "SimplexNoise.h"
#include <iostream>
SimplexNoise::SimplexNoise()
{
// TODO Auto-generated constructor stub
}
SimplexNoise::~SimplexNoise()
{
// TODO Auto-generated destructor stub
}
SimplexNoise::SimplexNoise(int x, int y,... | ALGO | 0.989757 | 4.690294 | {
"github_metadata": {
"branch": "master",
"commit_count": 279,
"repo_created_at": "2015-11-16T15:59:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 11,
"pull_requests": 0
},
"file_meta": {
"content_id": "da579a5... |
29c6469c-02eb-4e8e-951d-3e826b280d01 | dreamerlee9489/DSA-CPP | LeetCode/game-of-life.cpp | /**
* @file game-of-life.cpp
* @author <EMAIL>
* @brief 289. 生命游戏
* @version 0.1
* @date 2022-08-06
* @link https://leetcode.cn/problems/game-of-life/
* @copyright Copyright (c) 2022
*
*/
#include <vector>
using namespace std;
class Solution {
int changeState(int row, int col, vector<vector<int>>& board) {
... | ALGO | 0.999848 | 6.236636 | {
"github_metadata": {
"branch": "main",
"commit_count": 272,
"repo_created_at": "2022-03-12T15:42: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": "05c8c75241... |
42d4bcf3-19ba-407d-8870-ade1566e7020 | mdally/Voronoi | src/VoronoiDiagramGenerator.cpp | #include "../include/VoronoiDiagramGenerator.h"
#include "../include/Vector2.h"
#include "Epsilon.h"
#include <algorithm>
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
void VoronoiDiagramGenerator::printBeachLine() {
treeNode<BeachSection>* section = beachLine->getFirst(beachLine->getRoot());
... | ALGO | 0.999616 | 3.938292 | {
"github_metadata": {
"branch": "master",
"commit_count": 68,
"repo_created_at": "2015-09-14T01:59:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 25,
"forks": 14,
"issues": 8,
"pull_requests": 0
},
"file_meta": {
"content_id": "df3cab9... |
ed3ca97b-f132-4773-8306-b151762a504d | theopan8/competitive-programming | USACO/lifeguards.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <cstdio>
#include <utility>
#include <queue>
#include <math.h>
#include <set>
#include <bitset>
#include <cmath>
#include <bitset>
#include <cstring>
#include <limits>
using namespace std;
#define maxn 100010
#define m... | ALGO | 0.999871 | 3.317664 | {
"github_metadata": {
"branch": "main",
"commit_count": 58,
"repo_created_at": "2021-07-17T17:53:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0cfcc9a7621... |
13e8e9e5-2fbd-4d6d-89d9-90fdc549aef3 | Igorjan94/CF | CodeForce/1326/E.cpp | // Igorjan94, template version from 13 October 2017. C++17 version, modified 18 march 2020 (writeln<tuple>, whole->all) {{{
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, m, n) for (int i = m; i < (int) (n); ++i)
#define ROF(i, m, n) for (int i = m; i >= (int) (n); --i)
#define forn(i, n) for (int i ... | ALGO | 0.99999 | 4.391999 | {
"github_metadata": {
"branch": "master",
"commit_count": 748,
"repo_created_at": "2014-04-24T20:52:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "826aa130... |
c4f7e6c1-938c-4bb4-a527-6859706fe645 | michalcz5/Informatyka-II-projekt-wizualizacja-rurociagu | Informatyka II projekt - wizualizacja rurociagu/main.cpp | //Informatyka II projekt - Wizualizacja rurociągu z systemem ręcznej i automatycznej symulacji pewnego procesu technologicznego
//Opis programu:
//Symulacja przewiduje zarówno sterowanie ręczne jak i automatyczne układu 5 zbiorników i systemu rur.
//Przewidziane są takie funkcjonalności jak : ręczny przesył dowolnej i... | TOOL | 0.963105 | 3.713356 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2025-01-05T21:51: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": "19f2c449ea3... |
cd63249e-e847-4e7c-b5f4-94323eee7b8a | XinShuoWang/FuckingAlgorithm | src/review/918.cc | //
// Created by <NAME> on 2021/11/20 15:06
//
/**
* _ooOoo_
* o8888888o
* 88" . "88
* (| -_- |)
* O\ = /O
* ____/`---'\____
* .... | ALGO | 0.998993 | 5.867908 | {
"github_metadata": {
"branch": "main",
"commit_count": 74,
"repo_created_at": "2021-07-28T04:04: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": "e2ef474291e... |
3ef9a873-916c-4eda-b74c-e6ee932e8bf1 | xdtianyu/android-8.0.0_r4 | external/skia/src/utils/SkShadowUtils.cpp | /*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkShadowUtils.h"
#include "SkCanvas.h"
#include "SkColorFilter.h"
#include "SkPath.h"
#include "SkRandom.h"
#include "SkResourceCache.h"
#include "SkShadowTessellator.h"
... | TOOL | 0.922702 | 3.433975 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2017-08-28T14:22:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 20,
"forks": 25,
"issues": 1,
"pull_requests": 1
},
"file_meta": {
"content_id": "6f54a6c... |
469a3e87-4d68-41ec-ad64-152701808a7f | protickcse22/Uva_problem | trainswp_299.cpp | #include<bits/stdc++.h>
using namespace std;
int arr[1000];
int main()
{
int n, a, b, temp, i, j, k, l;
cin >> n;
for(i = 0; i < n; i++)
{
cin >> a;
for(j = 0; j < a; j++)
{
cin >> arr[j];
}
int counter = 0;
for(k = 0; k < a - 1; k++)
{... | ALGO | 0.999959 | 3.444644 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-08-29T08:13: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": "dcd951d4ad... |
654b053d-d73b-4819-bd59-f9eb2c6b342c | TheDLCrimson/My-CP-journey | Python/CP/CSES/Trees/FenwickTree.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pll pair<long long, long long>
#define vll vector<long long>
#define vpll vector<pair<long long, long long>>
#define f first
#define s second
#define mod 1000000007
#define rep(i, a, b) for (long long i = a; i < b; ++i)
#define FIO ... | ALGO | 0.999778 | 4.232158 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2024-12-31T11:02: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": "60576b4790cd... |
04299b6a-42f3-4148-a948-183004c06f17 | ymatevva/FMI-UP | IS/ADPracticumsSeminars/Pract9SI/7thProblem.cpp | #include<iostream>
constexpr int MAX_SIZE = 100;
void getInput(int matrix[][MAX_SIZE], unsigned int n)
{
for (size_t i = 0; i < n; i++)
{
for (size_t j = 0; j < n; j++)
{
std::cin >> matrix[i][j];
}
}
}
void turnToRigth(int matrix[][MAX_SIZE], size_t length)
{
int tempMatrix[MAX_SIZE][MAX_SIZE];
for (... | ALGO | 0.999915 | 5.16458 | {
"github_metadata": {
"branch": "main",
"commit_count": 319,
"repo_created_at": "2023-07-03T08:21: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": "3f09111378... |
062648ff-9fd6-46d0-9e55-ad4a8397748d | CheungLiu/Coding | LeetCode/86.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
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:
ListNo... | ALGO | 0.999992 | 5.226364 | {
"github_metadata": {
"branch": "main",
"commit_count": 23,
"repo_created_at": "2021-03-25T07:08: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": "74b959a8e61... |
d8106c26-28e7-48ac-8a91-0e2f8f232247 | viennacl/viennacl-dev | viennacl/linalg/toeplitz_matrix_operations.hpp | #ifndef VIENNACL_LINALG_TOEPLITZ_MATRIX_OPERATIONS_HPP_
#define VIENNACL_LINALG_TOEPLITZ_MATRIX_OPERATIONS_HPP_
/* =========================================================================
Copyright (c) 2010-2016, Institute for Microelectronics,
Institute for Analysis and Scientific Comp... | ALGO | 0.998958 | 6.822679 | {
"github_metadata": {
"branch": "master",
"commit_count": 1482,
"repo_created_at": "2013-02-22T14:47:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 288,
"forks": 89,
"issues": 85,
"pull_requests": 4
},
"file_meta": {
"content_id": "f17... |
87bb200d-7656-441a-9b34-33b0ead06b49 | TsubaMukku/CompetitiveProgramming | 1_LeetCode/238_Product-of-Array-Except-Self.cc | class Solution {
public:
vector<int> productExceptSelf(vector<int>& nums) {
bool exist_zero = false;
bool more_than_two_zero = false;
int product = 1;
for (int i = 0; i < nums.size(); i++){
if (exist_zero == false && nums[i] == 0){
... | ALGO | 0.999964 | 6.350436 | {
"github_metadata": {
"branch": "master",
"commit_count": 342,
"repo_created_at": "2020-07-23T04:40: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": "fb94693f... |
f87c6c9b-0381-4e98-89d1-bd460d3d138b | Agony5757/SU2-Quantum | SU2-Quantum/SU2_CFD/src/iteration/CFEAIteration.cpp | /*!
* \file CFEAIteration.cpp
* \brief Main subroutines used by SU2_CFD
* \author <NAME>, <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 (cf. ... | ALGO | 0.999886 | 5.717106 | {
"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": "7e83452b6293... |
e316de75-291f-4375-b566-758d9dbd3e50 | orkhasnat/labtasks-and-stuff | labtask/4202/lab_6/6.cpp | #include <iostream>
#include <vector>
using namespace std;
int capacity = 1;
int current = 0;
void erase(int *&arr, int start, int finish)
{
int* tmp = new int[start];
int i = 0;
for (; i < start; i++)
tmp[i]=arr[i];
for (int j = finish; j < current; j++)
tmp[i] = arr[j];
delete[] ... | ALGO | 0.999274 | 3.809322 | {
"github_metadata": {
"branch": "master",
"commit_count": 129,
"repo_created_at": "2021-05-01T21:15:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ca3e2b14... |
251b6512-9460-491f-a42e-db17f9a6eaa3 | Tencent/ncnn | benchmark/RankCards/main.cpp | // Copyright 2017 Tencent
// SPDX-License-Identifier: BSD-3-Clause
#include <iostream>
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <cfloat>
#include "Rcards.h"
//---------------------------------------------------------------------------
using namespace std;
//------------------... | TOOL | 0.926674 | 5.29507 | {
"github_metadata": {
"branch": "master",
"commit_count": 3535,
"repo_created_at": "2017-06-30T10:55:37.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 21795,
"forks": 4291,
"issues": 1037,
"pull_requests": 82
},
"file_meta": {
"content_id"... |
b5d2be6a-ce10-420f-8f87-5c2071cfe2fb | ryotaro612/at_c | src/abc233/e.cc | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
template <typename T> void debug_vector(vector<T> v) {
cout << "[";
rep(i, v.size()) { cout << v[i] << ","; }
cout << "]" << endl;
}
string solve(string &x) {
string res;
vector<ll> digit... | ALGO | 0.999956 | 4.86702 | {
"github_metadata": {
"branch": "master",
"commit_count": 2006,
"repo_created_at": "2019-07-01T03:51: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": "dff0cbe... |
16ee22ac-2c9a-4af1-9237-89a6290583c9 | Aruko21/mimapr | lab_pa9/src/main.cpp | #include <iostream>
#include <vector>
#include <cmath>
#include <string>
#include <fstream>
#include <iomanip>
// Input signal settings
constexpr double In1_T = 1e-4;
constexpr double In1_A = 10.0;
// Scheme model settings
constexpr double L1 = 1e-3;
constexpr double C1 = 1e-9;
constexpr double C2 = 1e-9;
// Diode s... | ALGO | 0.999862 | 4.326747 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2020-06-07T01:59:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1c2b686c1... |
1933b287-6a5c-4a08-a72b-86604f475348 | bioinf-jku/coulomb_gan | tensorflow/ngram_language_model/ngram_language_model_cpp.cpp | #include "ngram_language_model_cpp.h"
#include <assert.h>
#include <cmath>
#include <iostream>
#include <limits>
#include <numeric>
namespace language {
using namespace std;
NgramLanguageModelCPP::NgramLanguageModelCPP(int n_in, int m_in)
: n(n_in),
m(m_in),
tree_memory_sparse(0),
tree_memory_d... | ALGO | 0.997724 | 6.606443 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2017-08-28T14:38:06.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 62,
"forks": 12,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "75e2f49d... |
584e9182-47fd-4d05-92f4-81dbeea3f7ff | dubwub/C-practice | competitions/10-23_upe_comp/class_ranges.cpp | #include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
#include <set>
using namespace std;
struct compare {
bool operator() (const pair<string, int>& lhs, const pair<string, int>& rhs) const{
return lhs.first >= rhs.fi... | ALGO | 0.999907 | 3.986736 | {
"github_metadata": {
"branch": "master",
"commit_count": 65,
"repo_created_at": "2016-02-19T21:59:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "5c57521a0... |
6ea77c6e-4fc6-43d4-a84c-0ecee89048a8 | koosaga/olympiad | ICPC/Korea/icpc24_h.cpp | #include <bits/stdc++.h>
using namespace std;
#define rng(i,a,b) for(int i=int(a);i<=int(b);i++)
#define rep(i,b) rng(i,0,b-1)
#define gnr(i,b,a) for(int i=int(b);i>=int(a);i--)
#define per(i,b) gnr(i,b-1,0)
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define bg begin()
#define edd ... | ALGO | 0.999938 | 3.63752 | {
"github_metadata": {
"branch": "master",
"commit_count": 361,
"repo_created_at": "2015-11-06T16:01:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 285,
"forks": 31,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e8dfe... |
fbd55318-1846-47d4-a966-e241e5ecc1d6 | Silvia331/210CT-Coursework | Basic 11/main.cpp | #include<iostream>
using namespace std;
class node
{public:
int value;
node *left,*right;
} *root,*tns, *tns1;
void add_node(node *&root,int v)
{if(!root)
{root=new node;
root->value=v;
root->left=root->right=0;
}
else
{if(v<root->value)
add_node(root->left,v);
else
if(v>... | ALGO | 0.999993 | 4.161631 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2016-12-02T02:38: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": "0d7f115b6... |
43cf59c3-eafe-45db-97a4-bea2270a4dd7 | PedroRonzani18/Programacao_Competitiva | LibOriginal/Materiais/Grafos/caminho_minimo/checar_I_J_(In)Diretamente_conectados.cpp | // Description: Verifica se o vertice i esta diretamente conectado ao vertice j
// Complexity: O(n^3)
const int INF = 1e9;
const int MAX_V = 450;
int adj[MAX_V][MAX_V];
void transitive_closure(int n) {
for (int k = 0; k < n; ++k)
for (int i = 0; i < n; ++i)
for (int j = 0; j < n; ++j)
adj[i][j] |... | ALGO | 0.999974 | 5.0085 | {
"github_metadata": {
"branch": "main",
"commit_count": 177,
"repo_created_at": "2023-03-05T13:29:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2369d7b182... |
e31211f2-9987-4932-8bfd-4c6712ef3847 | zxp397889178/Demo | Demo/CommonUI/Source/UISearchEdit.cpp | #include "StdAfx.h"
#include "UIEditEx.h"
#include "UISearchEdit.h"
#include <assert.h>
//////////////////////////////////////////////////////////////////////////
bool FindControlTest(CControlUI* pControl, LPVOID pData, UINT uFlags)
{
if (!pControl) return false;
if ((uFlags & UIFIND_VISIBLE) != 0 && !pControl->IsVi... | TOOL | 0.902094 | 3.840205 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2021-04-20T15:23: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": "f7206350d... |
1d3041d3-a984-4afe-85c5-d80dce753790 | WEGFan/Algorithm-Contest-Code | contests/2018牛客多校5/F.cpp | #include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
const int N = 1e5 + 7;
const int mod = 998244353;
struct Node
{
long long p, d, id;
} arr[N];
struct BIT
{
long long c[N];
void init()
{
for (int i = 0; i < N; i++)
c[i] = 1;
}
void add(int... | ALGO | 0.999774 | 4.821246 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2019-12-19T11:49:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d4a0a96f80... |
cc2ce1c4-6365-47fc-a69c-55d49705eb65 | zabolonkovd4/tutor-stuff | novikov/fifth/main.cpp | #include <iostream>
#include <time.h>
using namespace std;
int main()
{
int A[6][8];
srand(time(0));
cout << "Двумерный массив A[6,8] случайных чисел:" << endl << endl;
int sum = 0;
int max_elem = 0;
int row_max_elem, col_max_elem;
for(int i = 0; i < 6; i++)
{
for(int j = 0; j ... | ALGO | 0.995801 | 3.415066 | {
"github_metadata": {
"branch": "master",
"commit_count": 60,
"repo_created_at": "2021-09-24T21:51: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": "2d6943ba5... |
1f63e4af-f09b-4e4b-b761-99c3ecae8c8f | giriraj1995/CompetitiveCoding | DS & Algorithms/BS/Search in Bitonic Array/Search in Bitonic Array/main.cpp | #include <iostream>
#include <vector>
using namespace std;
int max_bitoni(vector<int> A, int i, int j)
{
int start = i;
int end = j;
while(i <= j){
int m = i + (j-i)/2;
if(m > start && m < end)
{
if(A[m] > A[m+1] && A[m] > A[m-1])
{
return m;
... | ALGO | 0.99998 | 4.551811 | {
"github_metadata": {
"branch": "master",
"commit_count": 791,
"repo_created_at": "2020-08-04T11:52:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a42ee0d6... |
d1d44141-0cf8-43a5-9357-e9069c167b36 | neuebot/NeueBot | joint_trajectory_controller/motion_through_points/motion_through_points_trajectory_generator.cpp | #include "motion_through_points_trajectory_generator.hpp"
#include <memory>
#include <iostream>
#include <fstream>
using namespace std;
using namespace Eigen;
MotionThroughPointsTrajectoryGenerator::MotionThroughPointsTrajectoryGenerator(const unsigned int &n_joints, const double &cycle_time, const double &max_vel,
... | ALGO | 0.986835 | 4.263494 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2019-10-27T18:59:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5fc18c59d9... |
491477ea-6fde-42a2-88aa-08ec1f30ffa0 | tiankonguse/ACM | contest/poj/vol_14/2325.cc | /*
Duze liczby z ustalana podstawa
*/
#include <iostream>
#include <vector>
#include <cstdio>
#include <algorithm>
#include <cstring>
using namespace std;
typedef unsigned long long digit;
#define MAXN 1111
#define MAX_DIGIT 1000000000
#define MAX_LENGTH 9 // MAX_DIGIT=10^MAX_LENGTH
class BigNum {
vector<digit> ... | ALGO | 0.999707 | 3.499812 | {
"github_metadata": {
"branch": "master",
"commit_count": 185,
"repo_created_at": "2013-03-25T04:04:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 69,
"forks": 40,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2e5a33... |
f9858c8f-28e5-4ac7-a096-22e16c87f5aa | miteshkumar77/LC | contains-duplicate-iii/Wrong Answer/9-2-2020, 10:49:54 AM/Solution.cpp | // https://leetcode.com/problems/contains-duplicate-iii
class Solution {
public:
bool containsNearbyAlmostDuplicate(vector<int>& nums, int k, int t) {
if (nums.size() == 0) {
return 0;
}
if (k == 0) {
return false;
}
map<int, int> mp;
... | ALGO | 0.999961 | 6.685551 | {
"github_metadata": {
"branch": "main",
"commit_count": 208,
"repo_created_at": "2022-04-18T23:13: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": "55e8c57746... |
2bbd8240-422a-4134-9d2b-b11b3a563112 | ishandutta2007/codeforces-s | stevenkplus/normal/474/B.cpp | // =========== Template ========== //
#include <bits/stdc++.h>
using namespace std;
int fastio() { ios_base::sync_with_stdio(false); cout << fixed << setprecision(10); cin.tie(nullptr); return 0; }
int __fastio = fastio();
template<typename T>ostream& operator<<(ostream& os, const vector<T>& v) { string sep = "{"; for ... | ALGO | 0.999949 | 4.277802 | {
"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": "1e12595f866e... |
6cbb0a04-44b7-4f5f-92fe-8d494663b508 | Alexsumaqie/Processus-decisionelle | Exercice 2/BEST_RESPONSE.h |
#ifndef _JESPDYNAMICPROGRAMMINGPLANNER_H_
#define _JESPDYNAMICPROGRAMMINGPLANNER_H_ 1
/* the include directives */
#include <iostream>
#include "Globals.h"
#include "PlanningUnitDecPOMDPDiscrete.h"
#include "JointPolicyPureVector.h"
class ValueFunctionDecPOMDPDiscrete;
class JointPolicy;
class IndividualBeliefJESP;
... | ALGO | 0.997196 | 6.981391 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-03-31T15:28:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "283b1cc10a6f... |
22b13556-02a4-4ec2-b049-169a8369f0ea | rotyan/data_structure | exper/array_exp1.cpp | //【完成版】顺序表的逆序
#include <stdio.h>
#define NUM 20
struct Array {
int length;
int data[NUM + 1]; //数据域,注意设置比原本长度大1,方便之后插入一个数值
}L;
void exchange() {
int temp;
//主要的算法代码,进行交换
for (int i = 0; i < (L.length)/2; i++) {
temp = L.data[i]; //中间变量temp存放要交换的数据
L.data[i] = L.data[L.le... | ALGO | 0.999928 | 4.180264 | {
"github_metadata": {
"branch": "master",
"commit_count": 154,
"repo_created_at": "2020-11-30T02:32: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": "eee2345c... |
fcabb400-ba2d-40d4-bd28-61fabe45e32e | shivanisorte/CollegeCodes | prefix.cpp | /* Program to construct an expression tree for a given prefix expressionand perform recursive and non-recursive traversals */
#include <iostream>
using namespace std;
struct TreeNode
{
char data;
TreeNode *left, *right;
} *root;
class StackNode
{
public:
TreeNode *tree_node;
StackNode *n... | ALGO | 0.999691 | 6.39288 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2021-06-04T20:42:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "baec98dba8d... |
09f0fe21-fedb-431c-9f89-76b163417c66 | sc0210/LeetCode-record | source/0141_Linked_List_Cycle.cc | /* 141 linked list cycle */
#include "listnode.h"
class Solution
{
public:
bool hasCycle(ListNode *head)
{
// Approach 1
// Handlde edge case
// if(head==nullptr) return false;
// if(head->next==nullptr || head->next->next==nullptr) return false;
// // At least two node... | ALGO | 0.999785 | 5.315638 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2025-06-22T12:46: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": "40dcc50b71f... |
42ed9567-898a-42d8-9ff2-6ef7141ae8c3 | dansalerno712/CS-182 | C++Sorts/startingPoint/merge.cpp | #include "sorting.hh"
template void Sortings<int, intintCompare>::merge(int*, unsigned int);
template void Sortings<int, intintCompare>::mergeRecurse(int*, int[], unsigned int, unsigned int);
template void Sortings<char*, strstrCompare>::merge(char**, unsigned int);
template void Sortings<char*, strstrCompare>::mergeRe... | ALGO | 0.99995 | 5.486555 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2015-09-29T15:19: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": "a629470dfa... |
34570811-4948-47f9-bc7e-11cd402b8e0f | WireCell/wire-cell-toolkit | patrec/inc/WireCellPatRec/paal/data_structures/bimap.hpp | //=======================================================================
// Copyright (c) 2013 <NAME>
// 2013 <NAME>
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//===========================... | ALGO | 0.917935 | 6.788739 | {
"github_metadata": {
"branch": "master",
"commit_count": 3515,
"repo_created_at": "2019-08-23T18:59:20.000Z",
"is_fork": true,
"is_org_owned": true,
"forked_from": "brettviren/wire-cell-toolkit",
"stars": 9,
"forks": 24,
"issues": 118,
"pull_requests": 4
},
"file_meta": {... |
40f0992a-0106-450b-b7d1-d534f0dd00cd | machine-solution/motion_planning_for_manipulators | src/joint_state.cpp | #include "joint_state.h"
#include <algorithm>
#include <stdexcept>
// return n % (2 * mod) in [-mod, mod)
int trueMod(int n, int mod)
{
n = n % (2 * mod);
if (n < -mod)
{
return n + 2 * mod;
}
else if (n >= mod)
{
return n - 2 * mod;
}
else
{
return n;
}... | ALGO | 0.910932 | 6.365752 | {
"github_metadata": {
"branch": "main",
"commit_count": 334,
"repo_created_at": "2023-03-03T18:08: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": "15915c9bb3... |
c48adca3-94a5-499a-aa91-8f2412d3acdb | ArtemioVibora/AdvProgram | Palindrome.cpp | #include <iostream>
using namespace std;
bool isPalindrome(char String[])
{
int tracker = 0;
for (int i = 0; String[i] != '\0'; i++)
{
tracker++;
}
char temp[tracker];
int tempTracker = 0;
for (int j = tracker - 1; j >= 0; j--)
{
temp[tempTracker] = String[j];
... | ALGO | 0.9904 | 3.990745 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-04-21T14:06:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9af9b891b1e7... |
6e272fe0-6810-4123-ae21-81c5657c2a96 | bakkalzade/dothraki-dictionary | Executor.cpp | //
// Created by salih on 22.12.2021.
//
#include "Executor.h"
void Executor::execute(string input, string output) {
string message ="";
Node root;
root.key="-61k"; root.value="-61v"; root.children.push_back(&root);//temporary root creation
vector<string> allInputLines = Helper::readFile(input);
... | ALGO | 0.998467 | 4.124703 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-08-18T08:46: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": "5084c10e274d... |
1c70b5a7-b210-4c2d-af97-80b4e8cc882b | phuoctan4141/c-cpp | Add a 16-bit integer to an 8-bit summand/Source.cpp | #include <iostream>
#include <bitset>
using namespace std;
void dissociate(unsigned short int n);
unsigned short int sum16bit(unsigned short int numA, unsigned short int numB);
int main()
{
unsigned short int result;
result = sum16bit(1560, 1564);
cout << "result : " << result << endl;
cout << "result : " <<... | ALGO | 0.985735 | 4.103134 | {
"github_metadata": {
"branch": "main",
"commit_count": 43,
"repo_created_at": "2022-04-12T17:22: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": "c25f6f8be3e... |
a79ba2cc-53c3-4a2b-bdcd-ed69f9093af2 | tum-vision/povar | src/rootba_povar/sc/linearization_varproj.hpp | //
// Created by Simon on 03/07/2023.
//
#pragma once
#include <mutex>
#include <Eigen/Dense>
#include <glog/logging.h>
#include <tbb/blocked_range.h>
#include <tbb/concurrent_unordered_map.h>
#include <tbb/parallel_for.h>
#include <tbb/parallel_reduce.h>
#include "rootba_povar/bal/bal_problem.hpp"
#include "rootba... | ALGO | 0.917521 | 6.69097 | {
"github_metadata": {
"branch": "main",
"commit_count": 32,
"repo_created_at": "2024-05-13T10:54:56.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 32,
"forks": 2,
"issues": 4,
"pull_requests": 0
},
"file_meta": {
"content_id": "53abd0c20a1... |
99796af7-606b-42d4-91ec-f834738a6837 | arnavdutta/CPP-All-I-Know | CPP_Advanced/map_container.cpp | /*
Maps are used to replicate associative arrays. Maps contain sorted key-value pair,
in which each key is unique and cannot be changed, and it can be inserted or deleted
but cannot be altered. Value associated with keys can be altered.
map<key_type , value_type> map_name;
*/
#include <iostream>
#include <map>
u... | TOOL | 0.960409 | 3.708682 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2020-05-25T20:17: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": "4992098f30... |
1910ce31-9fe3-42ab-adef-b7a2973791a6 | RiyaadHossain/XPSC-Practice | Contest/CodeChef/Starters 122/Arya_In_Grid.cpp | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#define ye "YES"
#define no "NO"
#define int long long
// Data Type
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<int,... | ALGO | 0.999773 | 4.970464 | {
"github_metadata": {
"branch": "main",
"commit_count": 76,
"repo_created_at": "2024-03-15T10:41: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": "a334717634f... |
36fef37f-92e4-4acb-b48f-2d6491c2b66c | linvis/leetcode | array/283_Move_Zeroes/solu.cpp | /*
* File name: solu.cpp
*/
/*
* 我这个解法有些迂腐,其实可以这么做,两个指针,一个指向0,
* 另一个指针遍历,遇到非0元素,直接覆盖另一个指针指向的0元素,
* 这样就可以实现把所有的非0元素移到前面了
*/
class Solution {
public:
void moveZeroes(vector<int>& nums) {
int size = nums.size();
int count = 0;
for (int i = 0; i < size;) {
if (count++ >= size... | ALGO | 0.999969 | 5.239676 | {
"github_metadata": {
"branch": "master",
"commit_count": 223,
"repo_created_at": "2017-10-23T05:08:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "43722fef... |
f69cfe8f-5477-4473-8dbd-77766886b596 | riribaker/coursework | string_algorithms/a_pigeon/pigeon.h | /**
* @file pigeon.h
* Approximate Pattern Matching using pigeonhole
*/
#pragma once
#include <string>
#include <vector>
#include <map>
#include <unordered_map>
#include <fstream>
#include <sstream>
#include <set>
// Type definitions used in this assignment
typedef std::unordered_map<std::string, std::vector<int>... | ALGO | 0.991222 | 5.698518 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2021-03-10T16:14:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "93a8bfb887e... |
e858f5b5-e279-45f6-91c9-1901ad026c6c | ishandutta2007/codeforces-s | social_zhao/normal/1582/F1.cpp | #include<bits/stdc++.h>
using namespace std;
int get() {
int x = 0, f = 1; char c = getchar();
while(!isdigit(c)) { if(c == '-') f = -1; c = getchar(); }
while(isdigit(c)) { x = x * 10 + c - '0'; c = getchar(); }
return x * f;
}
const int N = 1e5 + 5, S = 1025;
int n, a[N], f[N][S], bin[N], top;
int main() {
n ... | ALGO | 0.999965 | 3.697284 | {
"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": "1b524f81fa57... |
bbc9bd86-4948-482e-9f1a-6e1de48b3c53 | xmmmmmovo/MyAlgorithmSolutions | SophomoreAlgorithm/blueBrige2019/dfs & abstract dfs/dfs finer & min steps.cpp | /**
* author: xmmmmmovo
* generation time: 2019/03/20
* filename: dfs finer & min steps.cpp
* language & build version : C++ 11
*/
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <string>
using namespace std;
int n, m;
string maze[110];
bool vis[110][110];
int dir[4][2] = {{-1, 0}, {0, -1}, {1... | ALGO | 0.999969 | 3.822408 | {
"github_metadata": {
"branch": "master",
"commit_count": 152,
"repo_created_at": "2019-12-01T02:36: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": "9cfe5126... |
050eee1b-c9b6-4889-93ce-f6aa0eda0b02 | gonzaponte/Cplusplus | Simu/dynamics.cpp | #include "functions.h"
int main( void )
{
ReadRVA( (char*)"RVA1.dat" );
zeros( T , times);
zeros( Cv , times);
zeros( P , times);
zeros( alphaE, times);
zeros( Gamma , times);
zeros( kS , times);
const int stepsitimes = steps*itimes;
for (int i=0; i<times; ... | ALGO | 0.999799 | 3.278763 | {
"github_metadata": {
"branch": "master",
"commit_count": 31,
"repo_created_at": "2014-09-07T11:04:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "134743aa2... |
ed613b43-b7e0-458b-a6eb-acec07a328be | aryarajasa/class-task | experimental/konversi/konversi.cpp | /*
* Title : Konversi.
* Name : <NAME>
* Class : 18.IF.01
* NIM : 18.11.1869
*/
#include <iostream> // Menginputkan standar library c++ yang berisi, cin, cout.
using namespace std; // Memberi tahu program bahwa kita menggunakan namespace std tanpa ini kita menuliskan std:cout, maka itu kita menggunakan in... | TOOL | 0.945843 | 3.697625 | {
"github_metadata": {
"branch": "master",
"commit_count": 40,
"repo_created_at": "2018-11-13T12:26: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": "1e9e389ca... |
04bde48c-5f9a-44e5-98ca-cbfcad6fa332 | anandpanda/DSA | 101-remove-duplicates-LL.cpp | #include <iostream>
using namespace std;
class Node
{
public:
int data;
Node *next;
Node(int d)
{
data = d;
next = NULL;
}
~Node()
{
int value = data;
if (next != NULL)
{
next = NULL;
delete next;
}
cout << "De... | ALGO | 0.99953 | 5.077404 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2023-10-28T16:56: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": "34808dda06a... |
51788c33-5507-4827-bafe-7e5c8284a77c | kjbartel/magma | exp/control/get_nb.cpp | /*
-- MAGMA (version 1.6.1) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date January 2015
*/
// ==== Definition of blocking sizes for Tesla ===============================
#if (GPUSHMEM < 200)
/* ////////////////////////////////////////////... | TOOL | 0.998614 | 4.148852 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2015-06-04T17:28:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 23,
"forks": 3,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "6df71de0... |
be97f322-ed85-49aa-b5a9-c7952e601b19 | imtiazdeepto/XPSC-solved-Problem | Week-11/Day-5/Make_Odd.cpp | //
#include <bits/stdc++.h>
#include <iostream>
#define Code ios_base::sync_with_stdio(false);
#define By cin.tie(NULL);
#define ImtiazDeepto cout.tie(NULL);
using namespace std;
#define tc \
int x; \
cin >> x; \
while (x--)
#define yes cout << "YES" << endl
#define no cout << "NO" << endl
#define all... | ALGO | 0.999974 | 3.951543 | {
"github_metadata": {
"branch": "main",
"commit_count": 279,
"repo_created_at": "2024-10-27T12:19: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": "08d2caa683... |
e6e11025-0e8c-4ef1-b8b5-1b8af277cf51 | linkumokunn/code_la | CSES/1674.cpp | /*
=============================================================================
/\ \ / /\ |\ /| |===========
/ \ \ / / \ | \ / | |
/ \ \ / / \ | \ / | |
/ \ | / \ | \... | ALGO | 0.999771 | 3.326289 | {
"github_metadata": {
"branch": "main",
"commit_count": 104,
"repo_created_at": "2021-11-23T02:23:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2d13b452e2... |
b47d1160-2e48-4067-a5f5-08714123c617 | jiadaizhao/LintCode | 0001-0100/0022-Flatten List/0022-Flatten List.cpp | /**
* // This is the interface that allows for creating nested lists.
* // You should not implement it, or speculate about its implementation
* class NestedInteger {
* public:
* // Return true if this NestedInteger holds a single integer,
* // rather than a nested list.
* bool isInteger() const;
*... | ALGO | 0.999779 | 6.046521 | {
"github_metadata": {
"branch": "master",
"commit_count": 76,
"repo_created_at": "2017-10-02T03:48:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 72,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "75e69611... |
d028d78b-c151-4181-a967-0c061aa6c57b | oktorok/computatorv1 | src/main.cpp | #include "computator.h"
int set_flags(int argc, char **argv)
{
int j = 0,flags = 0;
for (int i = 0; i < argc; i++)
{
if (argv[i][0] == '-')
{
while (argv[i][j] == '-')
j++;
flags |= 1 << (argv[i][j] - 97);
}
}
return flags;
}
vector<monomio> reduce_form(vector<monomio> ecuacion)
{
if (ecuacion... | ALGO | 0.99931 | 3.923138 | {
"github_metadata": {
"branch": "master",
"commit_count": 46,
"repo_created_at": "2019-11-01T15:17: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": "02bcb980a... |
81604c88-6b30-46a7-889e-093ae4174d08 | singhsanket143/CppCompetitiveRepository | AdaLab/Greedy/KnapsackGreedy.cpp | #include <iostream>
using namespace std;
class Item
{
public:
int value, weight;
Item(int value, int weight) : value(value), weight(weight)
{}
};
bool cmp(struct Item a, struct Item b)
{
double r1 = (double)a.value / a.weight;
double r2 = (double)b.value / b.weight;
return r1 > r2... | ALGO | 0.99998 | 4.723881 | {
"github_metadata": {
"branch": "master",
"commit_count": 304,
"repo_created_at": "2018-06-26T07:06:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 348,
"forks": 160,
"issues": 1,
"pull_requests": 4
},
"file_meta": {
"content_id": "d617... |
982108ae-13ca-44d4-aff1-bcf68a27d977 | nnard1616/OSSU | Core_Theory/Algorithms_Illuminated/CPP/old_datastructures/unionFind.cpp | /*
* The MIT License
*
* Copyright 2018 <NAME>.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, ... | ALGO | 0.987301 | 5.599093 | {
"github_metadata": {
"branch": "master",
"commit_count": 68,
"repo_created_at": "2017-10-19T19:56: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": "09ae57a85... |
6ea13279-25c3-42e8-8dd0-787b9c57a1bc | Calebvh/Data-Struct-and-Algorithms | Documents/DataStructAlg/SortingAlgorithms.cpp | using namespace std;
#include <string>
#include <stdlib.h>
#include <iostream>
#include <vector>
#include <cstdlib>
#include <time.h>
#include <math.h>
int threshold;
////////////////////////
//Global Variables
std::vector<int> GlobalList;
int mergeCounter=0;
int quickCounter=0;
int insertCounter=0;
/////////////////... | ALGO | 0.99965 | 4.835587 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-12-16T17:13:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0471fd95d5... |
e0d97f39-2cd8-40a4-b8ec-11dc225f273b | MegaOwIer/CodeArchive | Codeforces/1001-1200/1188C.cpp | #include<bits/stdc++.h>
using namespace std;
using LL = long long;
const int MX = 1005, mod = 998244353;
int n, k, a[MX], dp[MX][MX], ans;
int main() {
ios::sync_with_stdio(false);
cin >> n >> k;
for(int i = 1; i <= n; i++) cin >> a[i];
sort(a + 1, a + n + 1);
a[0] = -100000;
for(int i = 1; i... | ALGO | 0.999983 | 4.728234 | {
"github_metadata": {
"branch": "master",
"commit_count": 235,
"repo_created_at": "2018-06-25T07:08:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bb67e8b2... |
fc393e48-2a70-419f-9b32-501a7bb3bb70 | Chris-J-Thib/TECH1102-Code | games/pong/pong.ino | struct Paddle {
const int
w = 4,
h = H/4;
int
pd,
x,
y = H/4+H/8;
draw(int p){
pd = p;
if(p == 1) x = 16;
else x = W-16-w;
tft.fillRect(x, y , w, h, BGC);
y = H/4+H/8;
move(0);
}
move(int d, int c = FGC){
tft.fillRect(x, y , w, h, BGC);
y += d;
tft.f... | ALGO | 0.959645 | 5.460289 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-12-04T00:53: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": "74536e960840... |
52f3885f-0f78-47ff-af73-a5b9b1f8be1a | rutuja-patil923/Data-Structures-and-Algorithms | Array/trappingRainwater.cpp | // Question Link: https://practice.geeksforgeeks.org/problems/trapping-rain-water-1587115621/1
// Difficulty Level : Medium
// e.g Input: {6,9,9} output: 0
// Expected Time complexity : O(N)
// Expected Space Complexity : O(N)
// Question Understanding : if we draw each bar or building and see how much water each bui... | ALGO | 0.999982 | 6.133709 | {
"github_metadata": {
"branch": "master",
"commit_count": 46,
"repo_created_at": "2021-03-02T05:52:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c7965af2b... |
a2bbb67e-5c23-4d75-8473-856bfab7450a | sauravchandra1/Leetcode | problems/group_anagrams/solution.cpp | class Solution {
public:
vector<vector<string>> groupAnagrams(vector<string>& strs) {
const int N = 26;
int n = strs.size();
vector<vector<int>> cnt(n, vector<int>(N, 0));
vector<vector<string>> ans;
for (int i = 0; i < n; i++)
for (auto& v : strs[i])
... | ALGO | 0.999996 | 6.59895 | {
"github_metadata": {
"branch": "main",
"commit_count": 636,
"repo_created_at": "2021-11-10T02:56: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": "f67a75a905... |
b37e7912-374c-4564-8419-406d43269c73 | Aki78/FlightAI | cpp/sketches_SDL/3D/test_VortexLattice.cpp |
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <vector>
#include <math.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_opengl.h>
#include "Draw.h"
#include "Draw3D.h"
#include "Solids.h"
#include "fastmath.h"
#include "Vec3.h"
#include "Mat3.h"
#include "Multipoles.h"
#include "PotentialFlow.h"
#in... | ALGO | 0.912284 | 3.411452 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2018-12-20T09:39:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5f9a87dfce... |
98f7c529-90f0-4e80-ab1d-788f40f658c1 | timmyjose-experiments/competitive-programming | lc/coreprep/implementation/practice_iterations/patterns_iterations_3/reverse_level_order_traversal.cpp | #include <algorithm>
#include <iostream>
#include <queue>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int val) : val(val), left(nullptr), right(nullptr) {}
};
TreeNode *build_tree(int curr_idx, const vector<... | ALGO | 0.999864 | 5.294878 | {
"github_metadata": {
"branch": "master",
"commit_count": 181,
"repo_created_at": "2022-06-14T11:32:15.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "85a551072... |
a1730e18-898b-4729-bd3c-4bb612e7e5d9 | davisking/dlib | examples/bsp_ex.cpp | // The contents of this file are in the public domain. See LICENSE_FOR_EXAMPLE_PROGRAMS.txt
/*
This is an example illustrating the use of the Bulk Synchronous Parallel (BSP)
processing tools from the dlib C++ Library. These tools allow you to easily setup a
number of processes running on different compute... | ALGO | 0.999724 | 6.112742 | {
"github_metadata": {
"branch": "master",
"commit_count": 8325,
"repo_created_at": "2014-01-29T00:45:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 14068,
"forks": 3436,
"issues": 41,
"pull_requests": 5
},
"file_meta": {
"content_id": ... |
9f43c470-f03e-4aa5-b5ff-b9e6906399aa | AxelPereyra965/tp_lab1 | ESTADISTICAS.cpp | #include <iostream>
#include <ctime>
#include <cstdlib>
#include <string>
#include <iomanip>
using namespace std;
// Declaración de funciones
void cargar_mazo(string mazo[][4], string numero_cartas[5], string tipo_palo[4]);
void elegir_nombres(string &nombre_j1, string&nombre_j2);
void repartir_cartas_j1(bool (&cart... | TOOL | 0.944543 | 3.492786 | {
"github_metadata": {
"branch": "principal",
"commit_count": 62,
"repo_created_at": "2023-10-16T12:33:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f7f5eb... |
24650a3e-9618-48ae-8265-868d3a8ee8ca | Keshav7891/Leetcode-Solutions | 126-word-ladder-ii/126-word-ladder-ii.cpp | #define VISITED(x) (steps[(x)] != INT_MAX)
static inline bool adjacent(string& a, string& b) {
const size_t len = a.length();
size_t i;
//find first difference
for (i = 0; i < len && a[i] == b[i]; i++);
//if a == b, now, i = len
if (i == len) return false;
//a != b, find second difference
for (i = i+1; ... | ALGO | 0.999984 | 5.874523 | {
"github_metadata": {
"branch": "main",
"commit_count": 2045,
"repo_created_at": "2022-04-23T11:26:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4b7f9aa11... |
78f5e86f-b4f4-473a-9716-92d821340fe3 | JoelGunawan/competitive-programming | codeforces/1600-1699/1646/e.cpp | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
int n, m;
cin >> n >> m;
// start from large to small, if there is a multiple of that number in the range, then we can not use it
// problem: 2^6 4^3 8^2
// how do we handle this?
// from small to large -> more easy, at most 19
... | ALGO | 0.999952 | 4.275698 | {
"github_metadata": {
"branch": "main",
"commit_count": 665,
"repo_created_at": "2021-06-06T04:24: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": "279811002b... |
3f16b424-3e84-422f-b78f-a9789eef5761 | Tron-Liu/cppWorkspace | LeetCode/lengthOfLIS.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
class Solution {
public:
int lengthOfLIS(vector<int>& nums) {
vector<int> dp(nums.size() + 1, 1);
int maxLen = 1;
for (int i = 1; i <= nums.size(); i++) {
for (int j = 1; j < i; j++) {
if ... | ALGO | 0.999907 | 5.199292 | {
"github_metadata": {
"branch": "master",
"commit_count": 29,
"repo_created_at": "2022-04-02T08:28: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": "da63e0ef7... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.