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 |
|---|---|---|---|---|---|---|---|
41527e27-a447-43ca-be22-ffb916f3cf60 | iayushvarshney/AYUSH_SUBMISSION | MAIN.CPP | /* Submission done by <NAME>
ON 14/July/2021
in C++14 */
#include<iostream>
using namespace std;
#include<math.h>
#include<string.h>
#include<map>
using namespace std;
//-------------------------------------------------------Function to convert dd/mm/yyyy to its corresponding day--------
string weekday[7] =... | ALGO | 0.99951 | 4.324837 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-07-13T20:46: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": "01a93e677f9a... |
73ad5300-e9dc-40f2-bec9-0d0e05e0e9a5 | yagee97/algorithm | BOJ/1520_내리막길.cpp | #include <cstdio>
#include<algorithm>
#include<memory.h>
using namespace std;
int n, m;
int input[501][501];
int dp[501][501];
int dx[4] = { 1, 0, -1, 0 };
int dy[4] = { 0, 1, 0, -1 };
int dfs(int x, int y)
{
if (dp[x][y] != -1)
return dp[x][y];
//값이 존재
if (x < 0 || x >= n || y < 0 || y >= m)
return 0; //범... | ALGO | 0.999925 | 3.351533 | {
"github_metadata": {
"branch": "master",
"commit_count": 263,
"repo_created_at": "2018-07-10T08:04: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": "a2f6640c... |
fbf41f6d-24de-44fe-8a46-7aa346f05b86 | cesarecorrea94/INE5418 | src/lamport.cpp | /*
* lamport.cpp
*
* Created on: 4 de jun de 2018
* Author: cesar
*/
#include "mpi/mpi.h"
#include <unistd.h>
#include <queue>
#include <cassert>
#include <algorithm>
#include "Main.hpp"
enum { Request, Concess };
const char* msgtag[] = {
[Request] = "Request",
[Concess] = "Concess",
};
void Bcast(int... | ALGO | 0.997904 | 4.331388 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-06-03T19:46:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "23647931b2... |
ca8ca232-81fe-4ce9-b858-e6c63f52112e | ishandutta2007/codeforces-m | milimnava/normal/1620/F.cpp | #include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
int main() {
ios::sync_with_stdio(false); cin.tie(0);
int T; cin >> T;
while (T--) {
int n; cin >> n;
vector<int> a(n), dp[2], pos(n + 1);
for (int i = 0; i <= 1; i++) dp[i].resize(n, INF);
for (int i = 0; i < n; i++) cin >> a[i], pos[a[i]]... | ALGO | 0.999979 | 4.015064 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-06-06T01:03:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fee18265426c... |
d71f0b5f-ac08-41b8-8582-aa50758f587c | ayanchyaziz123/all-competitive-programming-documents-and-problem-solving | codeforces/158__b.cpp | #include <bits/stdc++.h>
using namespace std;
#define N ((int)2e5 + 5)
#define ll long long int
#define INF 2e18
#define MAX_LL ((ll)1e18 + 5)
#define MAX ((int)2e9 + 5)
#define dbg(x) cout << #x << " = " << x << ln
const long long LIMIT = 1e18;
ll MOD = 998244353;
// Ayan's Code
int main()
{
#ifndef ONLINE_JUDGE
f... | ALGO | 0.999978 | 3.948265 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2020-08-24T10:43:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f75f4f400... |
b1700341-941f-4258-9af2-add676a7097c | sangjin256/BAEKJOON-ALGs | c++공부/2751수정렬하기2.cpp | #include <iostream>
#include <algorithm>
#include <stack>
int* buff;
void __mergeSort(int* a, int left, int right){
if(left < right){
int i, center = (left+right) / 2;
int p = 0, j = 0, k = left;
__mergeSort(a, left, center);
__mergeSort(a, center+1, right);
for(i = left;... | ALGO | 0.99998 | 4.959723 | {
"github_metadata": {
"branch": "master",
"commit_count": 484,
"repo_created_at": "2019-10-27T10:45: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": "9992d8a6... |
78980698-d94e-43f9-b174-a4caf7b4cfac | ishandutta2007/codeforces-e | eric_hooo/normal/201/D.cpp | #include <bits/stdc++.h>
using namespace std;
map <string, int> ID;
int nxt[500010][20];
int dp[1 << 15][110];
char buf[500010];
int a[500010];
string read() {
scanf("%s", buf);
return buf;
}
void chmin(int &a, int b) {
a = min(a, b);
}
int main () {
int n; scanf("%d", &n);
for (int i = 0; i < n; i++) {
stri... | ALGO | 0.998233 | 3.726939 | {
"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": "5750072d11c9... |
2a36ac86-f533-4561-8100-7fe4a566d97e | Meng-Lan/Lan | AOJ/2170.cpp | #include<iostream>
#include<cstdio>
#include<string>
#include<cstring>
#include<cstdlib>
#include<sstream>
#include<fstream>
#include<vector>
#include<list>
#include<deque>
#include<stack>
#include<queue>
#include<map>
#include<set>
#include<cmath>
#include<utility>
#include<numeric>
#include<iterator>
#include<algorit... | ALGO | 0.999935 | 3.471379 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2017-06-08T14:52: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": "398bf1932f... |
b98c8682-4cac-4384-a828-00e4b6d03030 | shubham-rawal/DSA-Personal | Queue/queue.h | //Implementation of a Queue data structure using an array of fixed size, which is input by the user.
class Queue{
//since we do not know the size of the fixed array, we use a pointer to the array
int *arr;
int cs;
int ms;
int front;
int rear;
public:
Queue(int default_size = 5){
m... | ALGO | 0.993298 | 4.348588 | {
"github_metadata": {
"branch": "master",
"commit_count": 41,
"repo_created_at": "2021-12-17T12:00:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "0a774de40... |
78026361-9133-49a6-a288-b677b851fdb8 | alexandraback/datacollection | solutions_5639104758808576_1/C++/Zacky/main.cpp | #include <iostream>
#include <algorithm>
#include <cstdio>
#include <memory.h>
#include <string>
#include <map>
#include <set>
#include <queue>
#include <vector>
#define ABS(x) ((x) >= 0 ? (x) : (-(x)))
#define MAX(a,b) ((a) > (b) ? (a) : (b))
#define MIN(a,b) ((a) < (b) ? (a) : (b))
using namespace std;
const int inf ... | ALGO | 0.999885 | 3.392195 | {
"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": "7a02d721c... |
9c307e6d-0659-4af2-82b0-106ddab25b36 | oanarosca/sources | campion/2014/canguri.cpp | nclude <fstream>
using namespace std;
int a, b[501], i, cmmmc2, n, ca, r, cmmdc, cb, maxim;
void cmmmc () {
ca = a; cb = b[i];
do {
r = ca % cb;
ca = cb; cb = r;
} while (cb != 0);
cmmdc = ca;
cmmmc2 = a*(b[i]/cmmdc); a = cmmmc2;
}
int main () {
ifstream fi("canguri.in");
ofstream fo("canguri... | ALGO | 0.999993 | 3.336299 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2016-04-18T19:30:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c4b0c1a39c... |
1cef8433-df12-45e6-88f2-353e6b85a10a | LasseD/uva | P162.cpp | #include <iostream>
#include <algorithm>
#include <deque>
#include <stdio.h>
#define VAL first
#define SUIT second
typedef std::pair<int,char> Card;
std::ostream& operator<<(std::ostream& os, const Card &obj) {
os << obj.VAL << obj.SUIT;
return os;
}
int ctoi(char c) {
switch(c) {
case 'A':
return 4;
c... | ALGO | 0.99945 | 3.604401 | {
"github_metadata": {
"branch": "master",
"commit_count": 886,
"repo_created_at": "2014-03-13T11:01:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "655f48da... |
27f0294c-d24a-4362-abd2-5e681883bfe1 | Aniganesh/100daysofcode | Rubik's_square.cpp | // https://www.hackerearth.com/practice/basic-programming/implementation/basics-of-implementation/practice-problems/algorithm/rubiks-square-2/submissions/
// 21-05-2020 Medium UnSolved
#include<bits/stdc++.h>
#define MOD % 1000000007
typedef long long ll;
using namespace std;
int main(){
cin.tie(false);
cout.... | ALGO | 0.999885 | 4.939898 | {
"github_metadata": {
"branch": "master",
"commit_count": 107,
"repo_created_at": "2020-03-27T10:30:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4d7ec53b... |
d1619b0b-a7de-4631-ab7b-2f9cce35897a | blessing333/CodingTest | Programmers/level3/광고삽입.cpp | #include <bits/stdc++.h>
using namespace std;
vector<string> convertString(string time,char delimeter){
stringstream ss(time);
string token;
vector<string> result;
while(getline(ss,token,delimeter)){
result.push_back(token);
}
return result;
}
int convertSecond(int hour,int minute,int ... | ALGO | 0.999291 | 5.007273 | {
"github_metadata": {
"branch": "master",
"commit_count": 380,
"repo_created_at": "2020-07-28T09:57: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": "a794ce6f... |
68313178-fb09-4453-b085-75150f443c3a | bot74/binary_search_tree | treepaint.cpp | #include "treepaint.h"
#include "ui_treepaint.h"
#include <QPainter>
#include <QIcon>
struct tNode
{
BinarySearchTree* treeNode;
int layer; //标记节点属于第几层
bool is_rchild; //标记节点是否为右孩子节点
};
TreePaint::TreePaint(QWidget *parent) :
QWidget(parent),
ui(new Ui::TreePaint)
{
ui->setupUi(this);
thi... | TOOL | 0.93431 | 4.532984 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2021-08-26T10:53: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": "b79de01a40... |
82fb4a3e-b652-48bc-94dd-ec45404c2753 | face2wind/CodingProjects | dataStructureAndAlgorithms/include/binarySearchTree.hpp | /*
* <one line to give the library's name and an idea of what it does.>
* Copyright (C) 2014 dream <email>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the Licens... | ALGO | 0.999621 | 4.408908 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2016-04-28T13:10: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": "333f6df07... |
a420bebd-cf0a-476c-b3ff-05af18c80d6e | BryanValeriano/marathon | codeforces/533div2/c_fastxp.cpp | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mk make_pair
#define fi first
#define se second
#define eb emplace_back
typedef long long ll;
typedef pair<int,int> ii;
typedef vector< pair<int,int> > vii;
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
typedef vector<vector<ll> >mat;
... | ALGO | 0.999956 | 4.073381 | {
"github_metadata": {
"branch": "master",
"commit_count": 188,
"repo_created_at": "2018-07-19T13:13: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": "1a395da4... |
605e5c8c-2288-4e11-a223-f7ddfa51e281 | Yejin427/BOJ | NotSolved/codetree.cc | #include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <cstring>
using namespace std;
vector<pair<int,int>> map[2001];
int ans[2001];
// vector<int> answer;
priority_queue<pair<int,int>, vector<pair<int,int>>, greater<pair<int,int>>> pq;
int rev[30001];
typedef pair<int, pair<int,int>> pii... | ALGO | 0.999643 | 4.229602 | {
"github_metadata": {
"branch": "main",
"commit_count": 23,
"repo_created_at": "2023-01-24T03:38: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": "9c3596fd695... |
add78a1e-f0bb-4dde-b9b3-5ff7109e6d30 | ishan-0803/code-it-out | CHALLENGE-(MERGE-LIST).cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb emplace_back
#define loop(i,s,n) for(ll i=s;i<n;i++)
#define test ll t ; cin>>t; while(t--)
#define MOD 1000000007
ll power(ll x, ll y, ll p)
{
ll res = 1;
x = x % p;
while (y > 0)
{
if (y & 1)
... | ALGO | 0.99999 | 5.101305 | {
"github_metadata": {
"branch": "master",
"commit_count": 22,
"repo_created_at": "2020-04-10T13:33: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": "1f2606d59... |
fd6f276c-bce0-4d27-9be6-67d9a1514f6c | kk-katayama/com_pro | Graph/Tree/lib/verify/AOJ_GRL5B.cpp | #include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#define rep(i,n) for(int i=0;i<n;++i)
#define rep1(i,n) for(int i=1;i<=n;++i)
using namespace std;
template<class T>bool chmax(T &a, const T &b) { if(a < b){ a = b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if(a > b)... | ALGO | 0.999932 | 4.269136 | {
"github_metadata": {
"branch": "master",
"commit_count": 269,
"repo_created_at": "2019-08-06T00:33:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dea2eb20... |
10a18b97-f937-4b0a-95cd-e976a5e9afa5 | abhradeepbarman/dsa-supreme | 1-Array/Lec-2/majorityElement.cpp | #include <bits/stdc++.h>
using namespace std;
// METHOD 1: Counting Method --> Brute Force
// Time complexity --> O(N^2)
// int majorityElement(vector<int> arr) {
// int n = arr.size();
// for(int i=0; i<n; i++) {
// int element = arr[i];
// int cnt = 0;
// for(int j=0; j<arr.size(... | ALGO | 0.999977 | 5.238998 | {
"github_metadata": {
"branch": "master",
"commit_count": 136,
"repo_created_at": "2023-03-11T19:00:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a3d1afeb... |
f738d805-b3eb-417f-8454-ab93cc268785 | klasdfiz/leetcode | palindrome_linked_list_234.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
//o(n)time o(n)space
ListNode* traverseList(ListNode* head)
{
if (!head)
return NULL;
if (!head->next)
return head;
ListN... | ALGO | 0.999951 | 6.097494 | {
"github_metadata": {
"branch": "master",
"commit_count": 73,
"repo_created_at": "2015-11-05T15:04: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": "4d877cea7... |
6241feeb-b71d-4c6f-b50a-cbce7cc5e985 | MrUglyHandsome/fw-AC79_AIoT_SDK_v1.2.0 | apps/common/example/third_party/awtk/awtk-widget/awtk-widget-rive/src/rive-cpp/src/constraints/ik_constraint.cpp | #include "rive/constraints/ik_constraint.hpp"
#include "rive/bones/bone.hpp"
#include "rive/artboard.hpp"
#include <algorithm>
#include <math.h> // M_PI
using namespace rive;
StatusCode IKConstraint::onAddedClean(CoreContext *context)
{
if (!parent()->is<Bone>()) {
return StatusCode::InvalidObject;
}
... | TOOL | 0.926163 | 6.394054 | {
"github_metadata": {
"branch": "SDK_v1.2.0",
"commit_count": 1,
"repo_created_at": "2024-11-26T18:46:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8bcb05... |
7d19e2bc-ff98-4aaf-ab81-20ef463b6ce6 | ishandutta2007/codeforces-p | peterr/normal/1148/B.cpp | #include <iostream>
using namespace std;
const int INFINITY = 2e9+3;
int solve(int* b, int m, int k, int cancelFirst, int tb, int* next)
{
if (cancelFirst < 0 || cancelFirst > k)
return -1;
int index = next[cancelFirst];
if (index == -1)
return INFINITY;
index += (k - cancelFirst);
... | ALGO | 0.999971 | 3.787035 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:49: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": "f59a7d29ab27... |
69eb3e45-2a54-4f4b-92e2-b7fe9bb312da | yosupo06/library-checker-problems | linear_algebra/hafnian_of_matrix/sol/bitdp.cpp | #include <algorithm>
#include <cassert>
#include <cstdio>
#include <numeric>
#include <vector>
using i64 = long long;
constexpr i64 MOD = 998244353;
bool parity(int x) {
bool ret = false;
while (x != 0) {
if (x % 2 != 0) {
ret ^= 1;
}
x /= 2;
}
return ret;
}
int main() {
int n;
std::sca... | ALGO | 0.999864 | 4.960582 | {
"github_metadata": {
"branch": "master",
"commit_count": 3115,
"repo_created_at": "2019-05-30T20:49:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 589,
"forks": 137,
"issues": 98,
"pull_requests": 3
},
"file_meta": {
"content_id": "a3... |
ca5be3ae-5cce-4ada-b35e-e16bf5bc4f6b | stg0123/baekjoonlearn | graph/tree/baekjoon1949.cpp | #include <iostream>
#include <vector>
using namespace std;
struct _node{
int parent;
int persons;
vector<int> child;
};
class prior_city{
private:
vector<_node> city;
vector<vector<int>> dp;
int N,root;
public:
prior_city(){
std::cin >> N;
city.resize(N+1);
set_person... | ALGO | 0.999562 | 3.897954 | {
"github_metadata": {
"branch": "main",
"commit_count": 278,
"repo_created_at": "2020-11-19T18:11:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "50a2457f30... |
832d7eff-5260-4774-ab97-c374b5e646c3 | swarajpande5/DSA-Implementations | Dynamic Programming/cherryPickup2.cpp | // Cherry Pickup II: https://leetcode.com/problems/cherry-pickup-ii/
/*
Intuition 1:
This is definitely a DP problem, as we have to solve similar subproblems,
and the answer requires a optimal substructure.
Intuition 2:
As robo1 and robo2 can move in 3 directions i.e. in downward row changes
... | ALGO | 0.999992 | 6.269788 | {
"github_metadata": {
"branch": "master",
"commit_count": 404,
"repo_created_at": "2020-12-27T12:55:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c52d0db9... |
06ffa4d0-c657-4562-a2d1-73efedb8ede7 | ecoon/ats-columns | src/pks/surface_balance/base/surface_balance_base.cc | /* -*- mode: c++; indent-tabs-mode: nil -*- */
/* -------------------------------------------------------------------------
ATS
License: see $ATS_DIR/COPYRIGHT
Author: <NAME>, <NAME>, <NAME>
DOCUMENT ME
Surface Energy Balance for Snow Surface and Ground Surface
Calculates Energy flux, rate or wate... | ALGO | 0.974345 | 5.52515 | {
"github_metadata": {
"branch": "master",
"commit_count": 2750,
"repo_created_at": "2017-07-06T11:51: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": "12787c4... |
eaca90cb-ae20-49ec-a8a5-7a9d6f697542 | mattjr/structured | spatialindex-src-1.6.1/regressiontest/rtree/Generator.cc | // Spatial Index Library
//
// Copyright (C) 2002 Navel Ltd.
//
// This library 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 2.1 of the License, or (at your option) any later vers... | ALGO | 0.995227 | 5.281374 | {
"github_metadata": {
"branch": "master",
"commit_count": 1457,
"repo_created_at": "2013-06-16T23:23:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 18,
"forks": 15,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "bfda6... |
528355e6-254e-40cd-a22d-0ea59aecd08f | Camithilwen/Code-Cloning-Analysis | src/llm-scripts/testing/Project_CodeNet_experimentation_dataset/data/p03828/s548818705.cpp | #include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
map < int, int > primes (int x) {
map < int, int > res;
for (int i = 2; i * i <= x; ++i) {
while (x % i == 0) {
x /= i;
++res[i];
}
}
if (x != 1)
++res[x];
return res;
}
signed main() {
ios_base::sync_with_stdi... | ALGO | 0.999949 | 4.96648 | {
"github_metadata": {
"branch": "main",
"commit_count": 243,
"repo_created_at": "2025-06-06T16:57:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "43effb7411... |
bfe23ddc-b713-4f94-8011-f55c4ce41d4b | sernanic/c- | proj03/proh03.cpp | #include <iostream>
using std::cout; using std::cin; using std::endl; using std::fixed;
#include<iomanip>
#include <math.h>
using namespace std;
long biggest_prime(long initial_input){
long x = 2;
while(initial_input >x ){
if (initial_input%x==0){
initial_input /= x;
x = 2;
... | ALGO | 0.999477 | 3.962147 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-01-15T14:49: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": "4b6e0d0fe6... |
97d68a74-e7e8-444d-8dfc-8de7cc75b561 | Challestend/challestends-code-set | LG/LGP2260.cpp | #include<cstdio>
#define re register
#define mod 19940417
#define min(a,b) ((a)<=(b)?(a):(b))
#define sum(a) ((1LL*(a)*((a)+1)>>1)%mod)
#define sqrsum(a) (((1LL*(a)*((a)+1)%mod)*(2*(a)+1)%mod)*I6%mod)
namespace cltstream{
#define LOCAL
#ifdef LOCAL
#define gc getchar
#else
#define size 1048... | ALGO | 0.999979 | 3.742452 | {
"github_metadata": {
"branch": "master",
"commit_count": 67,
"repo_created_at": "2018-08-17T05:30: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": "3cb828a3f... |
50145e54-9523-49a5-8c7a-1a8da2f0329a | AppledoreM/OI | PastFiles/Practice/String_Topics/Suffix_Problems/SPOJ-NSUBSTR.cpp | #include <iostream>
#include <stdio.h>
#include <algorithm>
#include <cstring>
#include <string>
#include <vector>
using namespace std;
const int maxn = 250005;
int ans[maxn];
class SuffixAutomaton{
public:
struct node{
int mx,cnt;
node *fail,*ch[26];
~node(){delete fail;}
node(int a = 0):mx(a),fail(NUL... | ALGO | 0.999972 | 3.631404 | {
"github_metadata": {
"branch": "master",
"commit_count": 175,
"repo_created_at": "2018-08-02T09:00:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7f0c1f4f... |
1c37c138-6fbb-4efd-ba3f-5e5a8b37308a | ayushgoyal415/CPP | My Questions/Bitwise Questions/Converting to binary form/main.cpp | #include <math.h>
#include <iostream>
#include <vector>
using namespace std;
vector<int> find_binary(int n) {
// Finding the [index] of most significant bit
int l;
if (n > 0) l = log2(n);
if (n <= 0) l = 31;
// Vector size required it equal to index of most significant bit + 1
//(to compensat... | ALGO | 0.99999 | 4.618012 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-09-11T13:55: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": "f63533b881e2... |
4627dc42-887e-4de8-aec0-1aae6ffbbf5a | ishandutta2007/codeforces-t | temotoloraia/normal/1312/B.cpp | #include <bits/stdc++.h>
#define F first
#define S second
#define mp make_pair
#define pb push_back
//#define ll __int128
#define ll long long
#define LEFT(a) ((a)<<1)
#define RIGHT(a) (LEFT(a) + 1)
#define MID(a,b) ((a+b)>>1)
#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))
#define y1 y122
//#defi... | ALGO | 0.999639 | 3.837766 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:27: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": "1158604c9358... |
511c0d78-6aab-4c50-96f3-e189b7c8376e | bqi343/cp-notebook | Contests/USACO Solutions/2015-16/Open 2016/Plat/landscape_dp.cpp | #include <bits/stdc++.h>
using namespace std;
//using namespace __gnu_pbds;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pi;
//typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> ordered_set;
#define FOR(i, a, b) for (int i=a; i<b; i++)
#define F0R(i, a) for (... | ALGO | 0.996797 | 3.590082 | {
"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": "27... |
ed1a9c3a-4b04-4b29-8b36-36f99d8f9b79 | 1119-2916/competitive-programming | atcoder/comp/ddcc/18/qual/b.cpp | #include <bits/stdc++.h>
using namespace std;
#define INF 1001000100010001000
#define MOD 1000000007
#define EPS 1e-10
#define int long long
#define rep(i, N) for (int i = 0; i < N; i++)
#define Rep(i, N) for (int i = 1; i < N; i++)
#define For(i, a, b) for (int i = (a); i < (b); i++)
#define pb push_back
#define eb ... | ALGO | 0.999836 | 3.512115 | {
"github_metadata": {
"branch": "master",
"commit_count": 164,
"repo_created_at": "2017-10-27T10:49:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ccf362a4... |
5a64625b-aa03-4c1a-9f0b-bb839f8de08a | EllieHyun/algorithmPS | merge_sort.cpp | // merge sorted ±¸Çö
#include <iostream>
using namespace std;
int sorted[9] = {0, };
void merge(int *arr, int start, int mid, int end) {
int i = start;
int j = mid + 1;
int k = start;
while (i <= mid && j <= end) {
if (arr[i] <= arr[j]) {
sorted[k] = arr[i++];
}
else {
sorted[k] = ar... | ALGO | 0.999992 | 5.374315 | {
"github_metadata": {
"branch": "main",
"commit_count": 136,
"repo_created_at": "2023-02-09T12:01: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": "aeb934a678... |
4ad24570-4682-48f4-9218-5fcfeacf519b | henrytsui000/online-judge | codeforces/CF_edu_35/pC.cpp | #include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-protector")
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using pdd = pair<ld,ld>;
#define IOS ios_base::sync_with_stdio(0); cin.tie(0)
#define endl '\n'
#define all(a) a.begin()... | ALGO | 0.999921 | 3.774844 | {
"github_metadata": {
"branch": "master",
"commit_count": 131,
"repo_created_at": "2019-12-10T01:10:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "2d0ca22d... |
8f3f8349-19df-4d50-88fa-0e9edcc906ef | harshkr70046/New-folder--2- | Array/largest.cpp | #include<iostream>
#include<bits/stdc++.h>
using namespace std;
void input_array(vector<int>&arr,int n){
for(int i=0;i<n;i++){
int num;
cout<<"\nenter the element of the array = ";
cin>>num;
arr.push_back(num);
}
}
void print_array(vector<int>&arr,int n){
for(int i=0;i<n;i++)... | ALGO | 0.999757 | 4.591705 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-10-25T08:35: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": "062fc6141c60... |
6f845413-9846-4c97-81ce-5d6006a11b47 | animesh9893/dsa_questions | majority_ele_2.cpp | // https://leetcode.com/problems/majority-element-ii/
#include <bits/stdc++.h>
using namespace std;
void display(vector<int> &v){
for(auto x:v){
cout<<x<<" ";
}cout<<endl;
}
// there is only 2 max possible element
vector<int> majorityElement(vector<int>& a) {
vector <int> result;
int candOne = (int)1e9 + 1... | ALGO | 0.999971 | 5.376528 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2022-04-12T05:28: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": "377b4c4fac7... |
98b3ad3c-bd24-4104-b75c-9b7761e2a268 | kushagra7589/codeforces-contests | round_424/C.cpp | #include <bits/stdc++.h>
using namespace std;
const int MAX_SIZE = 2e3 + 10;
set<int> S;
set<int> B
int C[MAX_SIZE];
int prefix[MAX_SIZE];
int main()
{
ios_base::sync_with_stdio(false);
int n, k;
int x;
cin >> n >> k;
int N = n;
vector<int> A;
for(int i = 1; i <= n; i++)
{
cin >> x;
if(x != 0)
{
A.... | ALGO | 0.999747 | 3.744215 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2017-09-21T05:19: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": "9e530de9cc... |
ef8d0143-dc1f-44f2-8f0a-10e97eab1b6e | karankulshrestha/System-Designs-and-Algorithms | hashtable.cpp | #include <bits/stdc++.h>
#include <cstring>
using namespace std;
struct node {
const char* key;
const char* value;
struct node* next;
};
void setNode(struct node* node, char* key, char* value) {
node->key = key;
node->value = value;
node->next = NULL;
};
struct hashMap {
int numOfElemen... | ALGO | 0.999709 | 5.462297 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2024-11-16T07:43: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": "5c9253490f... |
8d117d81-f5ce-4050-9348-b09b8f95d938 | Tora416/MultiCodeEmbed | dataset/dataset_raw/gcj_cpp/likecs/3264486_5654742835396608_likecs.cpp | /******************************************
* AUTHOR: <NAME> *
* INSTITUITION: <NAME>, PILANI *
******************************************/
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef long double LD;
typedef pair<int, int> pii;
typedef pair<LL, LL> pll;
set<i... | ALGO | 0.999955 | 3.424726 | {
"github_metadata": {
"branch": "master",
"commit_count": 57,
"repo_created_at": "2025-07-10T08:38:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "03e8c060c... |
c663f781-d61b-4875-8aa6-16bb49b08163 | ershehzan/Data-Structure | Linked-List/Remove Duplicate in List.cpp | #include <iostream>
using namespace std;
class Node {
public:
int data;
Node* next;
Node(int value) {
data = value;
next = NULL;
}
};
class Solution {
public:
// Function to remove duplicates from sorted linked list.
Node* removeDuplicates(Node* head) {
if (!head) retur... | ALGO | 0.999988 | 5.884377 | {
"github_metadata": {
"branch": "main",
"commit_count": 211,
"repo_created_at": "2025-04-14T06:09:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5355d889e9... |
36493e02-2613-467e-bf60-f8509ca470ab | cran/starma | src/RcppExports.cpp | // This file was generated by Rcpp::compileAttributes
// Generator token: <PASSWORD>
#include <RcppArmadillo.h>
#include <Rcpp.h>
using namespace Rcpp;
// starmaCPP
Rcpp::List starmaCPP(const arma::mat& data, const Rcpp::List& wlist, arma::mat arMat, arma::mat maMat, int iterate);
RcppExport SEXP starma_starmaCPP(SE... | ALGO | 0.972568 | 6.64887 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2015-12-16T05:22:04.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ec72f25c007... |
2bef2111-d6d1-438c-97b8-8847e3b962c7 | ishandutta2007/codeforces-t | timur_sitdikov/normal/38/F.cpp | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <map>
#include <set>
#include <string>
#include <algorithm>
#include <iostream>
#include <complex>
using namespace std;
#define pb push_back
const int maxn=30000, m... | ALGO | 0.999943 | 3.315892 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:27: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": "71bd7ee1d893... |
9faaa644-6a0f-4984-a53f-ee2466447216 | diwadd/sport | cf_increase_and_copy.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long int lli;
typedef unsigned long long int ulli;
typedef long double ld;
void left_just(string &s, int n, char c = ' ') {
while(s.length() < n) {
s = c + s;
}
}
template<typename T> void print_vector(vector<T> &vec) {
int n = vec.size... | ALGO | 0.999874 | 4.230869 | {
"github_metadata": {
"branch": "master",
"commit_count": 391,
"repo_created_at": "2019-11-23T18:43: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": "a3deca1a... |
b178188d-30eb-4713-bf95-f4e7b2a5f944 | sh4062/PAT | A/1073.cpp | #include<iostream>
#include<string>
#include<sstream>
using namespace std;
int main()
{
string str,num;
int exp;
cin >> str;
char sign = str[0];//符号位
int LocE = str.find('E');//找到E的位置
num = str[1];
num += str.substr(3,LocE - 3);//得到数字部分内容
exp = stoi(str.sub... | ALGO | 0.999468 | 3.814274 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2019-02-17T01:17: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": "489782516... |
92ea8cdd-6fb0-4f6e-a745-cf7f9ffe976b | JeanCho/Cpts223 | PA3-Sorting/instrumentedBubbleSort.h | /***************************************************************************
*
* Sorting algorithms and counting work - BS algorithm
* <NAME>, 2017 <<EMAIL>>
* For Educational use only
*
* This .h provides an instrumented bubblesort
*
*/
#ifndef __INSTRUMENTED_BS_H
#define __INSTRUMENTED_BS_H
#include <... | ALGO | 0.997491 | 5.168944 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-03-12T04:39:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b7a8d5dbd3... |
f7b21bc4-15b4-4db9-b086-262082c09a5b | mdshadesh/Codeforcesall-problem-solution- | Codeforces Round #809 (Div. 2)/Chopping Carrots (Hard Version).cpp | #include<iostream>
using namespace std;
int a[100010], premin[100010];
int main()
{
cin.tie(NULL); ios_base::sync_with_stdio(false);
int t, n, k;
int i, j, v, p, temp, ans;
cin >> t;
while (t--)
{
cin >> n >> k;
for (i = 1; i <= n; i++) cin >> a[i];
if (a[n] < k) { cout << "0\n"; continue; }
a[n + 1] = ... | ALGO | 0.999979 | 3.374684 | {
"github_metadata": {
"branch": "main",
"commit_count": 121,
"repo_created_at": "2022-06-15T17:40:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "38a9f37455... |
2f70d639-9071-4a70-9fd9-02f97b792b2b | mysql/mysql-server | extra/boost/boost_1_85_0/boost/geometry/strategies/cartesian/side_rounded_input.hpp | // Boost.Geometry (aka GGL, Generic Geometry Library)
// Copyright (c) 2021 <NAME>, Berlin, Germany.
// This file was modified by Oracle on 2023.
// Modifications copyright (c) 2023 Oracle and/or its affiliates.
// Contributed and/or modified by <NAME>, on behalf of Oracle
// Use, modification and distribution is su... | ALGO | 0.998818 | 7.407552 | {
"github_metadata": {
"branch": "trunk",
"commit_count": 186679,
"repo_created_at": "2014-09-26T09:31:03.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 11540,
"forks": 4072,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "... |
184726b6-8ac3-49a9-b12f-385d49f5e692 | prathyushpv/mlir2 | lib/Transforms/VectorizeOuterLoop.cpp | //===- LoopUnrollAndJam.cpp - Code to perform outerloop vectorization ---------===//
//
// Copyright 2019 The MLIR Authors.
//
// 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://... | ALGO | 0.985903 | 6.490937 | {
"github_metadata": {
"branch": "master",
"commit_count": 3160,
"repo_created_at": "2019-12-11T08:23:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "aa6f86d... |
f2c295f7-5bfb-48ba-8df0-a6cee58fe537 | muskan2099/Hashmaps-and-Heaps-Interview-Questions | building heap from arr.cpp | #include <bits/stdc++.h>
using namespace std;
void heapify(int arr[], int n, int i)
{
int largest = i;
int l = i*2 + 1;
int r = i*2 + 2;
if(l < n && arr[largest] < arr[l]){
largest = l;
}
if(r < n && arr[largest] < arr[r]){
largest = r;
}
if(largest != i){
... | ALGO | 0.99988 | 5.392301 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-06-25T12:36: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": "33f05e2020... |
6ff7292b-71a4-482e-9d1d-870ba0b7da1d | cms-sw/cmssw | CalibPPS/AlignmentRelative/src/IdealResult.cc | /****************************************************************************
* Authors:
* <NAME> (<EMAIL>)
****************************************************************************/
#include "CalibPPS/AlignmentRelative/interface/IdealResult.h"
#include "CalibPPS/AlignmentRelative/interface/AlignmentTask.h"
#i... | ALGO | 0.988993 | 6.008593 | {
"github_metadata": {
"branch": "master",
"commit_count": 251237,
"repo_created_at": "2013-06-26T14:09:07.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1144,
"forks": 4480,
"issues": 947,
"pull_requests": 108
},
"file_meta": {
"content_id... |
59570574-85ed-4bfa-84da-bd2ab8057a5c | anasrasyid/Competitive-Programming | URI Online Judge/String/1287.cpp | #include <iostream>
#include <string>
using namespace std;
int main(){
string s;
while(getline(cin,s)){
long long hasil = 0;
bool error = false;
bool cek = false;
int j = 0;
while(!cek && j <s.length())
if(s[j] == ' ' || s[j] == ',')
j++;
... | ALGO | 0.999196 | 3.389055 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2019-05-20T21:46: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": "2fcd4c2f45... |
6be36405-3c4a-4166-90fe-0f64693e15ff | M4573R/competitive-programming-archive | hackerrank/algorithms/search/sherlock_and_array.cpp | #include <iostream>
#include <vector>
using namespace std;
inline void use_io_optimizations()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
}
int main()
{
use_io_optimizations();
unsigned int test_cases;
cin >> test_cases;
for (unsigned int test {0}; test < test_cases; ++test)
{... | ALGO | 0.99965 | 5.106693 | {
"github_metadata": {
"branch": "master",
"commit_count": 1407,
"repo_created_at": "2015-09-01T07:44:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 29,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "613bb9... |
4553c035-d8fb-40b3-aef9-bebf47563250 | priyanshusingh017/Dsa-daily | pointer/pointer-3.cpp | #include<iostream>
#include<bits/stdc++.h>
using namespace std;
void update(int **p){
// p = p + 1;
// kuch hoga kya ?? -> no
// *p = *p + 1;
// kuch hoga kya ?? -> yes , it will increment the address stored in pointer ptr by size of int
**p = **p + 1;
// kuch hoga kya ?? -> yes , it ... | ALGO | 0.977106 | 3.520717 | {
"github_metadata": {
"branch": "main",
"commit_count": 172,
"repo_created_at": "2025-06-15T14:25: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": "a316c87a27... |
796c8ca5-404b-4948-8dcb-4295645f9e9d | cristovaozr/gr-Hamming-soft-decision | ProjetoFinal/itpp-implementation/rs.cpp | #include <itpp/itcomm.h>
using namespace itpp;
//These lines are needed for use of cout and endl
using std::cout;
using std::endl;
GFX formal_derivate(const GFX &f)
{
int degree = f.get_true_degree();
int q = f.get_size();
int i;
GFX fprim(q, degree);
fprim.clear();
for (i = 0; i <= degree - 1; i += 2) {
... | ALGO | 0.998189 | 4.799807 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2023-09-28T15:41:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 13,
"pull_requests": 0
},
"file_meta": {
"content_id": "2fd239c30b... |
cead7e59-0a96-4475-825d-5601f3d0d564 | kasa021/atcoder-archives | dp/dp_l_43272107_AC.cpp | /*
* Author: kAsA02
* Submission URL: https://atcoder.jp/contests/dp/submissions/43272107
* Submitted at: 2023-07-05 11:09:35
* Problem URL: https://atcoder.jp/contests/dp/tasks/dp_l
* Result: AC
* Execution Time: 183 ms
*/
#include <bits/stdc++.h>
#include <cmath>
#if __has_include(<atcoder/all>)
#include <... | ALGO | 0.999947 | 4.192878 | {
"github_metadata": {
"branch": "main",
"commit_count": 2004,
"repo_created_at": "2023-01-16T08:01:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "9c3cb87e9... |
5854db8f-4b90-4b37-a6e9-3f84be17c298 | mannmehta04/Data-Analysis-and-Algorithms | sorting_analysis.cpp | #include<random>
#include<iostream>
#include<chrono>
using namespace std;
using namespace std::chrono;
class analysis{
bool ascend=false;
bool desend=false;
int *dataSet;
int limit, sort_tech, sort_ord;
public:
analysis(){
cout<<"Enter limit of numbers: ";
cin>>limit;
... | ALGO | 0.998065 | 4.736154 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2023-07-06T16:18: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": "347150f5ce5e... |
b02b22da-c7cb-4bdd-b4de-3a24bfe10bfe | aryankonde/ai | assignment2_waterjug_bfs.cpp | #include <iostream>
#include <queue>
#include <set>
#include <tuple>
using namespace std;
struct State {
int four, three;
bool operator<(const State& other) const {
return tie(four, three) < tie(other.four, other.three);
}
};
void bfsWaterJug() {
queue<State> q;
set<State> visited;
... | ALGO | 0.999936 | 5.430043 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2025-05-18T07:18: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": "fa29e70d5096... |
2b95c3ee-4bd3-4cb0-900a-64ed6d053241 | DewanaGustavus/Algorithm-Cheatsheet | Graph Theory/Tree Algorithm.cpp | #include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5+5;
vector<int> adj[maxn];
int subtree[maxn]={};
void subtreedfs(int root, int prev = -1){
// Time Complexity : O(n + m)
subtree[root] = 1;
for(auto next : adj[root]){
if(next == prev)continue;
subtreedfs(next, root);
... | ALGO | 0.999767 | 4.115966 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2023-02-10T13:34: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": "6bb520a20cbe... |
cac8a574-bffb-4f64-ae45-38a3518979ea | QuangHack-bit/dominhhquang | son.cpp | #include <stdio.h>
#include <math.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>
int isPrime(int n) {
if(n <= 1) return 0;
for(int i = 2; i <= sqrt(n); i++) {
if(n % i == 0) return 0;
}
return 1;
}
int main() {
char s[10000];
gets(s);
int a[10000], n = 0;
char ... | ALGO | 0.999916 | 3.664301 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-12-21T11:02: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": "0043b4ca67b7... |
fa0edfce-1d3e-49a9-8b05-d05322b7f3df | ishandutta2007/codeforces-k | kirill22/normal/1249/B1.cpp | #include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
int q;
cin >> q;
while (q--) {
int n;
cin >> n;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
a[i]--;
}
vector<int> used(n, 0);
... | ALGO | 0.999975 | 4.090446 | {
"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": "2397fe7cd0d2... |
6456aa2f-0170-4546-a60a-ea0a7e6eec65 | jonassorgenfrei/convexHull3D | ConvexHullAlgorithm/ConvexHullAlgorithm/main.cpp | #pragma once
/*
* Sample program for convex hull calculation in 2-/3-Space
*
* Part of the seminar talk at FH Wedel 2018
*
* @author - <NAME>
* Minf101767
*/
//System Headers
#include <cstdlib>
#include <iostream>
#include <ctime>
#include <stdexcept>
#include <sstream>
#include <set>
//#include "dcel.h"
#... | ALGO | 0.981146 | 6.219343 | {
"github_metadata": {
"branch": "master",
"commit_count": 71,
"repo_created_at": "2018-08-04T18:35:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c8abf0ffd... |
a2ff01fd-e984-4629-8f9c-560c8c48fda1 | ishandutta2007/codeforces-d | dotorya/normal/891/B.cpp | #include <stdio.h>
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <complex>
#include <deque>
#include <functional>
#include <iostream>
#include <limits.h>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdlib.h>
#include <string.h>
#include <string>
#inc... | ALGO | 0.999994 | 3.833694 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:31:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "318577e26a23... |
f62367bc-e286-4fec-a25b-114e3af6d1ed | BasubhaTT54/progarmbb | CLASS TRIANGLE.cpp | #include <iostream>
#include <cmath>
using namespace std;
class Triangle
{
private:
float a, b, c, h;
public:
Triangle() {}
Triangle(float a, float b, float c)
{
this->a = a;
this->b = b;
this->c = c;
}
Triangle(float b, float h)
{
this->b = b;
this... | ALGO | 0.992439 | 5.339208 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-02-11T11:09: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": "07c928affa86... |
15c9f35e-224b-4499-97f6-1c66c97cc523 | PriyadharsanJ/STL | longest_palindrome.cpp | #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
// Function to check if a string is a palindrome
int isPalindrome(string str)
{
int n = str.length();
for (int i=0; i<n/2; i++)
{
if (str[i] != str[n-i-1])
{
return 0;
}
}
return 1;... | ALGO | 0.999713 | 5.231816 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2023-07-18T11:20: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": "0a10d0fe98a0... |
8300d840-7d2f-4d47-82d2-1bca375c7339 | alexmonteil/csci-3081w-personal | workshops/workshop1.cpp | #include <iostream>
#include <iomanip>
#include <string>
#include <vector>
using namespace std;
// Function converts a string to lowercase
string ToLowerCase(string inputString) {
string outputString;
for (char c : inputString) {
outputString += tolower(c);
}
return outputString;
}
// Functio... | TOOL | 0.995268 | 6.212238 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2024-02-07T01:32: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": "6c53b0ebca2... |
727726a5-a49e-44dc-90ad-925958734844 | KSB21ST/ps | barkingdog/Recursion/boj1780.cpp | #include <bits/stdc++.h>
using namespace std;
int cnt[3] = {0, 0, 0};
int board[2200][2200];
int paper(int n, int sr, int sc){
if(n == 1){
if(board[sr][sc] == 0){
cnt[0]++;
return 0;
}else if(board[sr][sc] == 1){
cnt[1]++;
return 1;
}else{
... | ALGO | 0.99992 | 4.173154 | {
"github_metadata": {
"branch": "main",
"commit_count": 91,
"repo_created_at": "2021-01-21T04:23:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "c9e98af2aec... |
342d1b0c-1782-46ec-a168-0c523b01777f | ck89119/Algorithm | AoC/2024/d1_p2.cpp | #include <bits/stdc++.h>
using namespace std;
#define dump(x) cout << __LINE__ << " : "<< #x << " = " << (x) << endl
#define clr(a, x) memset(a, x, sizeof(a)) //0:0, -1:-1, INF:0x3f, -INF:0xc0
#define mp(a, b) make_pair(a, b)
#define pb(a) push_back(a)
#define lowbit(x) x & (-x)
typedef long long ll;
typedef pair<i... | ALGO | 0.999835 | 4.049894 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2015-01-30T05:58:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "21f6810fe... |
9e1c2b64-ed73-4c5f-a6c3-521219a317ea | medvedevgroup/vargeno | src/BF.cc | #include "BF.h"
#include "Kmers.h"
#include "sbt_util.h"
#include <iomanip> //for std::setprecision
#include <iostream> //for std::ios::fixed
#include <jellyfish/file_header.hpp>
#include <sdsl/sfstream.hpp>
//#define USE_SIMPLE_TIMER // if this is defined, we use a second-resolution
// ... | ALGO | 0.988846 | 5.838418 | {
"github_metadata": {
"branch": "master",
"commit_count": 43,
"repo_created_at": "2017-12-23T05:46:36.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 21,
"forks": 4,
"issues": 5,
"pull_requests": 1
},
"file_meta": {
"content_id": "e01325106... |
c3a480af-5764-46d4-a97e-4a53af4cd42c | ishandutta2007/codeforces-l | lichenkoh/normal/1572/C.cpp | #ifdef ONLINE_JUDGE
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,popcnt,mmx,avx,avx2")
#pragma GCC optimize("Ofast")
#endif
#include "bits/stdc++.h"
#ifndef ONLINE_JUDGE
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,popcnt,mmx,avx")
#pragma GCC optimize("Ofast")
#endif
using namespace std;
ty... | ALGO | 0.999231 | 4.166187 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T06:17:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1c353cdd2186... |
f0b7ec26-7ac7-41e8-b301-43c13a3b3cf7 | leedongyull/Baekjoon | BaekJoon/2312 수 복원하기/2312 수 복원하기/소스.cpp | #include <iostream>
#include <cstring>
using namespace std;
bool prime[100011] = { false, };
int ind[100001] = { 0, };
void eratosthenes() {
memset(prime, true, sizeof(prime));
for (int i = 2; i < 10000; i++) {
for (int j = i * i; j < 10000; j += i) {
if (prime[i] == true) {
prime[j] = false;
}
else... | ALGO | 0.999863 | 3.761292 | {
"github_metadata": {
"branch": "main",
"commit_count": 74,
"repo_created_at": "2022-07-20T01:45:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ec8c84feebf... |
9c2d7def-8311-4c2a-a97c-3ea3f926f6df | Edddddddddy/data_structure | WDAlgorithm/deleteXinLink.cpp | /*
设计一个递归算法,删除一个不带头结点的单链表中所有值为x的节点
分析:
首先我们要创建单链表,并赋值,然后递归去判断值,进行删除
*/
// #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
struct Link
{
int value;
struct Link *next;
};
void deleteX(Link *&p, int delNum) {//这里的第一个函数参数必须是引用值,不然会导致断链
struct Link *pre;//定义一个指针,进行删除
if (p == NULL) return;
if... | ALGO | 0.999971 | 3.775838 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2021-09-10T13:52: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": "085ae2a5dbb... |
b5a1e469-9d25-4ef6-a916-ac4b627f9dd3 | bitsai/book-exercises | Accelerated C++/chapter13/Core.cc | #include "Core.h"
using namespace std;
std::istream& read_hw(std::istream& in, std::vector<double>& hw);
istream& Core::read_common(istream& in) {
in >> n >> midterm >> final;
return in;
}
istream& Core::read(istream& in) {
read_common(in);
read_hw(in, homework);
return in;
}
istream& Grad::read(istream&... | TOOL | 0.94321 | 3.407692 | {
"github_metadata": {
"branch": "master",
"commit_count": 224,
"repo_created_at": "2010-08-24T01:45:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 431,
"forks": 265,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f3d9... |
10a74850-d9a1-4b0f-8d09-55ded1544067 | aditya-mandothia/Dynamic-Programming--Aditya-Verma- | KNAPSACK/coin_change_problem.cpp | // In this question we have to find the minimum number of coins used to reach a sum and we have to tell the amount of ways
#include <bits/stdc++.h>
using namespace std;
int t[4][6];
int main()
{
int coin[] = {1, 2, 3};
int sum = 5;
int n = 3;
for (int i = 0; i < n + 1; i++)
for (int j = 0;... | ALGO | 0.999986 | 4.98167 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2022-07-18T15:15: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": "bcbf351b82... |
5aa31031-af9a-46c2-90b0-175434ba21df | YoonJihwan39/Algorithms-BOJ | Greedy algorithm/113399 ATM.cpp | #include <iostream>
using namespace std;
void quick_sort(int *array, int start, int end){
if(start >= end){
return;
}
int pivot = start;
int i = pivot+1;
int j = end;
while(i <= j){
while(i <= end && array[i] <= array[pivot]){
i++;
}
while(j > start ... | ALGO | 0.999974 | 4.550963 | {
"github_metadata": {
"branch": "master",
"commit_count": 171,
"repo_created_at": "2019-03-31T10:38:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4cf9f6c1... |
9c972990-7c32-4ba4-b21d-31495b12bcc0 | Jhoanisrq/CCOMP2-2-JHOANA | semana2/ejercicio 2.20/2.20.cpp | /*2.20(Diámetro, Circunferencia y Área de un Círculo) Escribe un programa que lea en el radio de
un círculo como un número entero e imprime el diámetro, la circunferencia y el área del círculo.
Utilice el valor constante 3.14159 para π. Realice todos los cálculos en las instrucciones de salida.
[Nota: En este capítul... | ALGO | 0.99836 | 3.754778 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2024-08-26T16:36: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": "f8e0e44cea5a... |
75fd8230-0049-429e-9db0-62e9a9ea4cd0 | nhh9905/Code-PTIT | TRR2/Graph/trr1011.cpp | #include <bits/stdc++.h>
#define ll long long
#define pii pair<int, int>
#define fi first
#define se second
using namespace std;
int n, m, cnt = 0, c[105][105];
vector<int> adj[105];
struct edge {
int x, y, w;
};
typedef struct edge edge;
vector<edge> edges;
void bai1() {
for (int i = 1; i <= n; i++)
cout << adj[... | ALGO | 0.99971 | 4.042471 | {
"github_metadata": {
"branch": "main",
"commit_count": 39,
"repo_created_at": "2025-04-21T08:38:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "938813ed584... |
dd8b7d3f-c27b-49bb-bd81-19ddf4f0cb05 | FreddyJS/AdventOfCode | 2020/Day2/main.cpp | #include <LinkedList.hpp>
#include <iostream>
#include <fstream>
#include <string.h>
using namespace std;
struct password {
char psswd[1024];
int minL;
int maxL;
char letter;
};
bool checkPass(struct password p) {
char* paux = p.psswd;
int count = 0;
while (paux != NULL) {
if (*p... | TOOL | 0.947906 | 3.54841 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2020-12-07T13:40: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": "697c47e082a... |
e082c5bb-dd59-455a-ba93-165f5fb58eac | BenyaminDelshad/project-euler | problem (250)/250.cpp | #include <iostream>
#include <algorithm>
using namespace std;
typedef long long ll;
const ll MOD = 1000 * 1000ll * 1000 * 1000 * 1000 * 10;
const ll MOD2 = 250;
ll ans, m[260260];
ll dp[250260][300];
ll pow(ll a, ll b) {
if(b == 0) return 1ll;
ll x = pow(a, b / 2);
x = (x * x) % 250;
if(b % 2 == 0)
return x;
x... | ALGO | 0.999676 | 3.915021 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2021-12-06T18:58: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": "1f54c3d8070d... |
a1568a81-4b14-44dd-bb94-3e352a112637 | Manikya-Sharma/problem-solving | cses/sorting_and_searching/nearest_smaller_values.cpp | /* *** METADATA
ON: 2025-02-11
BY: Manikya
*** */
#include <bits/stdc++.h>
using namespace std;
/* *** TEMPLATE *** */
const char nl = '\n';
typedef long long ll;
typedef long double ld;
#define sz(x) int((x).size())
typedef vector<int> vi;
/* *** DEBUG *** */
#ifdef LOCAL
#include "/home/manikya/programming/c/c... | ALGO | 0.999997 | 4.585078 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-04-30T11:17: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": "6a980d7bb272... |
45a89c36-1bae-4876-9499-ab56e1b10b71 | zSh3rl0cK/Algoritmos-1. | Homework moodle/Vetor/escola mundial.cpp | #include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int numAlunos; //numero de alunos
int notas[100]; //notas
int i; //contador
float media; //media da turma
int soma; //soma das notas
int alunosAbaixo; //alunos com nota abaixo da media
int alunosAcima; //alunos com nota acima da media
... | ALGO | 0.997008 | 4.077928 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2025-02-10T19:50:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "aa8611f4a4df... |
715a8fa1-84fc-47fc-99b4-88c92546f226 | FlancyE/Code-training | C++/School/0226/CH3/precision3.cpp | #include <iostream>
#include <iomanip>
using namespace std;
int main()
{
double a = 12.345, b = 12345.6789, c = 123.456;
cout << fixed << right << setprecision(2);
cout << "向右靠齊" << endl;
cout << setw(10) << a << setw(10) << b << setw(10) << c << endl;
cout << setw(10) << b << setw(10) << c << setw... | ALGO | 0.998121 | 3.242762 | {
"github_metadata": {
"branch": "master",
"commit_count": 95,
"repo_created_at": "2023-12-21T08:10: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": "71f1da9e8... |
cf427fd3-2e13-45d6-9804-d3b8314650f8 | withtahmid/cp | NSUPS/DigitDP/P.cpp | #include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include <debug.h>
#else
#define dbg(...)
#endif
const int maxDigit = 12;
int64_t dp[maxDigit][2][2][100];
int64_t fn(const string& L, const string& R, int pos, int LT, int RT, int sum){
if(pos == -1){
return sum;
}
int64_t& res = dp[pos... | ALGO | 0.996512 | 4.902336 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2023-09-24T11:00: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": "2130b3b9b33... |
e0520db8-507c-4e99-8599-5b26e89b1e9a | magdyhasan/competitive-programming | uva-/uva 537 - Artificial Intelligence.cpp | #include<stdlib.h>
#include<stdio.h>
#include<cstring>
#include<string>
#include<vector>
#include<algorithm>
#include<sstream>
using namespace std;
char li[1000500];
int ty[2];
double va[2];
int main(){
freopen("uva.txt","rt",stdin);
int T;
scanf("%d", &T); gets(li);
for (int tc = 1; tc <= T; tc++) {
gets(l... | ALGO | 0.978675 | 3.372658 | {
"github_metadata": {
"branch": "master",
"commit_count": 222,
"repo_created_at": "2017-01-29T00:35:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 3,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "0263e4c3... |
a7b0acc9-4107-4a7e-a742-5aa57322fc40 | Martozar/pattern_follower | src/kalman_filter.cpp | #include <iostream>
#include <pattern_follower/kalman_filter.h>
KalmanFilter_::KalmanFilter_(const cv::FileNode &fn) {
/**
* F = [1 0 dt 0;
* 0 1 0 dt;
* 0 0 1 0;
* 0 0 0 1]
*/
/**
* H = [1 0 0 0;
* 0 1 0 0]
*/
F = (cv::Mat_<double>(4, 4) << 1.0, 0.0, 1.0, 0.0, 0.0, 1.... | ALGO | 0.941748 | 6.124311 | {
"github_metadata": {
"branch": "master",
"commit_count": 51,
"repo_created_at": "2016-12-12T22:10:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "3ba705752... |
e904fc33-f3b1-46d9-9134-c270dc1d0f1e | AbdulRehman7590/PF-Lab-tasks | pfweek7/task07.cpp | #include <iostream>
using namespace std;
void printPercentage(int num);
int main()
{
int number;
cout << "Enter number :";
cin >> number;
printPercentage(number);
}
void printPercentage(int num)
{
int p1=0, p2=0, p3=0, p4=0, p5=0;
for(int x = 1; x <= num ; x=x+1)
{
int number;
... | ALGO | 0.939385 | 3.697248 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2023-03-23T06:13: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": "0cf8d7b1d... |
29a659a2-a7cf-4aec-90ab-b8a2e2cf63a9 | yanhuanwang/interview | leetcode-master/CombinationSumII/CombinationSumII.cpp | //============================================================================
// Given a collection of candidate numbers (C) and a target number (T),
// find all unique combinations in C where the candidate numbers sums to T.
//
// Each number in C may only be used once in the combination.
//
// Note:
// All numbers (... | ALGO | 0.999957 | 6.434659 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2015-07-22T15:10:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0f2d684f6a... |
9c820f84-47db-4a0f-a9bb-7093910a593a | amchp/CompetitivePrograming | Contest/Algo6:25:2024/D_-_D.cpp | #include <bits/stdc++.h>
#define fi first
#define se second
#define forn(i,n) for(int i=0; i< (int)n; ++i)
#define for1(i,n) for(int i=1; i<= (int)n; ++i)
#define fore(i,l,r) for(int i=(int)l; i<= (int)r; ++i)
#define ford(i,n) for(int i=(int)(n) - 1; i>= 0; --i)
#define fored(i,l,r) for(int i=(int)r; i>= (int)l; --i)... | ALGO | 0.999712 | 3.979054 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2023-11-17T14:54: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": "a4285f781c3a... |
a3c34a2a-5ad5-476d-8203-fba52f1034bc | mixxxdj/mixxx | src/engine/filters/enginefilterbessel4.cpp | #include "engine/filters/enginefilterbessel4.h"
#include "moc_enginefilterbessel4.cpp"
#include "util/math.h"
namespace {
constexpr char kFidSpecLowPassBessel4[] = "LpBe4";
constexpr char kFidSpecBandPassBessel4[] = "BpBe4";
constexpr char kFidSpecHighPassBessel4[] = "HpBe4";
} // namespace
EngineFilterBessel4Low::E... | ALGO | 0.946644 | 6.375373 | {
"github_metadata": {
"branch": "main",
"commit_count": 50813,
"repo_created_at": "2013-05-17T15:14:38.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5640,
"forks": 1443,
"issues": 2278,
"pull_requests": 297
},
"file_meta": {
"content_id":... |
5874d176-773b-4bf3-a343-65cf661a1c56 | vucongtuanduong/dsa-codeptit | submit/algo-design/backtrack/dsa02012/dsa02012_1.cpp | #include <bits/stdc++.h>
using namespace std;
int res;
void testCase();
void Try(vector<vector<int>>a, int n, int m, int i, int j);
int main() {
// Write your code here
int t;
cin >> t;
while (t--) {
testCase();
cout << endl;
}
return 0;
}
void Try(vector<vector<int>>a, int n, in... | ALGO | 0.999736 | 3.950373 | {
"github_metadata": {
"branch": "main",
"commit_count": 682,
"repo_created_at": "2023-12-21T11:07:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "deb3e6e215... |
4930f5aa-f419-4f0b-88ed-70d9657155c9 | uchihadark/CloneForces-My-Submissions | 416/B.cpp | #include <bits/stdc++.h>
const long long mod = 1e9 + 7;
#define int long long
#define pi pair<int,int>
#define vi vector<int>
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
#define pb push_back
#define mp make_pair
#define FAST_IO ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define TIME cerr <... | ALGO | 0.999981 | 3.511439 | {
"github_metadata": {
"branch": "main",
"commit_count": 1077,
"repo_created_at": "2022-05-11T10:43: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": "d99495f05... |
8364e454-29ec-4fe5-a115-30324820075d | Muguang233/selfStudy | cpp/singleFile/bin/list_sum.cpp | #include <iostream>
#include <stdlib.h>
using namespace std;
struct node {
int num1;
int num2;
struct node *next;
};
struct list {
struct node *head;
};
typedef struct list *List;
struct node *newNode(int num1, int num2) {
struct node *n = new node;
n->num1 = num1;
n->num2 = num2;
n->next = NULL;
... | ALGO | 0.999373 | 3.7282 | {
"github_metadata": {
"branch": "main",
"commit_count": 136,
"repo_created_at": "2025-04-19T10:49: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": "06159b4383... |
9d718ec6-5c98-4d73-b2b3-250c53cf60fe | shubhamchitampalle/DSL-codes | fds_e32.cpp | #include <iostream>
#define size 10
using namespace std;
class cqueue
{
int f = -1, r = -1;
int q[size];
public:
int isfull()
{
if (f == r + 1)
{
return 1;
}
else
{
return 0;
}
}
int isempty()
{
if (r == f)
... | ALGO | 0.971567 | 3.55813 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2022-12-01T04:08: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": "7000d5545478... |
98615e66-29f5-42b6-a5b5-9b20785b0b3a | ishandutta2007/codeforces-r | receed/normal/1158/D.cpp | #include <iostream>
#include <iomanip>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <cassert>
#include <string>
#include <set>
#include <map>
#include <random>
#include <bitset>
#include <string>
#include <unordered_set>
#include <unordered_map>
#include <deque>
... | ALGO | 0.999968 | 3.145878 | {
"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": "cf6a7ea58968... |
8b871f47-8839-4ff1-a68a-6b1bbe95277d | JoelGunawan/competitive-programming | contests/pelatnas-toki/toki-2022/pelatnas-3/latihan/sparring-apio-vnm/a.cpp | #include <bits/stdc++.h>
//#define endl "\n"
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
using namespace std;
const int lim = 1e5 + 5;
struct operations {
// 1 -> add
// 2 -> mul
// 3 -> mod
// 4 -> if x y
// 5 -> end_if
int type, l, r, val;
bool change;
};
operations ... | ALGO | 0.999656 | 4.34071 | {
"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": "8a7c7bd999... |
24828f52-66e4-4884-b282-29d029040449 | Saksham-Gupta-30/Leetcode | 1319. Number of Operations to Make Network Connected.cpp | class Solution {
public:
int findUltimateParent(int node, vector<int>& parent) {
if (node == parent[node]) return node;
return parent[node] = findUltimateParent(parent[node], parent);
}
void unionBySize(int u, int v, vector<int>& size, vector<int>& parent) {
int uParent = findUltimat... | ALGO | 0.999847 | 5.53829 | {
"github_metadata": {
"branch": "main",
"commit_count": 335,
"repo_created_at": "2022-03-20T18:59:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9a88ac51b2... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.