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 |
|---|---|---|---|---|---|---|---|
9250d639-4b35-426f-921c-92e20b3683e8 | AxioDL/metaforce | Runtime/CSortedLists.cpp | #include "Runtime/CSortedLists.hpp"
#include "Runtime/World/CActor.hpp"
#include <algorithm>
#include <cassert>
namespace metaforce {
namespace {
template <typename T, typename S>
auto AccessElement(T& arr, S idx) -> typename T::reference {
assert(std::size(arr) > static_cast<size_t>(idx) && idx >= 0);
return ar... | TOOL | 0.997632 | 6.560127 | {
"github_metadata": {
"branch": "main",
"commit_count": 7404,
"repo_created_at": "2015-04-19T06:29:23.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 634,
"forks": 42,
"issues": 48,
"pull_requests": 0
},
"file_meta": {
"content_id": "d4466c... |
c1fb92bc-7ed4-473c-aac5-d045c6279fc5 | andrew-crabb/recon | je_hrrt_osem3d/psf.cpp | /*
psf.cpp
Author: <NAME>
Creation date: ?
Modification history:
08-MAY-2008: modified to compile with microsoft visual studio (M. Sibomana)
*/
#include <stdio.h>
#ifdef WIN32
#include <process.h>
#endif
#include <math.h>
#include "hrrt_osem3d.h"
#ifdef IS_LINUX
#define _alloca alloca
#endif
typedef struct {
Conv... | ALGO | 0.998272 | 4.157649 | {
"github_metadata": {
"branch": "master",
"commit_count": 46,
"repo_created_at": "2014-10-01T17: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": "01dd1ba72... |
f7e5a0ce-5bc1-4e50-a60f-16e74530a205 | malhotra18/CSN_212 | assignment_3/bellman_ford.cpp | #include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <queue>
#include <bits/stdc++.h>
using namespace std;
int main() {
// Read input from STDIN. Print output to STDOUT
int t, nodes, edges, u, v, w, s;
cin>>t;//enter number of test cases
for(int l=0;l<... | ALGO | 0.9998 | 4.093202 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2017-02-26T12:31: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": "03ef46c7c... |
171edda4-abfd-4e8b-a041-90d9c9e5418e | glowacz/kalkulator | gen.cpp | #include <bits/stdc++.h>
#define ll long long
using namespace std;
const ll N = 1000000000000000000; //10^\18
const ll N1 = 1000000000; //10^9
//const ll N = 2000000000;
//const ll N = 20000;
const ll M = 2000;
const ll B = 10;
const ll E = 18;
const ll O = 1000;
//const ll N = 1000;
string op = "+*-/%^k";
int sys = ... | ALGO | 0.998986 | 3.857361 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2021-11-10T23:15: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": "9a054f9c8f3... |
827fe171-af08-4414-b461-e9d2de96ffe5 | askeySnip/OJ_records | POJ/35.cpp | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;
bool same(char c1, char c2){
if(c1>='a' && c2 >='a' && c1 <='z' && c2 <= 'z') return true;
if(c1 >='0' && c2 >='0' && c1<='9' && c2<='9') return true;
if(c1 >='A' && c2>='A' && c1 <... | ALGO | 0.999979 | 3.365184 | {
"github_metadata": {
"branch": "master",
"commit_count": 279,
"repo_created_at": "2018-01-18T08:36:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8e1c8fd5... |
43429cd5-fd3c-48ad-8228-4d2cf30d80d8 | ravep/tdkp | tdkp/probdefs/EigenProblem3D.h | // ------------------------------------------------------------
//
// This file is part of tdkp, a simulation tool for nanostrutctures
// of optoelectronics developed at ETH Zurich
//
// (C) 2005-2009 <NAME>, ETH Zurich, <EMAIL>
//
// 1) As of 18.6.2009 this code is property of ETH Zurich and must not be
// transferred... | ALGO | 0.996407 | 4.645762 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2015-03-13T05:44:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a751de065c... |
3a7a9251-8482-4191-b1bb-b0d8f80a1624 | nikhil0139/Binary-Tree | flatten_tree.cpp | #include <bits/stdc++.h>
using namespace std;
class Tree
{
public:
int data;
Tree *left;
Tree *right;
Tree(int d)
{
data = d;
left = NULL;
right = NULL;
}
};
Tree *buildTree()
{
int x;
cin >> x;
if (x == -1)
return NULL;
Tree *n = new ... | ALGO | 0.999979 | 4.442907 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-04-05T15:32:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6076a591cb14... |
30c95342-f522-4c92-af69-6d855afe670c | reetikasinghh/Pointer-BASICS- | exp8.1.cpp | // WAP TP PERFORM POINTER INCREMENT
#include <iostream>
using namespace std;
int main()
{
int a = 10; // Declare an integer variable 'a' and initialize it with 10
int *aptr; // Declare an integer pointer 'aptr'
float fl_value = 34.56; // Declare a float variable 'fl_value' and initialize it with 34.56
... | ALGO | 0.99344 | 4.972917 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2023-10-06T19:36: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": "1c7d682e11c7... |
789b9203-12ec-4551-bac2-7d2ae41ac755 | Yawn-Sean/Daily_CF_Problems | daily_problems/2024/07/0712/personal_submission/cf992b_tsreaper.cpp | #include <bits/stdc++.h>
#define MAGIC ((int) 4e4)
using namespace std;
typedef pair<int, int> pii;
bool flag[MAGIC + 10];
vector<int> prime;
unordered_map<int, int> gao(int x) {
unordered_map<int, int> mp;
for (int p : prime) {
if (p > x) break;
if (x % p) continue;
int t = 1;
... | ALGO | 0.999805 | 4.553996 | {
"github_metadata": {
"branch": "main",
"commit_count": 20410,
"repo_created_at": "2024-02-26T01:04:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 478,
"forks": 302,
"issues": 0,
"pull_requests": 7
},
"file_meta": {
"content_id": "c67f... |
9dc9a6a0-fbd7-4619-aac2-ea4caeaf6e67 | thegamer1907/Code_Analysis | contest/1542595182.cpp | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <map>
#include <vector>
#include <cstring>
#include <iomanip>
#include <set>
#include <sstream>
#include <ctime>
#define rust(a, b, c, d) sqrt(sqr(a - c) + sqr(b - d))
#define... | ALGO | 0.999959 | 3.650203 | {
"github_metadata": {
"branch": "master",
"commit_count": 73,
"repo_created_at": "2019-05-24T10:35:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3bcaad46f... |
4ac888ce-19f2-48a0-b569-db5f54b5d242 | Riee02/C030324042UTS. | menu.cpp | #include <iostream>
#include <conio.h>
using namespace std;
int aray[32];
int n=5;
void ingfo(){
system("cls");
cout<<"Indonesia Jaya,Poliban";
getch();
}
void dMenu(){
system("cls");
cout<<"Aplikasi Tampilan Menu"<<"\n";
cout<<"1. Input Data Array"<<"\n";
cout<<"2. Output Data Array"<<"\n"; ... | ALGO | 0.999542 | 3.834038 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2025-05-07T03:53: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": "49b93cbc54f6... |
722a24a1-c0ee-48a1-944d-3624545cc479 | sunruoshi/Luogu-Codes | [算法1-7] 搜索/P1433-吃奶酪-记忆化搜索.cpp | #include <cstdio>
#include <cmath>
using namespace std;
int n, visited[16];
double ans = 1.79769e+308, points[16][2], dis[16][16], states[32768][16];
double getDist(double x1, double y1, double x2, double y2) {
return sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2));
}
void dfs(int prev, double dist, int start, int state... | ALGO | 0.999946 | 4.134909 | {
"github_metadata": {
"branch": "main",
"commit_count": 579,
"repo_created_at": "2021-06-24T08:41:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ea0ce1f8c0... |
bed09268-f885-4a8c-ac64-f0f20d13d004 | akshayaggarwal/LeetCode | Q_290.cpp | class Solution {
public:
bool wordPattern(string pattern, string str) {
std::map<char,string> mymap;
std::set<string> myset;
pair<set<string>::iterator,bool> ret;
string str2 = "";
int j = 0;
int i;
while(j<str.size() && str[j] ... | ALGO | 0.999281 | 5.452318 | {
"github_metadata": {
"branch": "master",
"commit_count": 325,
"repo_created_at": "2017-06-02T06:08:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "79ddce7e... |
59d1b309-dee9-4e8a-b0cb-27eed5f2eaad | ishandutta2007/codeforces-f | frame233/normal/1324/C.cpp | // Author -- Frame
#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<algorithm>
#include<vector>
#include<iostream>
#include<set>
#define lowbit(x) ((x)&(-x))
#define Finline __inline__ __attribute__ ((always_inline))
#define DEBUG fprintf(stderr,"Running on Line %d in Function %s\n",__LIN... | ALGO | 0.9989 | 3.847964 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:43: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": "b27efe300512... |
74a27bb5-0561-494e-9151-0d054138599d | Rajeev12R/DSA | Linked_List/demo.cpp | /*#include <bits/stdc++.h>
using namespace std;
class node
{
public:
int data;
node *next;
public:
node(int data1, node *next1)
{
data = data1;
next = next1;
}
public:
node(int data1)
{
data = data1;
next = nullptr;
}
};
node *insert(node *head, int val)... | ALGO | 0.999946 | 4.48138 | {
"github_metadata": {
"branch": "main",
"commit_count": 75,
"repo_created_at": "2024-07-16T06:55: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": "1e995fb6e8a... |
54ece0df-a8c7-4dbe-82b2-b1b5900d2c85 | kldevv/leetcode | Archive/categorized-by-date/21-5-13/209. Minimum Size Subarray Sum/209. Minimum Size Subarray Sum.cpp | /*
Number: 209
Topic: Minimum Size Subarray Sum
Date: 2021/5/13
Rate: Medium
https://leetcode.com/problems/minimum-size-subarray-sum/
Given an array of positive integers nums and a positive integer target, return the minimal length of a contiguous subarray [numsl, numsl+1, ..., numsr-1, numsr] of which the sum is grea... | ALGO | 0.99998 | 6.333787 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2021-11-18T01:59:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fa6b8c13501b... |
daf890fb-1778-4eac-9d91-4afae7783f6f | Z3Prover/z3 | src/sat/sat_asymm_branch.h | /*++
Copyright (c) 2011 Microsoft Corporation
Module Name:
sat_asymm_branch.h
Abstract:
SAT solver asymmetric branching
Author:
<NAME> (leonardo) 2011-05-30.
Revision History:
--*/
#pragma once
#include "sat/sat_types.h"
#include "sat/sat_big.h"
#include "util/statistics.h"
#include "util/params.h"... | ALGO | 0.981413 | 6.761238 | {
"github_metadata": {
"branch": "master",
"commit_count": 19811,
"repo_created_at": "2015-03-26T18:16:07.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 11200,
"forks": 1542,
"issues": 160,
"pull_requests": 6
},
"file_meta": {
"content_id":... |
1e770bc8-517a-4230-ad32-e44d9e0ab7e1 | Razdan123/DSA-Prep | graph/ShortestPathAcyclic.cpp | //Shortest Path in Directed Acyclic Graph using DFS
#include<iostream>
#include<unordered_map>
#include<list>
#include<stack>
#include<vector>
#include<limits.h>
using namespace std;
class Graph{
public:
//Creating map for storing adjacency list + weightage
unordered_map<int, list<pair<int,int>>> adj;
... | ALGO | 0.999984 | 5.429585 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2022-05-17T12:27: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": "db076d589a... |
767f970b-ab6b-49b3-ab22-927785ee4ab5 | Yasmin29/URI | 1048.cpp | #include <iostream>
#include <iomanip>
using namespace std;
int main () {
double salario,x;
cin >> salario;
cout << fixed << setprecision(2);
if ( salario <= 400.00) {
x = salario * 0.15;
salario = x + salario;
cout << "Novo salario: " << salario << endl << "Reajuste ganho: " <... | ALGO | 0.996508 | 3.733848 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2021-08-03T02:51: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": "f65cbb8d0d... |
b057aaa9-4a74-4427-b3b9-00dd5128f04b | ishandutta2007/codeforces-c | cdkrot/normal/622/D.cpp | // Copyright (C) 2016 <NAME>.
//
// 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; version 3
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; wit... | ALGO | 0.999227 | 3.227165 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:17: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": "8d918dfc67af... |
c0ec6975-24e2-4fdc-ba67-d23619153f9d | volumio-imx8mm/libupnpp | libupnpp/control/cdirectory.cxx | /* Copyright (C) 2006-2016 J.F.Dockes
*
* 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 version.
*
* This library... | WEB | 0.938595 | 5.717106 | {
"github_metadata": {
"branch": "0.16-maint",
"commit_count": 261,
"repo_created_at": "2023-07-25T22:35:02.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8a261... |
1287380c-7fbe-4b5b-a2f5-a61565f7abc4 | NVIDIAGameWorks/PhysX | physx/source/lowleveldynamics/src/DySolverPFConstraints.cpp | //
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in bin... | ALGO | 0.999014 | 5.506838 | {
"github_metadata": {
"branch": "4.1",
"commit_count": 12,
"repo_created_at": "2018-12-05T14:30:22.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3397,
"forks": 824,
"issues": 311,
"pull_requests": 18
},
"file_meta": {
"content_id": "aad14... |
3f1f7457-9a59-42fb-8142-22387d20a3ca | MiohitoKiri5474/CodesBackUp | C++/GJ/e023.cpp | // by. MiohitoKiri5474
#include<iostream>
#include<vector>
using namespace std;
typedef long long LL;
// define tools
#define REPP(i,f,s) for ( int i = f ; i < s ; i++ )
#define REPM(i,f,s) for ( int i = f ; i >= s ; i-- )
#define REPALL(i,n) for ( auto &i: n )
#define debuger cout << "111\n"
#define MEM(n,i) memset... | ALGO | 0.999965 | 4.388036 | {
"github_metadata": {
"branch": "master",
"commit_count": 148,
"repo_created_at": "2018-03-21T10:32:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "30de371f... |
59554321-824c-4114-834b-4d5d01185271 | ishandutta2007/codeforces-a | amshz/normal/731/B.cpp | //khodaya khodet komak kon
# include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <pii, int> ppi... | ALGO | 0.999766 | 3.750047 | {
"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": "7a3043463fea... |
2b4f1cb0-a600-4ca8-8afd-b3969a7c18d3 | belarbi2733/bone | symfv2/Enterface16/docker/executables/maintracking.cpp | #include "opencv2/opencv.hpp"
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/video/video.hpp>
#include <opencv2/video/tracking.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <stdlib.h>
#include <stdio.h>
#include <ctime>
#include <ctype.h>
#include <string>
#include <io... | ALGO | 0.99926 | 3.044479 | {
"github_metadata": {
"branch": "master",
"commit_count": 239,
"repo_created_at": "2017-07-21T14:47: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": "47045ff1... |
f59ccdd5-8201-4ad2-be7d-129931034220 | AppStat/MultiBoost | src/Classifiers/ExampleResults.h | /*
*
* MultiBoost - Multi-purpose boosting package
*
* Copyright (C) AppStat group
* Laboratoire de l'Accelerateur Lineaire
* Universite Paris-Sud, 11, CNRS
*
* This file is part of the MultiBoost library
*
* This library is free software; you... | ALGO | 0.975472 | 6.11422 | {
"github_metadata": {
"branch": "Release",
"commit_count": 11,
"repo_created_at": "2012-11-06T15:19:16.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 27,
"forks": 15,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f07abca... |
d044c980-65b0-406b-bb9f-ece5fd672efc | fstqwq/Nemesis | SCL_others/Other/SJTU_ACM_Platelet/Template/Source-25/Math/bsgs.cpp | const int mod = 19260817;
struct Hash{Hash *next;int key,val;
} *last[mod],mem[100000],*tot = mem;
inline void insert(int x,int v){
*++tot = (Hash){last[x%mod],x,v};
last[x%mod] = tot;}
inline int query(int x){
for(Hash *iter=last[x%mod];iter;iter=iter->next)
if(iter->key==x) return iter->val;return -1;}
inli... | ALGO | 0.999984 | 3.908846 | {
"github_metadata": {
"branch": "master",
"commit_count": 248,
"repo_created_at": "2019-09-08T16:45:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 43,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7017d79... |
477038d1-9eee-4ecd-ac8a-02dde7b5de3e | Hemant-60-MSc/Parallel-Computing | MPI/bubble_sort_MPI_2.cpp | #include<iostream>
#include<vector>
#include<omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <mpi.h>
#include<math.h>
#include <limits.h>
#include<deque>
#define MIN(X, Y) (((X) < (Y)) ? (X) : (Y))
#define CEIL(A, B) A%B ==0? A/B: (A/B) + 1
// #define ABS(A... | ALGO | 0.999678 | 3.899832 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2023-06-09T19:05: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": "6e521b2201cf... |
f2638b7d-57ce-448e-b245-972389a6b713 | ArturGesla/rotst3 | library/src/rs.cpp | #include "rs.hpp"
#include <iostream>
#include <fstream>
//#include <filesystem>
#include "Eigen/Dense"
#include "Eigen/Sparse"
using namespace Eigen;
namespace rs1D
{
void calculateJacobianAndRhs(SparseMatrix<double> &jac, VectorXd &rhs, const VectorXd &u,
int n, int neq, doubl... | ALGO | 0.999077 | 4.189347 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2022-05-25T16:30:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b323fd351ea... |
73026013-6b33-4af4-9d13-ab22df40e3e0 | ishandutta2007/codeforces-d | darkkcyan/normal/744/A.cpp | #include <bits/stdc++.h>
using namespace std;
#define fn "main"
#define long long long
#define ve vector
#define vi ve<int>
#define xx first
#define yy second
#define sz(v) ((int) v.size())
#define inf(type) (numeric_limits<type>::max())
#define ii pair<int, int>
#define sz(v) ((int) v.size())
int n, m, k;
ve<vi> gr... | ALGO | 0.999918 | 3.640587 | {
"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": "9f2fded264c2... |
20315d68-4ace-4ee8-a175-b524d5976692 | yuika-sama/code-ptit-solutions | SSAA - 2024/1206.cpp | #include<bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O2")
#pragma GCC target("avx,avx2,fma")
#define faster() {ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);}
#define ll long long
#define pii pair<int, int>
#define vi vector<int>
#define vll vector<long long>
#define mii map<int, int>
#define si s... | ALGO | 0.999893 | 4.635204 | {
"github_metadata": {
"branch": "main",
"commit_count": 70,
"repo_created_at": "2023-08-02T23:34:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fb5c7525ca5... |
0f1f1ce5-0a78-45f1-944f-ddca9274bc5a | CodeTrans-Research/RefuTra | result/translate/starchat/java2cpp/c++/NUMBER_N_DIGIT_STEPPING_NUMBERS.cpp | long f_gold ( int n ) {
vector < vector < int > > dp ( n + 1, vector < int > ( 10 ) );
for ( int i = 0; i < 10; i++ ) dp[1][i] = 1;
for ( int i = 2; i <= n; i++ ) {
for ( int j = 0; j <= 9; j++ ) {
if ( j == 0 ) dp[i][j] = dp[i - 1][j + 1];
else if ( j == 9 ) dp[i][j] = dp[i - 1][j - 1];
els... | ALGO | 0.999699 | 4.177087 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2025-06-07T09:13: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": "6d9f8820d4cb... |
bbcf583e-f7d6-4518-89f0-9c9ff521c120 | suzzang2/Baekjoon | 백준/Silver/16953. A → B/A → B.cc | #include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int a, b;
cin >> a >> b;
int count = 1;
// <풀이>
// 두번째 수의 일이자리수가 짝수이면 2로 나누고, 1이면 1을 제거해준다. 이걸 반복해서.. 종료조건 언제??
... | ALGO | 0.999975 | 3.716034 | {
"github_metadata": {
"branch": "main",
"commit_count": 100,
"repo_created_at": "2024-03-26T16:38: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": "3a58b80993... |
7d102fe0-f9dd-48c2-b764-f3731f17a78b | SDU-Robotics/sdu_controllers | src/math/inverse_dynamics_joint_space.cpp | #include <iostream>
#include <sdu_controllers/math/inverse_dynamics_joint_space.hpp>
#include <utility>
using namespace Eigen;
namespace sdu_controllers::math
{
InverseDynamicsJointSpace::InverseDynamicsJointSpace(std::shared_ptr<models::RobotModel> robot_model)
: InverseDynamics(std::move(robot_model))
{
... | ALGO | 0.956146 | 6.417947 | {
"github_metadata": {
"branch": "main",
"commit_count": 146,
"repo_created_at": "2024-08-09T10:47:59.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 7,
"forks": 2,
"issues": 2,
"pull_requests": 5
},
"file_meta": {
"content_id": "a7760bedcf3... |
e46a4c00-58d5-4ff3-8cae-78e01a7876a5 | swj0418/OS_Concepts_Implementation | Virtual Memory/Page_Replacement/Pager.cpp | #include <iostream>
#include <math.h>
#include "PMemory.h"
#include "Process.h"
#include "PageTable.h"
using namespace std;
class Pager {
private:
static Pager *pager;
int pagesize = (int)pow(2, 12); //4096
public:
static Pager *getPager() {
if (!pager) {
pager = new Pager();
}
return pager;
}
int getP... | ALGO | 0.989269 | 3.985215 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2017-12-05T08:59: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": "56c03a3662... |
13b9137f-77b9-48e9-b3fb-1cb53fac5f07 | jongsubkim/algorithm | DP_Coin_Change.cpp | /* DP_518_Coin_Change_2 */
// https://leetcode.com/problems/coin-change-2
/* 322_Coin_Change */
//https://leetcode.com/problems/coin-change/
#include <iostream>
#include <unordered_map>
#include <algorithm>
#include <vector>
using namespace std;
/* DP_518_Coin_Change_2 */
//Return the number of combinations that mak... | ALGO | 0.999949 | 5.94519 | {
"github_metadata": {
"branch": "master",
"commit_count": 76,
"repo_created_at": "2019-10-23T10:20: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": "330f444e8... |
2191d728-d357-4a70-892b-20a2a32b8294 | le-incroyable1-dev/competitiveProgramming | codechef/FIND_X.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll gcd(ll a, ll b)
{
if (b == 0LL)
return a;
return gcd(b, a % b);
}
ll lcm(ll a, ll b)
{
return (a / gcd(a, b)) * b;
}
int main() {
// your code goes here
ll t; cin >> t;
while(t--){
ll a,b,c,d;
cin >> a >> b >> c >> d;
... | ALGO | 0.999918 | 4.012738 | {
"github_metadata": {
"branch": "main",
"commit_count": 463,
"repo_created_at": "2021-04-19T05:06:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6365f628fe... |
1ee57e7a-c926-42db-919f-9b55b50c7e38 | raincross7/code-similarity | codes/train_code/problem446/problem446_142.cpp | #include<iostream>
#include<cstdio>
#include<string>
#include<queue>
#include<algorithm>
using namespace std;
queue<int> Q;
int N;
bool PATH[101][101] = {false};
int len[101];
void BFS(int id){
Q.pop();
for (int i = 1; i <= N; i++) {
if (PATH[id][i]) {
if (len[i] > len[id] + 1) {
... | ALGO | 0.999664 | 3.372498 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-03-06T05:07:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7afa57bcfae4... |
bf6713bc-d2db-4abd-b355-2260d199f747 | ajabbar89/DS_Algo_problems_Leetcode | April_2020/binary_tree_from_preorder_traverse.cpp | /*
Construct Binary Search Tree from Preorder Traversal
Solution
Return the root node of a binary search tree that matches the given preorder traversal.
(Recall that a binary search tree is a binary tree where for every node, any descendant of node.left has a value < node.val, and any descendant of node.right has a va... | ALGO | 0.999997 | 6.54283 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-06-01T19:19: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": "fbabf7dca4... |
60f78cec-c92b-4ec1-8d3a-c13d1a5aeff4 | ReturnReason/algorithm | 알고리즘/누적합.c++ | /*
쿼리가 주어졌고 배열이 변함없는 경우
누적합을 사용한다.
누적합을 만들 때는 반드시 1번째 요소부터 만들어야 한다.
0부터 시작시 배열의 인덱스가 -1이 되는 상황이 발생하기 때문이다.
구간 쿼리는 정적 배열, 동적 배열로 구분된다.
정적 배열일 떄는 구간합, 동적 배열일 때는 트리(세그먼트 트리 또는 펜윅트리) 사용.
*/
#include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
int N, M;
int arr[N +... | ALGO | 0.999986 | 5.026802 | {
"github_metadata": {
"branch": "main",
"commit_count": 225,
"repo_created_at": "2022-07-19T13:59: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": "9218bc280a... |
fdc48dfc-df39-4b66-8141-bf84bb852c40 | EngineerMinded/AdventOfCode | 2023/Day2/Game.cpp | /* Game.cpp */
#include "Game.h"
#include <iostream>
#include <vector>
#include <sstream>
using namespace std;
// GAME CONSTRUCTOR
Game::Game() {
Game::number = red = blue = green = 0;
gameData = "";
cubeData = "";
}
// ADD NEW STRING DATA TO GAME
void Game::addNew(string new_data) {
if (cubeData != "") {
if (... | ALGO | 0.952971 | 4.106262 | {
"github_metadata": {
"branch": "main",
"commit_count": 278,
"repo_created_at": "2021-12-21T13:54:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "424a5cdd3d... |
bffe469a-e0df-44ab-b70f-9e764e474241 | liyue4096/MyScotty3D | src/geometry/halfedge-global.cpp | #include "halfedge.h"
#include <unordered_map>
#include <unordered_set>
#include <iostream>
/*
* triangulate: split all non-boundary faces into triangles.
*
* Works on all valid meshes.
*/
void Halfedge_Mesh::triangulate()
{
// A2G1: triangulation
for (auto f = faces.begin(); f != faces.end(); f++)
{
triang... | ALGO | 0.98591 | 5.017394 | {
"github_metadata": {
"branch": "main",
"commit_count": 84,
"repo_created_at": "2024-01-05T18: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": "6f9d67540e1... |
85f599af-0ab5-407d-b1bb-bc1eb076b1b3 | Kafuu-Chino-GYZ/psychologistv1 | 哲学家就餐/源.cpp | #include<process.h>
#include<Windows.h>
#include<iostream>
#define CHOSPSTICKNUM 5
using namespace std;
//这五个用于承接后续的五个事件
HANDLE Chospsticks[CHOSPSTICKNUM];
HANDLE ISPRINT;
int count1 = -1;
int ticket = 10;
void getChospsticks(int i)
{
while (ticket > 0)
{
if (i % 2 == 1)
{
WaitForSingleObject(Chospsticks[i],... | ALGO | 0.958822 | 3.574195 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2021-04-20T11:54: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": "00cf090864... |
96d7854c-0f5f-41a1-9aa5-b5febf8aa5d0 | shakilaust/Uva-Solve | 379.cpp | //BISMILLAHIRRAHMANIRRAHIM
/*
manus tar shopner soman boro
Author :: <NAME>
.............AUST_CSE27.........
prob ::
Type ::
verdict::
*/
#include <bits/stdc++.h>
#include <tr1/unordered_map>
#define pb push_back
#define mp make_pair
#define pi acos(-1.0)
#define ff first
#define ss second
#define re return
... | ALGO | 0.998983 | 3.796468 | {
"github_metadata": {
"branch": "master",
"commit_count": 291,
"repo_created_at": "2013-12-25T14:10:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1664b390... |
fe4ae70f-3444-4485-8a0b-2fa48348debe | gityf/common | base/cache.h | #pragma once
#include <map>
#include <limits>
#include <iostream>
namespace common {
/**
Implements a container for caching elements.
The cache holds a list of key-value-pairs. There are 2 main operations for
accessing the cache: put and get. Put takes a key and a value and puts the
e... | TOOL | 0.953542 | 6.795907 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2016-08-26T01:42:06.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 12,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6d06eced2... |
e824a62b-18ba-4263-a28c-eb060fdfe084 | kamyu104/LeetCode-Solutions | C++/longest-palindromic-path-in-graph.cpp | // Time: O(n^4 * 2^n)
// Space: O(n + e)
// bitmasks, dp, freq table
class Solution {
public:
int maxLen(int n, vector<vector<int>>& edges, string label) {
if (size(edges) == n * (n - 1) / 2) { // to improve performance
vector<int> cnt(26);
for (const auto& x : label) {
... | ALGO | 0.99992 | 4.771813 | {
"github_metadata": {
"branch": "master",
"commit_count": 19395,
"repo_created_at": "2018-10-11T17:38:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4939,
"forks": 1616,
"issues": 1,
"pull_requests": 55
},
"file_meta": {
"content_id": ... |
31c3ea6f-df48-40ab-9191-620dcf1672df | Sup3rFire/CP | Codeforces/Codeforces_Bubble_Cup_11_Finals_Online_Mirror_Div_2/C_Space_Formula.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
// loal is the cutest girl
#define ll long long
#define ld long double
#define pow2(x) (x)*(x)
#define le left
#define ri right
#define fi first
#define se second
#... | ALGO | 0.999878 | 3.369688 | {
"github_metadata": {
"branch": "main",
"commit_count": 109,
"repo_created_at": "2023-08-15T16:33: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": "e6a6c7259a... |
e05c2c58-2d45-4339-b889-0850f08cb37a | Znakous/First_semester_exam_prep | Real_tasks/IntSaver/task.cpp | #include <iostream>
#include <array>
#include <ostream>
#include <vector>
#include <algorithm>
class IntSaver; // std deprecacted;
int main() {
std::array<int, 5> arr = {1,2,3,4,5};
std::vector<IntSaver> v (arr.begin(), arr.end());
std::reverse(v.begin(), v.end());
for(auto i : v) {
i = i... | ALGO | 0.995815 | 4.510056 | {
"github_metadata": {
"branch": "main",
"commit_count": 43,
"repo_created_at": "2025-03-05T13:13: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": "c0243ea3f6b... |
fbaa56f2-c76e-4b2e-bbb8-ca3f6bf42ee7 | Fork512Hz/Fork512Hz_Codeforces | _Archived/2024_03/933/D.cpp | #include<cstdio>
#include<algorithm>
#include<iostream>
#include<cstring>
#include<utility>
#include<vector>
#include<cmath>
using namespace std;
typedef pair<long long, long long> pii;
typedef vector<long long> vint;
typedef long long ll;
//#define DEBUG
#define MULTI
#ifdef DEBUG
const long long N = 1000;
#endif
#i... | ALGO | 0.999995 | 3.136654 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2024-03-06T07:28: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": "164dfefdb0... |
dde13c32-55d8-4b29-8aa4-50986e8c8b80 | shulgaalexey/CtCI | 17_3.cpp | // 17.3 Write an algorithm which computes the number of trailing zeros in n factorial.
#include <iostream>
using namespace std;
int solution(int n) {
if(n < 0)
return 0;
int cnt = 0;
for(int i = 5; (n / i) > 0; i *= 5)
cnt += n / i;
return cnt;
}
int solution2(int n) {
if(n < 5)
return 0;
int last = 2; ... | ALGO | 0.999233 | 5.549765 | {
"github_metadata": {
"branch": "master",
"commit_count": 260,
"repo_created_at": "2015-01-21T13:49: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": "1ac6ca0a... |
f0820002-c254-4789-ab92-46e68711e9b1 | shukla284/PreparationRepository | Array/DoubleRepeatedElements.cpp |
#include<bits/stdc++.h>
using namespace std;
/*
Author : <NAME>
Description : Double Repeated Elements
*/
pair<int,int> getDoubleRepeatedElements(vector<int>& a){
int xorr = 0;
int n = a.size() - 2;
// XORing all the elements of the array.
for(int i = 0; i < a.size(); i++)
xorr ^= a[i];
//Range... | ALGO | 0.999963 | 3.653952 | {
"github_metadata": {
"branch": "master",
"commit_count": 95,
"repo_created_at": "2020-02-22T12:49:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c5399684b... |
113bd8f7-a6f7-4b93-800d-c4f34285f7bc | nami4mo/competitive-programming | 1_contest/current/abc222/x2.cpp | #include <bits/stdc++.h>
#if __has_include(<atcoder/all>)
#include <atcoder/all>
using namespace atcoder;
#endif
using namespace std;
namespace defines{
typedef long long ll;
typedef pair<ll,ll> P;
#define FOR(i,a,b) for(ll i = a ; i < b ; i++) // for i in range(a,b)
#define REP(i,n) for(ll i = ... | ALGO | 0.999977 | 4.43456 | {
"github_metadata": {
"branch": "master",
"commit_count": 239,
"repo_created_at": "2020-08-08T04:00: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": "309d7c74... |
ce81dbe5-d19d-4b28-84d2-c1c0f6a3486a | pbande/MaquinaTuring | src/mt.cpp | #include "mt.h"
MT::MT() {
}
MT::MT(std::string file) {
readData(file);
checkData();
}
MT::~MT() {
}
State* MT::findState(std::string state_) {
for(auto state : States)
if(state -> getId() == state_)
return state;
return NULL;
}
std::vector<std::string> MT::splitLine(std::string line) {
s... | ALGO | 0.998028 | 4.799128 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2021-10-28T09:45:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "749be774e4f... |
da062df9-5693-4c14-919c-52a0afe4508a | pokaa3a/LeetCode | problems/1751_Maximum_Number_of_Events_That_Can_Be_Attended_II.cpp | #include <cmath>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <set>
#include <stack>
#include <sstream>
#include <string>
using namespace std;
struct TreeNode
{
int val;
TreeNode* left;
Tr... | ALGO | 0.999874 | 5.801704 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2021-03-12T07:12: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": "41d53f792b4... |
c6caffdd-7e51-4d6b-92de-789d9bdf9dc0 | Gouravjoshi986/-6Companies30days | RotateFunction-LC396.cpp | #include<bits/stdc++.h>
using namespace std;
// we can simulate this using two for loops
// tc - O(n^2)
class Solution {
public:
int maxRotateFunction(vector<int>& nums) {
int k=0;
int ans=INT_MIN;
while(k<nums.size()){
int i=k;
int sum=0;
int count=0;
... | ALGO | 0.99999 | 5.2068 | {
"github_metadata": {
"branch": "main",
"commit_count": 34,
"repo_created_at": "2025-01-02T06:49: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": "0148be47fa9... |
7d5d4003-4ba4-441f-bec2-3aaa67b38a7f | nocodenolife3742/competitive-programming-library | Math/pollard rho.cpp | // needed : <NAME>
vector<u64> factorize(u64 n) {
static mt19937_64 rng(random_device{}());
vector<u64> ret;
function<void(u64)> rho = [&](u64 n) {
if (n == 1) return;
if (is_prime(n)) return ret.push_back(n);
u64 x = 0, y = 0, p = 1, g, c = 0;
auto f = [&](u64 v) -> u64 {
... | ALGO | 0.998707 | 3.186774 | {
"github_metadata": {
"branch": "main",
"commit_count": 69,
"repo_created_at": "2024-08-18T21:52: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": "6c2ae3ea024... |
f3d5e130-faa7-4262-8432-1bbe90721b6c | fabianprada/GPUSuperResolution | GPUSuperResolution/transformation.cpp | #include "geometry.h"
Matrix3D ApplyNeighbourTransformation(Matrix3D transformation_to_neighbour, Matrix3D input, Point<3> normal, bool apply_transformation)
{
if (apply_transformation)
{
Matrix3D output;
for (int i = 0; i < 3; i++)
{
Point<3> channel_gradient = input.ExtractRow(i);
Point<3> transformed_... | ALGO | 0.999919 | 5.466896 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2018-02-03T23:07:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ea0f1fa79f... |
b4adb5ff-d22a-4e6c-a6c3-2c4ea508c543 | kunnapatt/Competitive | Problem/10924/10924.cpp | #include <bits/stdc++.h>
using namespace std ;
#define FOR(i, a, b) for(int i = a ; i < b ; i++)
#define vi vector<int>
#define vii vector<long>
//#define long long long
bool isPrime(long n){
for(int i = 2 ; i * i <= n ; i++){
if ( n % i == 0 ){
return false ;
}
}
return true ;... | ALGO | 0.996917 | 3.944048 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-05-19T17:04: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": "c6a5186bae... |
2fe6e0de-3243-46e2-b084-19b21f69d571 | FennelDumplings/leetcode-maxed_out | algorithm/cpp/prob1-500/prob463_easy_Island-Perimeter.cpp | // prob463: Island Perimeter
/*
* https://leetcode-cn.com/problems/island-perimeter/
*/
#include <vector>
#include <queue>
using namespace std;
struct Point
{
int x, y;
Point(int x, int y):x(x),y(y){}
};
class Solution {
public:
int islandPerimeter(vector<vector<int>>& grid) {
int n = grid.si... | ALGO | 0.999458 | 4.834742 | {
"github_metadata": {
"branch": "master",
"commit_count": 534,
"repo_created_at": "2020-01-14T14:32:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 37,
"forks": 12,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "256871... |
7bb9a5ba-cafb-4285-92d4-1c8f3ed39d3e | VvyLw/CP_Library | C++/graph/Graph.hpp | #pragma once
#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <stack>
#include <ranges>
#ifndef TEMPLATE
namespace man {
template <class T, class U> constexpr inline bool chmin(T& a, const U& b) noexcept { if(a > b){ a = b; return true; } return false; }
}
#endif
#include "C++/graph... | ALGO | 0.999654 | 5.448919 | {
"github_metadata": {
"branch": "main",
"commit_count": 1299,
"repo_created_at": "2023-06-27T11:30:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "afc7bcb54... |
922172b5-f9cb-4523-8fb8-c5b7e524ab7f | ValentinKraft/Boost_PCL_UnrealThirdPartyPlugin | PointCloudRenderer/Source/ThirdParty/PCL_181/include/pcl-1.8/pcl/tracking/particle_filter_omp.h | #ifndef PCL_TRACKING_PARTICLE_FILTER_OMP_H_
#define PCL_TRACKING_PARTICLE_FILTER_OMP_H_
#include <pcl/tracking/tracking.h>
#include <pcl/tracking/particle_filter.h>
#include <pcl/tracking/coherence.h>
namespace pcl
{
namespace tracking
{
/** \brief @b ParticleFilterOMPTracker tracks the PointCloud which is give... | TOOL | 0.977248 | 6.754167 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2017-08-06T12:53:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 102,
"forks": 25,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "8ce049... |
0b2c5fb2-ec69-4518-a1a8-d33521f31fd4 | James-GPU/CSCI313HW2 | Michelle's Portion/HW2Qu.1/PostfixNotationwithComments.cpp | //***********************************************************
// Author: <NAME>
//
// Program: Postfix Calculator
// This program evaluates postfix expressions.
//***********************************************************
#include <iostream>
#include <iomanip>
#include <fstream> //necessary to operate on extern... | ALGO | 0.982938 | 4.574103 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2021-05-04T21:23: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": "629370b54217... |
4589d099-2377-47cf-ac55-22137fb54686 | serkalemdelelegn/CP | 0004-median-of-two-sorted-arrays/0004-median-of-two-sorted-arrays.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
class Solution {
public:
double findMedianSortedArrays(vector<int>& nums1, vector<int>& nums2) {
if (nums1.size() > nums2.size()) {
return findMedianSortedArrays(nums2, nums1); // Ensure nums1 is the smaller array... | ALGO | 0.999995 | 6.924375 | {
"github_metadata": {
"branch": "main",
"commit_count": 704,
"repo_created_at": "2023-12-24T20:42:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "03c0fb1174... |
c2059c7a-0e34-43df-927c-558e0518b9ca | hhj3258/Algorithm_Study | by_2023/BaekJoon/C++/동적_계획법/1890_점프.cpp | #include <bits/stdc++.h>
using namespace std;
int N;
long long dp[101][101];
// 동, 남
int dy[] = {0, 1};
int dx[] = {1, 0};
long long Solve(vector<vector<int>> &board, int y, int x)
{
// 오직 목표점에 도달했을 때만 1 리턴
if (y == N - 1 && x == N - 1)
{
return 1;
}
// 이미 방문했던 곳은 다시 방문할 필요가 없다.
// ... | ALGO | 0.999988 | 4.598243 | {
"github_metadata": {
"branch": "main",
"commit_count": 462,
"repo_created_at": "2021-04-29T19:04:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "649b72c74a... |
9eef4c88-8066-4eb1-a399-e859baeaf6e2 | Parxs/parallel-numerical | src/sorting/csort/c11_countingsort.h | #ifndef C11_COUNTINGSORT_H
#define C11_COUNTINGSORT_H
#include <future>
#include <thread>
#include <vector>
#include "util.h"
#include "array.h"
namespace cEleven{
// flags
bool NEG_VALUE_ENCOUNTERED = false;
bool BIGGER_THAN_MAX_ENCOUNTERED = false;
bool WRONG_PREFIX_SUM = false;
/**
* @brief Executes the given... | ALGO | 0.999934 | 6.782681 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2016-10-12T18:42: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": "3ac7a1602... |
ded4da2c-096d-4223-89a1-be2692cd4a70 | tootal/tocalc | tomath.cpp | //此文件包含tomath库函数的实现部分
#include <cstdio>
#include <cstring>
#include "tomath.h"
void toCalcMain(){
showInfo();//显示初始信息
while(true){
printf("%s",SHOWINPUT);
char *input=new char[MAXINPUTLEN];
scanf(" %s",input);
printf("%s",SHOWOUTPUT);
//假定输入合法,不做异常处理
if(input[0]=='q'){//退出程序
printf("Bye!\n");
brea... | ALGO | 0.984525 | 3.095397 | {
"github_metadata": {
"branch": "master",
"commit_count": 38,
"repo_created_at": "2020-12-06T02:58:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ca644d0ed... |
2de533cc-60f6-4b59-bf59-a980caa8c86e | YuryUoL/DataSkeletonization | DataSkeletonizationNew/include/Methods/MorseReconstruction/MorseReconstructionComputator.h | #ifndef COMPUTATOR_H
#define COMPUTATOR_H
#include <mlpack/core.hpp>
#include "ExponentialDensity.h"
#include "DensityComputator.h"
#include "GeneralConvertor.h"
#include "ToSptTransformer.h"
#include "DiMoSCLauncher.h"
//#include "DiMoSC.cpp"
//! This guy requires some fixing: #include "DiMoSC.cpp"
// Row,Column
/... | ALGO | 0.99687 | 5.784391 | {
"github_metadata": {
"branch": "master",
"commit_count": 75,
"repo_created_at": "2018-10-11T11:37:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "1f0644f54... |
d1a9b706-8f14-407c-9340-9479de9a5092 | LiloMarino/Compiladores | Portugol/main.cpp | #include <iostream>
#include <fstream>
#include <string>
#include <list>
#include "automato_finito.hpp"
#include "lexico.hpp"
#include "sintatico.hpp"
#include "gramatica.hpp"
using namespace std;
void createAutomato(AutomatoFinito &af)
{
af.addRegularExpression("algoritmo", "algoritmo", true);
af.addRegularE... | ALGO | 0.975743 | 3.878237 | {
"github_metadata": {
"branch": "main",
"commit_count": 313,
"repo_created_at": "2024-07-16T12:39: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": "bfa736384d... |
97564bcd-3786-40dc-b075-940a8d098b31 | Rishabh-somvanshi/Graph | Graph_DFS_Iterative.cpp | #include<bits/stdc++.h>
using namespace std;
/* Function to do DFS of graph
g : adjacency list of graph
N : number of vertices
return a list containing the DFS traversal of the given graph
*/
vector <int> dfs(vector<int> g[], int N)
{ vector<int>v;
vector<bool>vis(N);
stack<int>st;
... | ALGO | 0.99998 | 6.233444 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2020-09-17T08:20: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": "f3886c492... |
640ba13a-ad6e-4726-a850-f407f76c6865 | Otrebus/timus | 1655.cpp | /* 1655. <NAME> - http://acm.timus.ru/problem.aspx?num=1655
*
* Strategy:
* Sort the ships by clockwise azimuth from the initial gun angle. We can then do dynamic
* programming over A[L][R][C], where
*
* A = number of degrees turned in total
* L = leftmost ship targeted
* R = rightmost ship targeted
* ... | ALGO | 0.999979 | 4.016697 | {
"github_metadata": {
"branch": "master",
"commit_count": 601,
"repo_created_at": "2015-07-08T14:22:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 83,
"forks": 28,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3eecbe... |
1c0228f6-d77e-4103-a3e1-cf1292750f97 | capNmo/Competitive-programming | __question_pool_rate_800-1199/1850_E_.cpp | #include <iostream>
#include <bitset>
#include <vector>
#include <math.h>
#include <algorithm>
using namespace std;
//void solve(){
// long long n, maxArea;
// cin >> n >> maxArea;
// vector<long long> arr(n);
// for(int i=0; i<n; ++i){
// cin >> arr[i];
// }
//// (x2 * x^2) + (x1 * x) + x... | ALGO | 0.999918 | 4.430105 | {
"github_metadata": {
"branch": "master",
"commit_count": 79,
"repo_created_at": "2023-07-26T04:55: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": "7c6b71899... |
36c60c61-ca22-44ca-bc0d-96e60bc5f96f | muhammadhasan01/cp | Online Judge/Codeforces/Practice/1900/Longest_Bracket_Sequence.cpp | #include<bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
int n, ans = 0, oc = 1;
string s;
int f[N];
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> s;
n = s.length();
stack<pair<char,int>> st;
for (int i = 0; i < n; i++) {
if (s[i] == ')' && ... | ALGO | 0.999653 | 4.125731 | {
"github_metadata": {
"branch": "master",
"commit_count": 1187,
"repo_created_at": "2019-07-13T15:49:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4d8a1a9... |
073555ed-d6eb-400c-b848-ac90d67e57ad | amazy2596/Algorithm-Competition | program_2025/program_06/program_12/111309_C.cpp | #include <bits/stdc++.h>
#define uint uint64_t
#define int long long
using namespace std;
vector<pair<int, int>> dir8 = {{1, 0}, {1, 1}, {0, 1}, {-1, 1},{-1, 0}, {-1, -1}, {0, -1}, {1, -1}};
vector<pair<int, int>> dir4 = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}};
const int inf = 1e18;
mt19937_64 rng(chrono::steady_clock::no... | ALGO | 0.99996 | 3.987125 | {
"github_metadata": {
"branch": "main",
"commit_count": 38,
"repo_created_at": "2025-06-20T15:02: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": "b476e7c2efa... |
bfa79bc6-efd8-4e25-b6f7-afbc77e5e6c6 | iASL-Gifu/aichallenge2023-integration-final | src/universe/autoware.universe/planning/behavior_path_planner/src/util/drivable_area_expansion/drivable_area_expansion.cpp | // Copyright 2023 TIER IV, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... | ALGO | 0.977827 | 7.647502 | {
"github_metadata": {
"branch": "main",
"commit_count": 156,
"repo_created_at": "2023-11-03T01:53:06.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ce7611ee04f... |
b6c7bd3e-5aff-4ede-9786-1ee5d8f97c9c | penghao94/TensorVis | external/embree/kernels/xeon/geometry/intersector_epilog.h | // ======================================================================== //
// Copyright 2009-2015 Intel Corporation //
// //
// Licensed under the Apache License, Version 2.0 (the "License"); //
// y... | ALGO | 0.950765 | 6.538941 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2017-02-17T09:20:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e7e9e5440... |
1299ce75-67db-41d0-8c20-008b1c4803c0 | trilinos/Trilinos | packages/rol/adapters/sacado/test/HS/HS_Problem_021.hpp | // @HEADER
// *****************************************************************************
// Rapid Optimization Library (ROL) Package
//
// Copyright 2014 NTESS and the ROL contributors.
// SPDX-License-Identifier: BSD-3-Clause
// *************************************************************************... | ALGO | 0.929188 | 3.671922 | {
"github_metadata": {
"branch": "master",
"commit_count": 104031,
"repo_created_at": "2015-11-16T19:39:16.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1299,
"forks": 593,
"issues": 263,
"pull_requests": 61
},
"file_meta": {
"content_id":... |
26cb9ede-f39c-410c-8a4a-78170fda28f5 | metaphysis/Code | UVa Online Judge/volume002/264 Count on Cantor/program.cpp | // Count on Cantor
// UVa ID: 264
// Verdict: Accepted
// Submission Date: 2016-05-09
// UVa Run Time: 0.020s
//
// 版权所有(C)2016,邱秋。metaphysis # yeah dot net
#include <bits/stdc++.h>
using namespace std;
int numerator[10001628], denominator[10001628];
void initialize()
{
bool fromLeftToRight = true;
int... | ALGO | 0.99559 | 4.307234 | {
"github_metadata": {
"branch": "master",
"commit_count": 1710,
"repo_created_at": "2016-03-07T13:28:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 229,
"forks": 50,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "25f9... |
c0c24390-9653-462a-9b8a-aecce22c350b | Algo-Lab-2020/Grader | ice_cream1.cpp | #include <iostream>
using namespace std;
typedef int valueType;
struct IceCream
{
valueType id; //ball index insert
IceCream *next;
IceCream(valueType id, IceCream *next = 0)
: id(id), next(next) {}
};
void insert(IceCream *header, valueType i)
{
IceCream *new_l = new IceCream(i);
heade... | ALGO | 0.999731 | 3.487431 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-10-26T15:05:06.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f448cf89271... |
9d94b0ce-975d-4c99-bbcd-c9eab725d15c | shendrew/contest-archive | USACO/2016-17/Open_s2/cownomics.cpp | #include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
#include <string>
using namespace std;
ifstream fin("cownomics.in");
ofstream fout("cownomics.out");
int n, m, ans;
int a[64];
vector<string> v;
vector<vector<int>> spot, plain;
int main()
{
fin >> n >> m;
v.resize(n*2), spot.resize... | ALGO | 0.999681 | 3.507109 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2021-12-06T20: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": "a6912e750da5... |
611a4a5a-c6e6-4aa3-b9eb-653b3926423d | MaggieSalak/algorithmic-challenges | leetcode/coin_change.cpp | // 1: With recursion
class Solution {
public:
int get_min(int res, int cur) {
if (res == -1)
return cur;
return min(res, cur);
}
void calc(const vector<int>& coins, int index, int amountLeft, int coinsUsed, int& minCoins) {
if (amountLeft == 0) {
mi... | ALGO | 0.999997 | 5.654185 | {
"github_metadata": {
"branch": "master",
"commit_count": 95,
"repo_created_at": "2019-10-06T12:57: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": "3e82b9506... |
9fc28a55-3c0b-4759-9217-24ac6239554c | Aerial94/EvolutionaryAlgotihms | tests/basicTest.cpp | #define CATCH_CONFIG_MAIN
#include "catch.hpp"
#include "../src/StandardEvolutionaryAlgorithm.h"
#include "../src/FindMinimumProblem.h"
#include "../src/CartesianPoint.h"
#include "../src/SimpleEvolutionaryAlgorithm.h"
#include "../src/FindMinimumProblemBuilder.h"
#include "../src/EvolutionaryAlgorithmBuilder.h"
#incl... | TEST | 0.943139 | 6.980786 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2016-10-19T20:36: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": "c57f81869... |
d06cca14-888a-4043-9ae1-984804b6fd6f | traveller-42/National-Contest-Template | National Contest Template/Graph/Bellman-Ford.cpp | #include <bits/stdc++.h>
using namespace std;
#define SIZE 1005
#define BIG 1000000000000005
long long dis[SIZE];
int pre[SIZE];
int n;
vector<pair<int, int> > G[SIZE];
bool bellmanFord(int source)
{
for(int i=0; i<SIZE; i++) {
dis[i] = BIG;
pre[i] = -1;
}
dis[source] = 0;
for(int... | ALGO | 0.999978 | 4.094996 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-01-15T20:15:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "40a3ee3c4346... |
07a31c61-0553-44c5-aca9-98fdf201aa1b | chen8958/.leetcode | 17.letter-combinations-of-a-phone-number.cpp | /*
* @lc app=leetcode id=17 lang=cpp
*
* [17] Letter Combinations of a Phone Number
*/
// @lc code=start
#include <vector>
#include <unordered_map>
using namespace std;
class Solution {
public:
// consider size == 0 case
vector<string> recursive_enter_word(string input, unordered_map<char, string>digits_m... | ALGO | 0.999952 | 6.629178 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2024-12-20T11:20: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": "e61fc798b... |
1ada911f-cc11-4b2a-84df-d54d6ce5ecb8 | kovjani/WFA_Compressing | source_files/DeterministicCoding.cpp | #include "../header_files/DeterministicCoding.h"
DeterministicCoding::DeterministicCoding(const char *opened_filename, const char *saved_filename)
: Coding(opened_filename, saved_filename) {
this->EPS = 0.0001;
this->rounded = 4;
this->A = new Transition [this->quadtree_size];
this->B = new Trans... | ALGO | 0.996254 | 5.885305 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2024-09-17T19:01: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": "9ddbb1a79... |
a3547130-1a52-46a6-8d60-8955af25b0df | hermag/OOPcourse | 19_12_2020/classes.cpp | /*
* classes.cpp
*
* Created on: Dec 19, 2020
* Author: ereklemagradze
*/
#include <iostream>
#include <vector>
#include <string>
using namespace std;
class specialization
{
private:
float weekly_rate;
public:
specialization()
{
subject = "სატესტო საგანი";
}
string subject;
... | TOOL | 0.933827 | 4.212909 | {
"github_metadata": {
"branch": "main",
"commit_count": 102,
"repo_created_at": "2018-11-06T05:03:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f855fe6069... |
b0e257b3-5392-49e2-86a0-fd17d7833e9d | ishandutta2007/codeforces-d | dreamoon_love_aa/normal/1618/F.cpp | /*{{{*/
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<string>
#include<iostream>
#include<sstream>
#include<set>
#include<map>
#include<queue>
#include<bitset>
#include<vector>
#include<limits.h>
#include<assert.h>
#define SZ(X) ((int)(X).size())
#define ALL(X) (X).be... | ALGO | 0.999651 | 3.145152 | {
"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": "222ed84e0ebd... |
72da6324-96eb-4b7e-894b-069eaa291977 | zzdxzhangzhi/Algorithm | ConsoleApplication_cpp/main.cpp | /**
* @file main.cpp
* @author <NAME>
* @brief the implementation of the test of Trimble
* @since 1.0.0
*
* Change Log:
*
*/
#include <iostream>
#include <vector>
#include <numeric>
#include <cstdlib>
#include "BigInt.h"
const int DIGITAL_BASE = 10;
static int reverseInt(int origInt)
{
if (origInt < 0)
{
std::... | TEST | 0.959037 | 5.372592 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2016-11-03T04:06:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "af1a5cd9f5... |
997ca4fc-6909-461b-828f-50ffc8bfaf6c | bsarvan/algorithms | OneEditDistance/main.cpp | //
// main.cpp
// OneEditDistance
//
// Created by <NAME> on 11/01/21.
// Copyright © 2021 bsarvan. All rights reserved.
//
#include <iostream>
#include <string>
#include <vector>
using namespace std;
bool oneEditDistance(string A, string B) {
if (A.empty() || B.empty()) {
return false;
}
... | ALGO | 0.999167 | 5.277965 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2020-12-30T08:33: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": "97c940e9c8... |
602005c9-4bd1-494f-97dd-fd2cdd6cdbef | BrandonHaynes/scidb | src/query/ops/rankquantile/PhysicalQuantile.cpp | /*
**
* BEGIN_COPYRIGHT
*
* This file is part of SciDB.
* Copyright (C) 2008-2014 SciDB, Inc.
*
* SciDB is free software: you can redistribute it and/or modify
* it under the terms of the AFFERO GNU General Public License as published by
* the Free Software Foundation.
*
* SciDB is distributed "AS-IS" AND WITHOUT ANY W... | ALGO | 0.985866 | 4.398036 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2015-01-05T21:26:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "eee1e0e51... |
cc4c50e7-4b4f-45a6-be69-48098474a91f | arsentiikaptsan/abbyy_winapi_tasks | Task5/TextCleaner/main.cpp | #include "NamesConvention.h"
#include <boost/algorithm/string.hpp>
#include <sstream>
#include <fstream>
#include <codecvt>
#include <utility>
#define DEFAULT_NUM_OF_PROCESSES 4
std::wstring readFile(wchar_t* filename)
{
HANDLE sourceFile = CreateFile(filename, GENERIC_READ, 0 , NULL, OPEN_EXISTING, FILE_ATTRIBUTE_N... | TOOL | 0.982589 | 4.405632 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2017-07-23T11:06:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3830ee907d... |
b0a56028-b6ee-4d51-b72c-570cc141babb | sharmayash08/CPP-Practice-Codes | C++/Day5/ex3.cpp | #include<bits/stdc++.h>
using namespace std;
// Merge two Sorted Array using Functions
void cal(){
int total_num;
int num1,num2,choice;
cout<<"1. Addition"<<endl;
cout<<"2. Multiply"<<endl;
cout<<"Enter Operation You want to do : ";
cin>>choice;
if(choice == 1){
... | ALGO | 0.990251 | 3.635626 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2023-08-06T14:46:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "824b96d25a... |
abe30886-0296-441d-b260-0b37576203be | shtjrgus010/Algorithm | quardtree/quardtree/bj2512.cpp |
#include<iostream>
#include<map>
#include<vector>
#include<set>
#include<algorithm>
#include<cstring>
using namespace std;
int n, m;
const int MAX = 10000 + 1;
vector<int>v;
int a[MAX];
int main() {
cin >> n;
int max_val = 0;
for (int i = 0; i < n; i++) {
int temp;
cin >> temp;
v.push_back(temp);
if (max_... | ALGO | 0.999999 | 3.712938 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2020-10-27T12:23: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": "711a98d23790... |
1749f25b-2551-41b7-bc15-e18c34ba4e29 | Ajay242105/DSA-QA | longestConsecutiveSequence.cpp | /*
Problem statement
There is an integer array ‘A’ of size ‘N’.
A sequence is successive when the adjacent elements of the sequence have a difference of 1.
You must return the length of the longest successive sequence.
Note:
You can reorder the array to form a sequence.
For example,
Input:
A = [5, 8, 3, 2, 1, 4], ... | ALGO | 0.999953 | 5.399298 | {
"github_metadata": {
"branch": "main",
"commit_count": 78,
"repo_created_at": "2024-02-27T17: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": "5b0b9c0d2d2... |
c47e9c70-441a-4433-88c1-15ed161f5c02 | rajeev2810/Practice_CPP_Coding | VectorsErase/VectorsErase.cpp | // VectorsErase.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include <vector>
using namespace std;
class Solution {
public:
int removeElement(vector<int>& nums, int val) {
for (auto it = nums.begin(); it != nums.end(); it++)
{
... | ALGO | 0.999728 | 6.338281 | {
"github_metadata": {
"branch": "master",
"commit_count": 22,
"repo_created_at": "2022-12-28T11:34:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "50b98f3ba... |
6e522b88-1f3c-4119-b2ec-8be3a8ff56a9 | AdaCompNUS/sarsop | src/Bounds/BackupAlphaPlaneMOMDP.cpp | #include "BackupAlphaPlaneMOMDP.h"
#include "BeliefCache.h"
#include "AlphaPlanePool.h"
#include "SARSOP.h"
#include "exception"
#include <list>
#include <vector>
#include <cfloat>
using namespace std;
using namespace momdp;
BackupAlphaPlaneMOMDP::BackupAlphaPlaneMOMDP(void)
{
}
BackupAlphaPlaneMOMDP::~BackupAlphaP... | ALGO | 0.997827 | 5.514162 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2017-04-09T01:37:59.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 90,
"forks": 39,
"issues": 7,
"pull_requests": 0
},
"file_meta": {
"content_id": "354cdbac... |
d6e8093a-68be-4a53-a877-41977fb703cc | dbgli/cpp-practice | cpp_primer/chapter_3/3_4_2/3_4_2/main.cpp | //#include <iostream>
//#include <vector>
//
//using namespace std;
//
//int main() {
// int i;
// vector<int> ivec;
// while (cin >> i)
// ivec.push_back(i);
// if (ivec.size() % 2 == 0) {
// for (auto it = ivec.begin(); it != ivec.end(); it += 2)
// cout << *it + *(it + 1) << " ";... | ALGO | 0.998637 | 4.217732 | {
"github_metadata": {
"branch": "chapter_6",
"commit_count": 43,
"repo_created_at": "2018-01-30T13:33:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "12102e... |
5dfd036e-d078-4e0f-9c8f-24af3009c70b | ishandutta2007/codeforces-d | dingdingsb/normal/301/E.cpp | #include<bits/stdc++.h>
int n,m,p;
unsigned long long Pow[1000];
#define SJY_AK_IOI 100007
const unsigned long long b=SJY_AK_IOI;
namespace solve1{
// 30pts
//60pts
//
//1
//<p
std::map<unsigned long long,bool>m;
int flag[120][120];
//
//p+1
//p+1
//p+1
//
//
void work(){
//
//
//
//2
} ... | ALGO | 0.999988 | 3.81966 | {
"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": "bfd7510165e9... |
d6034f90-1215-4443-9bab-2be547fe08d6 | different021/Programmers | src/sort3_hIndex/sort3_hIndex.cpp | /*
과학자의 생산성과 영향력을 나타내는 지표 H-Index
n편의 논문 중, h번 이상 인용된 논문이 h개라고 할때,
h값의 최대값을 H-index라고 한다.
논문의 인용횟수가 들어간 vector<int> citations가 주어질때,
H-Index를 구하여 리턴하라
[parameter]
vector<int> citations
[return]
int
ex)
citations return
[3, 0, 6, 1, 5] 3
3회 이상 인용된 논문 ... | ALGO | 0.999922 | 5.477796 | {
"github_metadata": {
"branch": "main",
"commit_count": 69,
"repo_created_at": "2021-12-09T13:15: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": "9cd7968bd93... |
a0ac6581-8094-445d-9498-6dc2b5ad0583 | sogood99/cpp-comp | minimum-swaps-to-group-all-1s-together/minimum-swaps-to-group-all-1s-together.cpp | #include <bits/extc++.h>
#include <bits/stdc++.h>
#define LSOne(S) ((S) & -(S))
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<ll> vll;
typedef tree<ll, null_type, less<ll>, rb_tree_tag,
tre... | ALGO | 0.999979 | 5.211057 | {
"github_metadata": {
"branch": "master",
"commit_count": 122,
"repo_created_at": "2023-09-13T02:27: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": "339a371a... |
434f1941-9823-4b90-9056-c46f0b55748c | info3781/leetcode | 最小栈/最小栈/main.cpp | //
// main.cpp
// 最小栈
//
// Created by Info on 2019/12/9.
// Copyright © 2019 Info. All rights reserved.
//
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <string>
#include <queue>
#include <stack>
//设计一个支持 push,pop,top 操作,并能在常数时间内检索到最小元素的栈。
//
//push(x) -- 将元素 x 推入栈中。
//pop() ... | ALGO | 0.999664 | 6.000834 | {
"github_metadata": {
"branch": "master",
"commit_count": 39,
"repo_created_at": "2019-11-22T09:04: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": "7d2c20377... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.