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 |
|---|---|---|---|---|---|---|---|
f814f0d4-70a7-4460-9ea5-b0c4ba5ac15c | MothCreations/gavlanWheels | tensorflow/lite/experimental/ruy/kernel_arm64.cc | /* Copyright 2019 Google LLC. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in ... | ALGO | 0.984832 | 6.626863 | {
"github_metadata": {
"branch": "master",
"commit_count": 81669,
"repo_created_at": "2020-03-22T14:57:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 3,
"issues": 0,
"pull_requests": 7
},
"file_meta": {
"content_id": "bd9665... |
ba1114a5-148c-4e35-baaf-2e18ecf38989 | OP-DSL/OP2-APPS | apps/c/airfoil/airfoil_tempdats/dp/generated/airfoil/seq/airfoil_5_update_kernel.hpp | namespace op2_k5 {
inline void update(const double *qold, double *q, double *res,
const double *adt, double *rms) {
double del, adti;
adti = 1.0f / (*adt);
for (int n = 0; n < 4; n++) {
del = adti * res[n];
q[n] = qold[n] - del;
res[n] = 0.0f;
*rms += del * del;
}
}
}
void ... | ALGO | 0.999906 | 4.900973 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2021-11-14T18:15:07.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8466de0da338... |
28d18a88-6949-459f-ba7f-e73ed9fa72c8 | habanero-rice/hclib | test/performance-regression/full-apps/qmcpack/src/QMCHamiltonians/ForceChiesaPBCAA.h | //////////////////////////////////////////////////////////////////
// (c) Copyright 2003- by <NAME> and <NAME>
//////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////
// National Center for Supercomputing Applications &
// Materials Comp... | ALGO | 0.94027 | 6.472269 | {
"github_metadata": {
"branch": "master",
"commit_count": 705,
"repo_created_at": "2014-08-11T16:15:45.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 71,
"forks": 36,
"issues": 11,
"pull_requests": 0
},
"file_meta": {
"content_id": "c47657... |
81c9dddf-2fde-4aba-bf5c-2e52f864b242 | AdamSteinberg1/CSC335_NMR_Analyzer | peaks.cpp | //functions to calculate the peaks of the cubic spline
//finds their start and endpoints, their area, and their location
#include "structs.h" //peak struct is included here
#include "CubicSpline.h"
#include "legendreConstants.h"
#include <vector>
#include <algorithm>
#include <functional>
#include <cmath>
#include <gsl... | ALGO | 0.999954 | 5.434321 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2022-05-10T01:01: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": "7ec3d8f1e933... |
0a0c28c6-0488-4cab-8259-4e25d910c4d3 | Mu2e/Offline | TrkPatRec/src/KalFinalFit_module.cc | //
// Final Kalman fit
//
// Original author <NAME> and <NAME>
//
// framework
#include "art/Framework/Principal/Event.h"
#include "fhiclcpp/ParameterSet.h"
#include "art/Framework/Principal/Handle.h"
#include "art/Framework/Core/EDProducer.h"
#include "art_root_io/TFileService.h"
#include "art/Utilities/make_tool.h"
... | DATA | 0.992495 | 5.474504 | {
"github_metadata": {
"branch": "main",
"commit_count": 18891,
"repo_created_at": "2019-08-16T22:03:57.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 9,
"forks": 91,
"issues": 104,
"pull_requests": 7
},
"file_meta": {
"content_id": "7c6327... |
90e14eea-691c-4457-a0cf-4a01d063392c | xnd-r/BlackScholesOptionPricingModel | BSOPM_new/BSOPM_new/MDim.cpp | #include <iostream>
#include <cmath>
#define M_PIF 3.1415926
#include "omp.h"
#include "MDim.h"
#include "NumSolution.h"
#include "BSOPM.h"
float getMDimDensity(int dim, float*x) {
float denom = 0.f;
for (int i = 0; i < dim; ++i) {
denom += x[i] * x[i];
}
return expf(-denom / 2.f);
}
void getPointCoords(float *... | ALGO | 0.999822 | 3.945436 | {
"github_metadata": {
"branch": "master",
"commit_count": 79,
"repo_created_at": "2018-07-27T22:01:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "12afeac80... |
5df06cc5-bfad-407d-8283-e7511d50a515 | Mrwatermolen/cppProject | Leecode/6Z字变换.cpp | #include <string>
#include <iostream>
using namespace std;
class Solution
{
public:
string convert(string s, int numRow)
{
int len = s.size();
if (len <= 1)
return s;
string res;
int edge = (len - 1) / (2 * (numRow - 1));
for (int i = 0; i < numRow; ++i)
... | ALGO | 0.999676 | 5.576538 | {
"github_metadata": {
"branch": "master",
"commit_count": 38,
"repo_created_at": "2020-11-12T03:09: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": "51c5ac675... |
9303ca53-1d06-4bb2-a708-f9aa04a887b5 | RiddhiM170904/50DayChallenge- | day-45/Day.45.2.cpp | class Solution {
public:
int gcd(int a, int b){
if(b==0){
return a;
}
return gcd(b,a%b);
}
string gcdOfStrings(string str1, string str2) {
if(str1 + str2 != str2 + str1){
return "";
}
int lenGCD = gcd(str1.length(),str2.length());
... | ALGO | 0.999887 | 6.795143 | {
"github_metadata": {
"branch": "main",
"commit_count": 72,
"repo_created_at": "2025-05-02T05:22: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": "26eb030c07c... |
efdfb4cb-c392-4353-bc24-4fa8cbe97e3f | Tingwei-Jen/SGEMM_Optimization | main.cpp | #include <iostream>
#include <Eigen/Dense>
// CUDA runtime
#include <cuda_runtime.h>
#include <cublas_v2.h>
// Utilities and system includes
#include <helper_functions.h>
#include <helper_cuda.h>
#include <cuda_profiler_api.h>
#include "sgemm.h"
class SGEMMProfiler {
public:
SGEMMProfiler(const int M, const int ... | ALGO | 0.99272 | 5.973993 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2024-10-23T03:42: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": "ca6f698b4ba... |
d84054b2-aaef-4405-8524-800d7a07e4ab | Chrinkus/stroustrup-ppp | chapter23/ch23_tt1_mail_file.cpp | //
// Stroustrup - Programming Principles & Practice
//
// Chapter 23 Try This - Mail_file
//
// Run the mail file example. What would be better error handling? Modify the
// Mail_file constructor to handle likely formatting errors related to the use
// of ----.
//
#include <iostream>
#include <stdexcept>
#include <st... | TOOL | 0.900933 | 4.897253 | {
"github_metadata": {
"branch": "master",
"commit_count": 98,
"repo_created_at": "2017-04-27T04:55:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 170,
"forks": 56,
"issues": 3,
"pull_requests": 2
},
"file_meta": {
"content_id": "91a4af... |
544eaaa5-4cef-452c-9766-94e31e008fc0 | ap3334/baekjoon | 구현/2564.cpp | #include <iostream>
#include <vector>
using namespace std;
int main(void) {
int width, height, store_num, temp1, temp2, sum = 0;
int dong[2];
vector<pair<int, int>> store;
cin >> width >> height >> store_num;
for (int i = 0; i < store_num; i++) {
cin >> temp1 >> temp2;
store.push_back(make_pair(temp1, te... | ALGO | 0.998311 | 3.457777 | {
"github_metadata": {
"branch": "main",
"commit_count": 297,
"repo_created_at": "2021-11-17T06:25: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": "fd8cb6ef87... |
fbbf9773-11a7-4dbe-b50e-3cddce3a5c06 | lakshay-7014/leetcodeProblems | Number of Provinces - GFG/number-of-provinces.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
//User function Template for C++
class Solution {
public:
void dfs(unordered_map<int,bool> &vis,int &cnt,unordered_map<int,vector<int>> &adj,int node){
vis[node]=true;
for(auto j : adj[node]){
... | ALGO | 0.999933 | 6.200812 | {
"github_metadata": {
"branch": "main",
"commit_count": 891,
"repo_created_at": "2022-05-28T17:55: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": "e9b7748f85... |
c8466ad9-57d9-4fb2-999c-b9af424944d0 | tcadsoftware/charon | scripts/meshRefinementTools/refineModule/transform.cpp |
#include "transform.hpp"
#include <iostream>
#include <sstream>
#include <cmath>
lcm_lib::Transform::Transform()
{
xform_check = 0; // zero if direction cosines have not been computed
}
lcm_lib::Transform::~Transform()
{
}
void lcm_lib::Transform::transform(double x,double y,double z,double x1,
double y1... | TOOL | 0.960957 | 5.469386 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2021-10-24T21:23:53.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 11,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "739fd4580984... |
fb0986c9-be89-43a1-ac89-c8600ff5de29 | atirpetkar/leetcode | ValidAnagram.cpp | /*
Given two strings s and t, write a function to determine if t is an anagram of s.
For example,
s = "anagram", t = "nagaram", return true.
s = "rat", t = "car", return false.
Note:
You may assume the string contains only lowercase alphabets.
Follow up:
What if the inputs contain unicode characters? How ... | ALGO | 0.999196 | 4.897309 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2018-04-25T00:26: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": "bb4b80509... |
fa350cc7-c4dc-4737-ade3-86947ef5f45e | GabrielaDawidziuk/cwiczenie4 | GabiCw4/AnalizatorSygnalu.cpp | #ifndef _AnalizatorSygnalu_h_
#define _AnalizatorSygnalu_h_
/*=========================*/
#include "Sygnal.h"
#include <iostream>
using namespace std;
class AnalizatorSygnalu
{
public:
AnalizatorSygnalu() {}
double dlugosc( const Sygnal& _sygnal )
{
double _min = _sygnal[ 1 ].x;
double _max = _sygnal[ 1 ].x;
f... | ALGO | 0.91702 | 5.224609 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2017-10-30T12:40: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": "5f5e6043b2... |
8ad2d2b1-d8b0-4a5a-b10f-057cbc4fd4c3 | 25jia/Light_controlled_trolley | remote_control.ino | /*
4个按键
FBLS
0000-停止信号:一直亮
1000-前进
0100-后腿
0010-左转
0001-右转
*/
/*这里程序的思路是发射不同的信号(数据流)来控制车辆的运动方式,
为了避免发射端和接收端不同频率扫描导致的数据传输问题,我们选择“计数”的方式实现,
用一段0信号作为每一组数据流的间隔,接收端通过检测每一组数据流中上升沿的个数来获得传输的信息。
另外,为了防止计数较小,较慢时噪声影响,我们将数据传输频率调高,计数最低值以4起步。
*/
/*
The idea of the program here is to transmit different signals (data streams) to
cont... | ALGO | 0.996904 | 3.710422 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2022-04-16T15:51:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "40c9923bb577... |
a1fcff1a-ec94-44ff-8eb7-d6bdaf7bb99a | tssavita/geeksforgeeks_topicwise_practice | graph-algorithms/revision/union-find.cpp | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <vector>
using namespace std;
class Edge {
public:
int source;
int destination;
Edge() {}
Edge(int s, int d): source(s), destination(d) {}
};
int find(int *parents, int x) {
if (parents[x] == ... | ALGO | 0.999955 | 4.699548 | {
"github_metadata": {
"branch": "master",
"commit_count": 542,
"repo_created_at": "2018-02-23T10:45: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": "8bbf81d0... |
5abc4ce1-c7f7-4212-9d24-93fc99aa530f | changqing16/LeetCode | 0351-0400/376.cpp | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int wiggleMaxLength(vector<int> &nums)
{
if (nums.size() < 2)
return nums.size();
vector<int> tmp1(nums.size(), 0);
vector<int> tmp2(nums.size(), 0);
int m = 0, n = 0, m1, n1;
int ans = 0;
for (int i = 1... | ALGO | 0.999861 | 4.737899 | {
"github_metadata": {
"branch": "master",
"commit_count": 59,
"repo_created_at": "2018-03-21T12:35:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bca0e8a67... |
1a56d887-7c5f-479f-a0ff-91069b0273b5 | ianmnz/hackerrank | data-structures/arrays/array_manipulation.cpp | /**
* https://www.hackerrank.com/challenges/crush/problem
*/
#include <array>
#include <iostream>
#include <vector>
/**
* @param n The size of the array
* @param queries An array of [lft, rgt, k] queries
* @return The maximum value of the array
*/
long arrayManipulation(const int n,
cons... | ALGO | 0.999863 | 6.588003 | {
"github_metadata": {
"branch": "main",
"commit_count": 97,
"repo_created_at": "2023-05-04T12:44: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": "f585f06e5d6... |
274e31a1-00bd-4573-a4f5-b3f791da386e | kanghuiseon/algorithmStudy | Rare7_DP/juny/1520_내리막길.cpp | #include <iostream>
using namespace std;
#define endl '\n'
#define MAX 501
int N, M, res = 0;
int arr[MAX][MAX], dp[MAX][MAX];
int dx[] = {0,0,1,-1};
int dy[] = {1,-1,0,0};
int dfs(int x, int y) {
if(x == N-1 && y == M-1) return 1;
if(dp[x][y] != -1) return dp[x][y];
dp[x][y] = 0;
for(int i = 0; i ... | ALGO | 0.999965 | 4.072547 | {
"github_metadata": {
"branch": "master",
"commit_count": 73,
"repo_created_at": "2021-06-26T02:48:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5ae6b314e... |
71e06f16-a682-44a1-926f-9f0603ccfc6b | JimmyBao22/Competitive-Programming | CSES/Mathematics/GraphPathsII.cpp | #include <iostream>
#include <vector>
#include <map>
#include <cmath>
#include <algorithm>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <string>
#include <string.h>
#include <array>
#include <unordered_map>
#include <unordered_set>
#include <iomanip>
using namespace std;
typedef long long ... | ALGO | 0.999955 | 4.139585 | {
"github_metadata": {
"branch": "main",
"commit_count": 180,
"repo_created_at": "2021-03-26T21:46:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7062fadfc3... |
055fdb3c-816f-44e9-a8b7-69496a33ff28 | tlswhd0215/Workspace | c++-workspace/Data Structure/Data Structure/array.h | #include <cstring>
using namespace std;
#ifndef ARRAY_H
#define ARRAY_H
template<class T>
class ArrayList {
int list_len = 5;
T* arr;
int numOfData;
public:
ArrayList();//선언
int LDelete_index(int index); //인덱스로 삭제
int LDelete_Data(T data);//데이터로 삭제
int LNumOfData() { return numOfData; }//데이터 개수 구하기
int LGetMax(... | ALGO | 0.928278 | 3.826947 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2021-01-11T01:42: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": "71d52fb2a0b9... |
c9422c26-e269-448e-a34b-e6edb040eb68 | JeraKrs/acm | codes/FZU/fzu2107.cpp | #include <stdio.h>
#include <string.h>
const int N = 10;
const int d[4][2] = { {0, 0}, {0, 1}, {1, 0}, {1, 1} };
const int dir[3][3][2] = { { {0, 1}, {0, 0} }, { {1, 0}, {0, 0} }, { {0, 0} } };
const int cnt[3] = {2, 2, 1};
int r, v[N][N], tmp;
const int c = 4;
bool isInsert(int k, int x, int y) {
for (int i = 0; ... | ALGO | 0.999837 | 4.32087 | {
"github_metadata": {
"branch": "master",
"commit_count": 163,
"repo_created_at": "2016-05-23T06:40:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8103f768... |
14b928ea-65cd-49cb-af5e-d2f8d1e5766b | Ziklon/algorithms | tc/testprograms/WordWrap.cpp | #include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
using namespace std;
typede... | ALGO | 0.999677 | 5.628021 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2012-12-28T20:25:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "54a63f43e... |
0d8ce3e8-a87c-48ba-8738-ce68b273aa89 | TruongVanHien194276/Applied_Algorithm_Lab_IT3680 | Code lập trình/Training 3 - Exhsearch/BCA.cpp | #include<bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int MAX = 35;
int m, n;
// m: số giáo viên
// n: số lượng khóa học
int course[MAX];
int TeacherChoice[MAX];
vector<vector<int> > listOfCourse; // Danh sách khóa học mà từng giáo viên có thể dạy
vector<vector<int> > listOfPairsOfConflicting; // ... | ALGO | 0.999958 | 3.926986 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-07-28T09:32: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": "3acb03f666fe... |
09792e88-d1a7-4d56-a939-bf5c471241d8 | RosettaCommons/rosetta | source/src/core/scoring/rna/data/util.hh | // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
// vi: set ts=2 noet:
//
// (c) Copyright Rosetta Commons Member Institutions.
// (c) This file is part of the Rosetta software suite and is made available under license.
// (c) The Rosetta software is developed by the co... | TOOL | 0.958127 | 5.97501 | {
"github_metadata": {
"branch": "main",
"commit_count": 11737,
"repo_created_at": "2023-11-17T16:42:18.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 296,
"forks": 100,
"issues": 27,
"pull_requests": 9
},
"file_meta": {
"content_id": "9dee... |
00fb600b-af61-4e4e-b190-003a97f53091 | Tunghohin/Competitive_Coding | Codeforces/cf1702_E.cpp | #include <iostream>
#include <vector>
using namespace std;
vector<int> G[200010];
int color[200010];
bool dfs(int u, int type)
{
color[u] = type;
for (auto v : G[u])
{
if (!color[v])
{
if (!dfs(v, 3 - type)) return false;
}
else if (color[v] == type) return false;
}
return true;
}
void solve()
{
i... | ALGO | 0.999973 | 5.813337 | {
"github_metadata": {
"branch": "master",
"commit_count": 367,
"repo_created_at": "2021-08-05T14:13:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "eb17262c... |
bbe1f864-71f4-40a9-9363-59cc508edbc0 | IlhanSeven/projectEuler | Problem_026/p026.cpp | /*
* Solution to Project Euler problem 26
* by IlhanSeven
* https://github.com/IlhanSeven/projectEuler
*
* PROBLEM: Find the value of d < 1000 for which 1/d contains the longest recurring cycle in its decimal fraction part.
*/
/* ALGORITHM: Below solution logically assumes that this number should be a prime. ... | ALGO | 0.999807 | 4.966846 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2016-10-03T19:42: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": "d927aec77... |
a80dd458-938f-40ce-822c-367d2418f39f | n3on/clearsky | clearsky/clearsky/src/math/viewfrustum.cpp | /*
*
*/
#include "core/precompiled.h"
#include "math/viewfrustum.h"
namespace clearsky
{
ViewFrustum::ViewFrustum()
{
}
RETURN_VALUE ViewFrustum::build(Matrix view, Matrix projection)
{
Matrix viewProjection;
D3DXMatrixMultiply( &viewProjection, &view, &projection);
// Left
this->m_planes[0].a = vie... | ALGO | 0.977991 | 5.734607 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2014-05-09T19:32:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "939383c511... |
17a6c833-1ca4-4f09-ab26-81a6dbbd875c | magic929/Lint | C++/ugly_number.cpp | #include<algorithm>
#include<iostream>
using namespace std;
// ugly number feature:
// 2^i*3^j*5^k
int nthUglyNumber(int n){
// the ugly array
int *ugly = new int[n];
ugly[0] = 1;
// the count 2, 3, 5
int num2 = 0;
int num3 = 0;
int num5 = 0;
for(int i = 1; i < n; i++){
// co... | ALGO | 0.999995 | 4.836222 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2018-04-08T15:34:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "97378b127a... |
158ebcca-57a0-4ad6-88d4-b46d7ee613a6 | samad-yar-khan/Competetive-Programming | GR15/A5.cpp | #include <bits/stdc++.h>
using namespace std;
#define modVal 1000000007
#define ll long long
bool comp(pair<int,int> a , pair<int , int> b){
if(a.first==b.first){
return a.second>b.second;
}
return a.first<b.first;
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);cout.tie(N... | ALGO | 0.999993 | 4.297075 | {
"github_metadata": {
"branch": "main",
"commit_count": 78,
"repo_created_at": "2021-09-06T06:11: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": "bc7c3638035... |
ac396f00-fb03-4011-b560-130b3a6d7da6 | the-stranded-alien/LeetCode | 1501_1600/1508_Range_Sum_of_Sorted_Subarray_Sums.cpp | #include<bits/stdc++.h>
using namespace std;
// #define int long long int
#define double long double
#define F first
#define S second
#define pb push_back
#define pob pop_back
#define mp make_pair
#define si set <int>
#define vi vector <int>
#define vs vector <string>
#def... | ALGO | 0.999987 | 5.303339 | {
"github_metadata": {
"branch": "main",
"commit_count": 421,
"repo_created_at": "2022-01-01T17:46:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "07c16b6b63... |
38ae0321-ec54-4ff4-add3-f6ceb15ce14f | kaner918/competitive-programming | online judge.kaner murillo/c++/black list/628.cpp | //https://onlinejudge.org/external/6/628.pdf
//628
#include<vector>
#include<string>
#include<cstdio>
#include<iostream>
#include<map>
#include<algorithm>
using namespace std;
void solved(int index, vector<vector<int>>&ouput, vector<int>&numbers, vector<int>res){
if(index == res.size()-1){
ouput.push_b... | ALGO | 0.99857 | 3.358606 | {
"github_metadata": {
"branch": "main",
"commit_count": 265,
"repo_created_at": "2022-08-02T05:24:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ff36d3e074... |
89d62b60-1c17-42aa-8708-0fbe00d10595 | cms-sw/cmssw | TrackingTools/GeomPropagators/src/AnalyticalImpactPointExtrapolator.cc | #include "TrackingTools/GeomPropagators/interface/AnalyticalImpactPointExtrapolator.h"
#include "TrackingTools/GeomPropagators/interface/IterativeHelixExtrapolatorToLine.h"
#include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
#include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState... | ALGO | 0.997057 | 6.25255 | {
"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... |
ce4efda9-a2fe-4094-8753-4c967ab0010c | nolan0801/Competitive-Programming | VNOJ/chuyenNguyenHue/haoi10_blink.cpp | /*
link problem: https://oj.vnoi.info/problem/haoi10_blink
Author : vidut_206_CNH
*/
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define fi first
#define se second
#define pb push_back
#define fast_cin() ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define INF 2e18
typedef pair<int,int> ... | ALGO | 0.999977 | 4.289464 | {
"github_metadata": {
"branch": "main",
"commit_count": 144,
"repo_created_at": "2021-12-21T06:10:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b2b26b33cb... |
e9f1fb2d-c50a-4c7c-bbb1-a30eef54a1e8 | RasPlex/OpenPHT | lib/libUPnP/Neptune/Source/Core/NptDigest.cpp | /*****************************************************************
|
| Neptune - Message Digests
|
| Copyright (c) 2002-2010, Axiomatic Systems, LLC.
| All rights reserved.
|
| Redistribution and use in source and binary forms, with or without
| modification, are permitted provided that the following conditions are m... | ALGO | 0.992594 | 6.391623 | {
"github_metadata": {
"branch": "openpht-1.9",
"commit_count": 25886,
"repo_created_at": "2015-11-08T18:03:47.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 599,
"forks": 106,
"issues": 178,
"pull_requests": 2
},
"file_meta": {
"content_id... |
2e2864bc-205f-423c-8a2f-0793d97b51a5 | alexchelba/Material-for-Competitions | Cracking_The_Code/Ch3/main.cpp | #include <bits/stdc++.h>
using namespace std;
ifstream f("date.in");
ofstream g("date.out");
/**
class my_stack
{
private:
struct node{
int value;
int minn;
int counter;
node *prev;
};
node *first, *last;
public:
my_stack(){
first = NULL;
last = NULL;
... | ALGO | 0.999991 | 3.723366 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-11-22T17:43: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": "d867390c2c... |
21eb9c1f-23c9-4829-83dc-c9b0d8cfad9f | markp-gc/ipu_path_trace | src/IpuPathTraceJob.cpp | // Copyright (c) 2020 Graphcore Ltd. All rights reserved.
#include "IpuPathTraceJob.hpp"
#include <vector>
#include <poplar/Engine.hpp>
#include <poplar/Graph.hpp>
#include <popops/ElementWise.hpp>
#include <popops/Fill.hpp>
#include <popops/Reduce.hpp>
#include <popops/codelets.hpp>
#include <poprand/RandomGen.hpp>... | TOOL | 0.937572 | 7.390309 | {
"github_metadata": {
"branch": "main",
"commit_count": 30,
"repo_created_at": "2022-06-22T15:38:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1b8702097a4... |
39fe82da-c20d-422c-941a-fb666609c2b9 | MrkMrk00/aocpp24 | src/12.cpp | #include <deque>
#include <fstream>
#include <iostream>
#include <ostream>
#include <print>
#include <sstream>
#include <string>
#include <unordered_set>
#include <vector>
class Region
{
public:
const char letter;
explicit Region(char letter, size_t n_cols)
: letter{ letter }
, n_cols{ n_cols }
... | ALGO | 0.996036 | 5.157887 | {
"github_metadata": {
"branch": "master",
"commit_count": 44,
"repo_created_at": "2024-12-20T22:20: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": "8e21ee8d3... |
24a591fc-5f00-4a24-bd93-b162233470d2 | AmazingCaddy/acm-codelab | HDU/hdu_1176.cpp | #include<iostream>
using namespace std;
const int maxn = 100004;
int v[maxn][13];
int dp[2][13];
int max( int a, int b ){ return ( a > b ? a : b ); }
int max3( int a, int b, int c ){ return max( max( a, b ), c ); }
int main( )
{
int n, i, j, d, t, tmax, tmin, ans;
while( scanf("%d",&n) && n )
{
memset( v, 0, size... | ALGO | 0.999761 | 3.251892 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2013-11-28T15:42: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": "af86c4532... |
5eb62ed7-a98e-4d07-8aa9-5b6de6d0575a | mhaoli/ACM-Source-Code | Problems/Topcoder/TCO/2015/Round-1C/1000/DevuAndBeautifulSubstrings.cpp | #include <cstdlib>
#include <cctype>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <vector>
#include <iostream>
#include <sstream>
#include <set>
#include <queue>
#include <fstream>
#include <numeric>
#include <iomanip>
#include <bitset>
#include <list>
#include <stdexcept>
#includ... | ALGO | 0.999754 | 4.503776 | {
"github_metadata": {
"branch": "master",
"commit_count": 109,
"repo_created_at": "2015-04-15T04:55:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2e0091e3... |
eec156b6-ddca-4180-ad98-327412fb679e | ryera89/TideAnalisisPredictionSystem | include/maths/statisticalfacilities.cpp | #include "statisticalfacilities.h"
double mean(const QVector<double>
&measurements) // calcula el valor medio de una muestra
{
double ave = 0.0;
for (int i = 0; i < measurements.size(); ++i) {
ave += measurements[i];
}
ave /= measurements.size();
return ave;
}
double mean(const valarray<... | ALGO | 0.93651 | 4.037637 | {
"github_metadata": {
"branch": "master",
"commit_count": 75,
"repo_created_at": "2021-08-07T20:46:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "747741bda... |
f0848721-414e-4a8b-9d6f-9eb6dae868a3 | MinbinGong/cplusplus-projects | leetcode-solutions/leetcode-225.cpp | /*
* leetcode-225
* Implement Stack using Queues
*/
#include <queue>
using namespace std;
class MyStack {
public:
/** Initialize your data structure here. */
MyStack() {
}
/** Push element x onto stack. */
void push(int x) {
q1.push(x);
while (q1.size() > 1) {
q2.push... | ALGO | 0.999641 | 5.883932 | {
"github_metadata": {
"branch": "master",
"commit_count": 321,
"repo_created_at": "2019-09-05T02:56: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": "4b3f084c... |
9d20ae14-ad57-4eec-942a-f6493d781b12 | pnklein/district | initial_centers.cpp | #include <cstdlib>
#include <numeric>
#include <limits>
#include "initial_centers.hpp"
#include "rand_float.hpp"
#include "rand_point.hpp"
using namespace std;
vector<Point> choose_initial_centers(const vector<Point> &clients, long * populations, int num_centers){
vector<int> rand_values(clients.size());
long pop... | ALGO | 0.999735 | 5.418601 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2017-10-20T15:56:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 17,
"forks": 8,
"issues": 8,
"pull_requests": 1
},
"file_meta": {
"content_id": "b9bc4b36... |
470ab931-0ff4-436a-94e7-a7d8029226d0 | pkmital/CARPE-unstable | src/GPUFlow.cpp | #include "GPUFlow.h"
GPUFlow::GPUFlow(float scaleme)
{
prev_width = -1;
prev_height = -1;
num_images = 3;
lambda = 40;
gauss_tv_epsilon = 0.01f;
num_iter = 20;
num_warps = 3;
scale_factor = scaleme;
median_filt = true;
diffusion_tensor = true;
flowlib = NULL;
if(!CommonLib::selectDevice(0))
{
throw std:... | ALGO | 0.948371 | 5.479606 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2015-01-07T19:42:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "57b6193274... |
f9c8ce9f-6802-451f-8b62-db099dfc5369 | SpicyWasabea/School-and-Personal-Projects | TicTacToe.cpp | #include<iostream>
using namespace std;
void displayBoard()
{
// making the 2d arrays
/*
[0,0] [0,1] [0,2]; 0, 1, 2
[1,0] [1,1] [1,2]; 3, 4, 5
[2,0] [2,1] [2,2]; 6, 7, 8
*/
char board[3][3] = {
{ ' ',' ',' ' },
{ ' ',' ',' ' },
{ ' ',' ',' ' }
};
cout
<< " | | " << endl... | ALGO | 0.991189 | 4.867364 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-10-02T10: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": "60af0bd8502c... |
55f51bfc-ff5e-41f6-bafb-c9d62fd820a0 | tsingh62/C-Masters | dp-longestSubSeqMemo.cpp |
#include<iostream>
#include<vector>
using namespace std;
class solution
{
public:
int longestCommonSubSequence(string s1, string s2)
{
int row = s1.length()+1;
int col = s2.length()+1;
vector<vector<int>> dp(row, vector<int>(col,-1));
// row =i // memoization
// col = j
// dp[i][j]
return he... | ALGO | 0.99966 | 4.700338 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2020-07-29T23:50: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": "21e8b17b6... |
a3b96dcb-f53c-44f0-bce8-d4308ac29f5e | HuynhKhuong/Object-Oriented-Data-Structure-class-assignment | Final_project_Image_tranform/env/ImageTransform.cpp | #include <iostream>
#include <cmath>
#include <cstdlib>
#include "uiuc/PNG.h"
#include "uiuc/HSLAPixel.h"
#include "ImageTransform.h"
/* ******************
(Begin multi-line comment...)
Write your name and email address in the comment space here:
Name: <NAME>
Email: <EMAIL>
(...end multi-line comment.)
***********... | TOOL | 0.916142 | 5.377312 | {
"github_metadata": {
"branch": "master",
"commit_count": 35,
"repo_created_at": "2022-12-10T04: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": "cf82536ac... |
bbdfe970-69d1-44ed-9455-5cac8375298c | yangmanhanoi/DSA | DFS TREN DO THI VO HUONG.cpp | #include<bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
#define test() int t; cin >> t; while(t--)
#define faster() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define endl '\n'
#define ll long long
int visited[1005] = {}, trace[1005] = {};
int n, m, u, v;
void DFS(vector<int> Ke[], int u)
{... | ALGO | 0.999974 | 4.504274 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-06-29T02:44:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8f32347325c7... |
421892db-190a-4388-8bfd-9e29fc9d33ee | georgi571/Software-University-CPP | _1ProgrammingBasicsWithCPP/_3ConditionalStatementsAdvanced/_2Exercise/_02SummerOutfit.cpp | #include <iostream>
using namespace std;
int main() {
int degree;
cin >> degree;
string timeOfTheDay;
cin >> timeOfTheDay;
string outfit;
string shoes;
if (timeOfTheDay == "Morning") {
if (degree >= 10 && degree <= 18) {
outfit = "Sweatshirt";
shoes = "Snea... | TOOL | 0.976371 | 4.132911 | {
"github_metadata": {
"branch": "main",
"commit_count": 288,
"repo_created_at": "2024-09-07T13:13:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "899988d800... |
5869d0c8-6e8d-4db1-a1fb-e95c025bf647 | mmorsi4/Algorithms-Research-Project | Code/Task 4/Task4_BFS.cpp | #include <iostream>
#include <array>
#include <vector>
#include <tuple>
#include <algorithm>
using namespace std;
int depl[12][8] = {};
void init_moves() {
for (int i = 0; i < 12; ++i) {
int x = i / 3;
int y = i % 3;
int count = 0;
for (int dx : {-2, -1, 1, 2}) {
for (... | ALGO | 0.998904 | 4.345806 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2025-05-15T12:30:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fad732ae8129... |
f3578d70-f899-4a32-93a8-3c1ab04ecaab | locker/leetcode | solutions/brick-wall/solution.cpp | #include <iostream>
#include <vector>
#include <unordered_map>
using namespace std;
template<typename T>
ostream& operator<<(ostream& out, const vector<T>& v)
{
out << '[';
for (auto it = v.begin(); it != v.end(); ++it) {
if (it != v.begin())
out << ',';
out << *it;
}
out << ']';
return out;
}
class Solu... | ALGO | 0.999939 | 5.481719 | {
"github_metadata": {
"branch": "master",
"commit_count": 394,
"repo_created_at": "2019-02-24T20:24:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cd2a140f... |
66e5e7d0-d0dc-472e-a9f8-e26946ead0ae | artkravchenko/ege | evich_2016/6/task_27.cpp | // task B; C++11
#include <iostream>
#include <vector>
#include <string>
struct Name {
std::string surname;
std::string initials;
};
int main() {
const int MAX_RATE = 100,
EXAMS_NUM = 3;
int N; // by condition: the number of students
std::cin >> N;
if (N <= 0) {
return ... | ALGO | 0.997456 | 4.095284 | {
"github_metadata": {
"branch": "master",
"commit_count": 45,
"repo_created_at": "2016-02-02T16:10: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": "3fb032e1d... |
49984390-6e70-4142-8891-65f338adf79d | ramjirathore/dsa-codes | Disjoint Set Union/dsu_implementation.cpp | // O(4*alpha) time ~ Constant time basically since aplha is almost 1
// O(N) time
#include<bits/stdc++.h>
using namespace std;
int parent[100000];
int Rank[100000];
void makeSet() {
for(int i=1; i<=100000; i++) {
parent[i] = i;
Rank[i] = 0;
}
}
// 7->6->5->4
// 4 is the ultimate parent
int findParent(int no... | ALGO | 0.999992 | 5.022358 | {
"github_metadata": {
"branch": "master",
"commit_count": 291,
"repo_created_at": "2020-10-22T20:34:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1207d19a... |
d2617c53-4713-47ee-9446-7ef1abc805fb | ishandutta2007/codeforces-b | balintr/normal/1630/C.cpp | #include <bits/stdc++.h>
using namespace std;
typedef unsigned uint;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef complex<double> cmplx;
template <typename T> using minPq = priority_queue<T, vector<... | ALGO | 0.999909 | 4.325666 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-04-11T01:05:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3bd7ae278aea... |
3ee7e91b-5cec-41d3-abff-a1ee5183fed0 | ketsueki33/LeetCode | 131PalindromePartitioning.cpp | #include <bits/stdc++.h>
using namespace std;
#define turbo \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
// https://leetcode.com/problems/palindrome-partitioning/
// https://www.youtube.com/watch?v=WBgsABoClE0
class Solution {
public:
void findPartition(string s, vector<s... | ALGO | 0.999485 | 5.736923 | {
"github_metadata": {
"branch": "master",
"commit_count": 31,
"repo_created_at": "2023-09-07T21:32:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "85aeeb62a... |
1157cf22-298c-4333-bf48-a259276f4d37 | quarkslab/LLDBagility | FDP/virtualbox/src/VBox/Additions/3D/mesa/mesa-17.3.9/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | /*
* Copyright 2011 <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distrib... | ALGO | 0.992716 | 6.365455 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2019-02-05T09:15:08.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 112,
"forks": 23,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0e8dc71... |
cc44327d-4557-4ea2-9853-814219694ad3 | kimchanmiii/algorithm_cpp | algorithm/HanoiRecursive.cpp | #include <iostream>
using namespace std;
void HanoiTower(int n, int source, int intermediate, int target) {
// if (n == 1) {
// cnt++;
// cout << source << " -> " << target << endl;
// cout << cnt << " " << k << endl;
// cout << "----------------" << endl;
// return;
... | ALGO | 0.999954 | 4.749686 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-12-08T06:17: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": "a07d1b295718... |
59637a92-d852-436f-ba93-32124008a076 | alexingcool/algorithm | book-jzoffer/quickSort.cpp | #include <iostream>
#include <algorithm>
#include <iterator>
#include <stack>
using namespace std;
#define INF 65535
int array[] = {5, 4, 1, 2, 3, 9, 8, 7, 6};
const int size = sizeof array / sizeof *array;
void quickSort(int *array, int size)
{
if (array == NULL || size <= 0)
return;
stack<int> istack;
for (... | ALGO | 0.999979 | 4.88774 | {
"github_metadata": {
"branch": "master",
"commit_count": 27,
"repo_created_at": "2013-08-10T08:29: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": "1e640cf68... |
5ad9ee0d-69cd-4dd0-8c3b-e0cd8029fe89 | FerBastidas/Code-challenge---L05 | Code-challenge L03.cpp | #include <iostream>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <vector>
using namespace std;
// Task 1: Managing Products with std::map
void displayInventory(const map<string, int>& inventory) {
cout << "Current Inventory:\n";
for (const auto& item : inventory) {
cout << ... | ALGO | 0.984077 | 6.467748 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2025-03-01T04: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": "8d6299e14a... |
112e703e-27bb-47e7-bf17-bbaece6e0460 | alexandraback/datacollection | solutions_1485490_0/C++/acherepanov/sol.cpp | #include <iostream>
#include <cstdio>
using namespace std;
typedef pair<long long, int> pli;
const int N = 100 + 10;
pli a[N], b[N];
int n, m;
long long dp[N][N];
void sol (int test_number) {
cin >> n >> m;
for (int i = 0; i < n; ++i) {
cin >> a[i].first >> a[i].second;
}
for (int i = 0; i < m; ++i) {
cin >>... | ALGO | 0.999971 | 3.370604 | {
"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": "592879afd... |
b07fc0a3-32c2-49e5-862d-1f9a27702b10 | AsafLe5/AnomalyDetector | minCircle.cpp | #include "minCircle.h"
// Calculating the center of the circle created by three points, using the cartesian coordinates method.
// The radius is the distance between any of the points and the center.
Circle getCircleFromThreePoints(Point a, Point b, Point c) {
float d = 2 * (a.x * (b.y - c.y) + b.x * (c.y - a.y) +... | ALGO | 0.999719 | 5.881643 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2021-01-10T23:21:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6f8770b60... |
0f8761a3-35c8-4198-87da-521bec5fdeed | gomezaldana/algoritmos_materia | practica1/ejercicio16.cpp | #include <iostream>
#include <vector>
void imprimirVector(const std::vector<int> &vector)
{
std::cout << "[ ";
for (int numero : vector)
{
std::cout << numero << " ";
}
std::cout << "]" << std::endl;
}
bool esMayor(int a, int b)
{
bool aux = false;
if (a > b)
{
aux = ... | ALGO | 0.998587 | 4.276626 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2025-04-08T17:03: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": "90bd300d63a6... |
1f8ab495-7e5e-40fe-b789-1b87492035b4 | Weaasel/Algorithm-ProblemSolving | BOJ/Segment Tree/17230.cpp | //문제집 만들기
//Segment Tree, Set, Logical
/*
어떤 문제 a를 풀기 위해 먼저 풀어야 할 문제 b가 간선정보로 정의되어 있을 때,
구간 [x, y] 를 전부 해결할 수 있니? 의 쿼리를 처리해야 한다.
세그트리의 원소를 해당 구간 부모중 {가장 작은값, 가장 큰 값} 으로 정의하면,
가장 작은값이 x 이상이고 가장 큰 값이 y 이하면 되는 문제가 되겠다.
각 문제의 선행문제들의 집합을 set으로 관리하고 이를 추가/삭제하는 연산을 적절히 구현한다.
어떤 선후관계가 생길 때, 즉 b -> a 인 관계가 생기거... | ALGO | 0.999846 | 4.857286 | {
"github_metadata": {
"branch": "master",
"commit_count": 658,
"repo_created_at": "2020-03-19T06:14:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "993446fe... |
8c0fd481-8041-4fb7-a423-e77cf5241b0a | Mindev27/Solving-BOJ | 백준/Gold/1549. K/K.cc | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define X first
#define Y second
#define pii pair<int, int>
#define pll pair<ll, ll>
int N;
vector<ll> v;
void input() {
cin >> N;
v.resize(N+1, 0);
for(int i = 1; i <= N; i++) {
cin >> v[i];
}
}
void solve() {
f... | ALGO | 0.999964 | 3.891498 | {
"github_metadata": {
"branch": "main",
"commit_count": 1133,
"repo_created_at": "2024-01-02T11:14: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": "eff084475... |
9062f363-975b-4414-98fa-5aa86ff8771d | imxinlei/leetcode | 609_Find_Duplicate_File_in_System.cpp | /*
* https://leetcode.com/problems/find-duplicate-file-in-system/description/
*
* Given a list of directory info including directory path, and all the files with contents in this directory, you need to find out all the groups of duplicate files in the file system in terms of their paths.
*
* A group of duplicate f... | ALGO | 0.99516 | 5.675412 | {
"github_metadata": {
"branch": "master",
"commit_count": 261,
"repo_created_at": "2017-04-04T05:59:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4cc3bbb5... |
e08b0a07-af74-4354-99f3-89682493ec62 | ThanGeo/topology-detection | TwoLayerFilter/include/filter.h | #ifndef TWO_LAYER_FILTER_H
#define TWO_LAYER_FILTER_H
#include "relation.h"
#include "SpatialLib.h"
#include "APRIL.h"
namespace two_layer
{
namespace standard
{
/**
* @brief Performs the Two Layer standard spatial intersection join MBR evaluation filter
*/
unsigned long long... | ALGO | 0.968717 | 5.35819 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2024-03-07T12:21:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "204f33a6eb0... |
6c07a686-ed79-4806-b6be-1f6b4b762e33 | utec-ads-2020-1/list-of-conquests-10420-JuanGA12 | main.cpp | #include <iostream>
#include <map>
using namespace std;
int main() {
int lines = 0;
string country;
char woman[75]; // la combinacion de country + woman deberia ser máximo 75 caracteres
map<string, int> table; // guarda el pais y la cantidad de mujeres que Giovanni amó en ese pais
cin >> lines;
... | ALGO | 0.998713 | 3.993719 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-04-08T00:09:18.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "10412fdc96c... |
c5fff00a-2125-459d-be1f-cd2c7cc279d0 | rupav/cp | competitive_coding/contests/tags/dp/CSES/RemovingDigits.cpp | #include<bits/stdc++.h>
using namespace std;
#define watch(x) cout << (#x) << " is " << (x) << endl
#define fr(i,n) for(int i=0; i<n; i++)
#define rep(i, st, en) for(int i=st; i<=en; i++)
#define repn(i, st, en) for(int i=st; i>=en; i--)
#define sq(a) (a) * (a)
typedef long long ll;
typedef pair<int, int> pii;
typedef... | ALGO | 0.999856 | 4.789239 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-01-30T05:56:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4b9514817d01... |
79f23375-640a-49b2-ad4e-1b97f34bcbd6 | hit7sh/CodeForces | Educational round 110/D.cpp | void solve() {
int k;
cin >> k;
int n = (1 << k);
vi dp(n);
string s; cin >> s; s += '#'; reverse(all(s));
function<void(int)> update = [&](int x) {
if (x >= n) return;
if (x >= (1 << (k - 1))) {
dp[x] = 1 + (s[x] == '?');
return;
}
if (s[x] == '?')
dp[x] = dp[x*2] + dp[x... | ALGO | 0.999967 | 4.340703 | {
"github_metadata": {
"branch": "main",
"commit_count": 396,
"repo_created_at": "2020-11-26T09:59: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": "3ada3beed5... |
221e989b-f314-4d61-85bb-7ee49aa1ca60 | Aditya-Kadu/CrackYourPlacements | 403-Frog-Jump.cpp | class Solution {
public:
bool makeit(vector<int>& stones, int ind, int jmp, vector<vector<int>>& dp) {
if(ind>=stones.size()) return false;
if (ind == stones.size() - 1) return true;
if (dp[ind][jmp] != -1) return dp[ind][jmp];
for (int j = ind + 1; j < stones.size(); j++) ... | ALGO | 0.999949 | 5.577586 | {
"github_metadata": {
"branch": "main",
"commit_count": 202,
"repo_created_at": "2024-08-13T13:28: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": "bdaf79310e... |
3bbf2cbe-ecdd-4ee4-87f4-134b46393491 | AndersonKao/CP_Problems | Virtual/Asia_Tsukuba_201718/F.cpp | #include <bits/stdc++.h>
using namespace std;
template<typename T> using vec = vector<T>;
template<typename T> using deq = deque<T>;
template<typename T> using p = pair<T, T>;
#define eb emplace_back
#define F first
#define S second
#define al(a) a.begin(),a.end()
using ll = long long;
const ll inf = 200000000000;
us... | ALGO | 0.999975 | 3.962727 | {
"github_metadata": {
"branch": "master",
"commit_count": 244,
"repo_created_at": "2022-01-23T04:16:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "885b83fb... |
f6c9c051-7c58-4d38-9dea-d84cb8290329 | hionpu/BaekJoon | Cpp/13549_hide_and_seek_3.cpp | #include <iostream>
#include <queue>
#include <vector>
#include <climits>
using namespace std;
typedef pair<int, int> pii;
auto comparator = [](pii a, pii b)
{
return a.second > b.second;
};
priority_queue<pii, vector<pii>, decltype(comparator)> pq(comparator);
int costs[100001];
int dx[2] = { -1, 1 };
int... | ALGO | 0.999837 | 3.992593 | {
"github_metadata": {
"branch": "master",
"commit_count": 34,
"repo_created_at": "2024-11-13T01:29: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": "766aa2f4a... |
10945a6d-6b0c-4585-9e5e-08f640355138 | Jimmy-Lin/GeneralizedOptimalSparseDecisionTrees | src/index.cpp | #include "index.hpp"
#ifdef INCLUDE_OPENCL
cl::Device Index::device = cl::Device();
cl::Platform Index::platform = cl::Platform();
cl::Context Index::context = cl::Context();
cl::Program Index::program = cl::Program();
cl::CommandQueue Index::queue = cl::CommandQueue();
unsigned int Index::group_size = 48;
#endif
Ind... | ALGO | 0.995789 | 3.471251 | {
"github_metadata": {
"branch": "master",
"commit_count": 30,
"repo_created_at": "2020-06-14T06:18:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 65,
"forks": 52,
"issues": 11,
"pull_requests": 2
},
"file_meta": {
"content_id": "f74621... |
d555e6d1-265d-4825-9ce6-915e2ff1e03a | AliGouarab/Multiplayer-Sudoku | grid_generation/include/generate_puzzles.hpp | #ifndef _GENERATE_PUZZLE_HPP_
#define _GENERATE_PUZZLE_HPP_
#include "full_grid.hpp"
#include "partial_grid.hpp"
#define NB_LEVELS 3
extern "C" {
typedef enum {
GRID_VALUE_ORIGIN_START,
GRID_VALUE_ORIGIN_PLAYER_1,
GRID_VALUE_ORIGIN_PLAYER_2
} grid_value_origin_t;
typedef struct {
full_grid_t solution;
f... | ALGO | 0.99471 | 6.350665 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-11-02T01:38: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": "151188b90101... |
d3c75c58-9800-4a55-89c6-8e763f2a3615 | MAZHARMIK/Interview_DS_Algo | Design/Design Underground System.cpp | /*
MY YOUTUBE VIDEO ON THIS Qn : https://www.youtube.com/watch?v=AdRVFQo0l7w
Company Tags : Amazon, Bloomberg (Most frequently asked)
Leetcode Link : https://leetcode.com/problems/design-underground-system/
*/
class UndergroundSystem {
public:
unordered_map<int, pair<string... | ALGO | 0.994945 | 6.01204 | {
"github_metadata": {
"branch": "master",
"commit_count": 5946,
"repo_created_at": "2020-07-12T13:13:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2586,
"forks": 1357,
"issues": 7,
"pull_requests": 37
},
"file_meta": {
"content_id": "... |
51a328fd-ad51-4c62-8d00-cd01382c94a1 | ABKGroup/TritonPart | OpenROAD/src/ppl/src/HungarianMatching.cpp | /////////////////////////////////////////////////////////////////////////////
//
// BSD 3-Clause License
//
// Copyright (c) 2019, The Regents of the University of California
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the... | ALGO | 0.998304 | 6.328305 | {
"github_metadata": {
"branch": "main",
"commit_count": 40,
"repo_created_at": "2022-12-31T03:19:20.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 27,
"forks": 1,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "f1a5476800f... |
a38721b8-15f5-4e65-a09a-8115dda7f3e1 | ishandutta2007/codeforces-g | gnomina007/normal/637/D.cpp | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define fs first
#define sc second
#define all(x) x.begin(), x.end()
typedef long long ll;
typedef unsigned long long uli;
typedef long double ld;
const int INF = 1e9;
const ll lINF = 1e18;
const int P = 1e9 + 7, Q = 1e9 + 9;
c... | ALGO | 0.99972 | 3.201906 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:55: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": "cb76fdf5915b... |
21f5f20c-054d-4801-9105-1b1b94b72bb7 | Looma1116/Coding_treatment | Algorithm/2021autumn/week6_5.cpp | #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
void singleMode(int *A, int n)
{
int flag = 0, direction = 0, max, min;
if (n < 2)
{
printf(" 0");
return;
}
if (A[0] < A[1])
{
direction = 1;
}
else if (A[0] > A[1])
{
direction ... | ALGO | 0.99998 | 3.323237 | {
"github_metadata": {
"branch": "main",
"commit_count": 153,
"repo_created_at": "2021-01-03T02:43: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": "9a723e26f7... |
7eb08e13-fc5e-43e5-ae9f-67f1bc9e04be | iducn/Paddle | paddle/fluid/operators/search_compute.h | /* Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or... | ALGO | 0.944502 | 6.938102 | {
"github_metadata": {
"branch": "develop",
"commit_count": 26689,
"repo_created_at": "2020-04-07T12:12:36.000Z",
"is_fork": true,
"is_org_owned": false,
"forked_from": "PaddlePaddle/Paddle",
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"con... |
4168814d-cb5d-49ea-a2fe-a382bf257428 | christsai777/Pokeman | Pokeman/Pokeman/bstADT.h | /*
Header file for the BST ADT
Written by <NAME>
*/
#ifndef BSTADT_H
#define BSTADT_H
#include <iostream>
#include <string>
#include "hashADT.h"
#include "node.h"
#include "pokemon.h"
using namespace std;
class bstADT
{
private:
Node * root;
public:
//constructor that receives a hashtable
bstADT();
bstADT(const... | ALGO | 0.993662 | 4.670587 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2016-06-09T20:36: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": "2e6c92a97... |
eaba0939-a7b2-49b9-b83c-0d39d61de50a | voidcs/UVA_Online_Judge_Solutions | UVA_10114/main.cpp | /*
* File: main.cpp
* Author: <NAME>
* Created on February 11th, 2019, 12:36 PM
* Purpose: Creation of Template to be used for all
* future projects
*/
//System Libraries
#include <bits/stdc++.h>
using namespace std;
//User Libraries
//Global Constants, no Global Variables are allowed
//Math/Phys... | ALGO | 0.999772 | 3.621795 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-08-04T07:39: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": "4e833e0df5... |
12528054-5722-4f05-9fb2-ea1fc9c550cf | kripken/ammo.js | bullet/Demos/NativeClient/scripting_bridge.cc | // Copyright (c) 2011 The Native Client Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "scripting_bridge.h"
namespace {
const char* const kWhiteSpaceCharacters = " \t";
// Helper function to pull out the next token in |to... | TOOL | 0.981423 | 7.000389 | {
"github_metadata": {
"branch": "main",
"commit_count": 434,
"repo_created_at": "2011-05-28T23:08:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4355,
"forks": 574,
"issues": 161,
"pull_requests": 14
},
"file_meta": {
"content_id": "4d... |
8d3442c8-cc94-410f-99ad-189f11a4f8b2 | franzmohr/bvartools | src/kalman_dk.cpp | #include <RcppArmadillo.h>
// [[Rcpp::depends("RcppArmadillo")]]
// [[Rcpp::interfaces(r, cpp)]]
//' Durbin and Koopman Simulation Smoother
//'
//' An implementation of the Kalman filter and backward smoothing
//' algorithm proposed by Durbin and Koopman (2002).
//'
//' @param y a \eqn{K \times T} matrix of endogeno... | ALGO | 0.999864 | 6.332994 | {
"github_metadata": {
"branch": "master",
"commit_count": 318,
"repo_created_at": "2018-10-30T20:37:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 33,
"forks": 11,
"issues": 4,
"pull_requests": 0
},
"file_meta": {
"content_id": "bd2603... |
1052f5fe-0e86-4709-8857-b2f702e14625 | TheJuliana/AaDS_4_semester | lab_17/main.cpp | // 16.Решить задачу о раскладке по ящикам
#include <iostream>
#include <vector>
#include <cmath>
int boxes = 1;
void backpackProblem(std::vector<int>& things, int maxWeight) {
int amount = things.size();
int maxAmount = 0;
std::vector<int> maxDelete;
for (int i = 0; i < pow(2, amount); i++) {
... | ALGO | 0.999949 | 4.270607 | {
"github_metadata": {
"branch": "main",
"commit_count": 55,
"repo_created_at": "2023-07-19T10:30: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": "5db436069bf... |
639e5b5e-605f-412a-8c91-b098d6f53b88 | kiruba-r11/Data-Structures-and-Algorithms | Linked Lists/Doubly LL/insert_at_position.cpp | #include <iostream>
using namespace std;
class dll_node {
public:
dll_node* prev;
int data;
dll_node* next;
};
void createDLL(dll_node* &head) {
int choice;
dll_node* temp = head;
do {
int data;
cout << "Enter Data : ";
cin >> data;
dll_node* newNode = new dll_node();
newNode->data = data;
ne... | ALGO | 0.9998 | 5.243412 | {
"github_metadata": {
"branch": "main",
"commit_count": 29,
"repo_created_at": "2021-01-01T14:57:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "8d2d3a6c628... |
2402992f-dd62-4099-892f-2e8217a3fd68 | bjornnorgaard/DuckMaster3001 | Backend/User/LLToolkit.h | #ifndef LLTOOLKIT_H_
#define LLTOOLKIT_H_
#include <iostream>
#include "Node.h"
using namespace std;
template<typename T>
class LLToolkit
{
public:
// Precondition: headPtr points to the head of a list
// Postcondition: Info has been inserted at the head of the list, and headPtr is updated
void headInsert... | ALGO | 0.992989 | 5.251004 | {
"github_metadata": {
"branch": "master",
"commit_count": 311,
"repo_created_at": "2015-02-08T17:36: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": "cdd694f9... |
f96dfd80-e61b-4839-af74-76dcf0e344a5 | DanyloOS/LNU | OOP/Lab3/MPD_MN_Window/mainwindow.cpp | #include "mainwindow.h"
#include "ui_mainwindow.h"
#include <cmath>
#include <QMessageBox>
#include <QString>
#define PI 3.14159265359
using namespace std;
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
ui->label_Kmax->hide();
ui->line_K... | ALGO | 0.981564 | 4.611716 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2019-09-26T04:08: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": "f3a9a22a4... |
e854c735-1fae-4887-981f-7564e2daa0a8 | kimyu0218/algorithm | Baekjoon/3000-3999/3020.cpp | #include <iostream>
#include <vector>
using namespace std;
typedef pair<int, int> pi;
const int H = 1e5 * 5 + 1;
int top_dp[H + 1];
int bottom_dp[H + 1];
void prefix_sum(int n, int h, vector<int> lengths) {
for(int i = 0; i < n; i++) {
int len = lengths[i];
if(i % 2) {
top_dp[len]++... | ALGO | 0.99995 | 4.001922 | {
"github_metadata": {
"branch": "main",
"commit_count": 517,
"repo_created_at": "2021-09-05T15:47:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "031e3c46b7... |
a6c7176b-90f7-45a8-aa6e-a5fa59dc77a9 | Ayjay/aoc | 2023/day7.cpp | //#define BOOST_SPIRIT_X3_DEBUG
#include "aoc.h"
#include <vector>
#include <tuple>
#include <string_view>
#include <boost/fusion/adapted/std_array.hpp>
// namespace boost { namespace spirit { namespace traits {
// template <typename T, size_t N>
// struct is_container<std::array<T, N>, void> : mpl::fals... | ALGO | 0.999126 | 5.901463 | {
"github_metadata": {
"branch": "master",
"commit_count": 231,
"repo_created_at": "2022-12-02T22:10: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": "24741e7a... |
1e51e7f5-fed4-4fb1-a571-980f7f78e2b0 | ishandutta2007/codeforces-a | abc864197532/normal/1469/D.cpp | #include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define test(x) cout << #x << ' ' << x << endl;
#define printv(x) {\
for (auto i : x) cout << i << ' ';\
cout << endl;\
}
#define pii pair <int, int>
#define pll pair <lli, lli>
#d... | ALGO | 0.999194 | 3.75264 | {
"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": "d34d61fdf5b1... |
40b7ff20-3656-45ae-a6cf-0611005546e7 | HarshGupta02/Data-Structure-And-Algorithm | Heaps/Rearrange characters.cpp | class Solution
{
public:
string rearrangeString(string str)
{
vector<int>freq(26,0);
int n = str.size();
for(int i = 0; i < n ; i ++){
freq[str[i] - 'a'] ++;
}
int nax = -1;
char ch;
for(int i = 0; i < 26; i ++){
if(freq[i] > na... | ALGO | 0.999953 | 4.242723 | {
"github_metadata": {
"branch": "master",
"commit_count": 666,
"repo_created_at": "2022-06-17T05:43: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": "53afb19b... |
3c00aed8-45cc-4bb2-ac66-280207b66cd8 | rogel-matias/lic | 1er año/Fundamento de programacion/FP/C++ (C2)/PRÁCTICAS RESUELTAS/Practica 5/18/Version de Chotawer/g5_ej18.cpp | #include <iostream>
#include <string>
#include <iomanip>
using namespace std;
/*
18. Ingrese una lista de N palabras y almacénelas en un arreglo. Luego genere una matriz de
Nx3 donde se almacenará lo siguiente: en la columna 1 el largo de la palabra, en la columna 2
la cantidad de consonantes, en la 3 la cantidad... | ALGO | 0.94324 | 3.802843 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2025-03-28T01:53: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": "bed600b6c0... |
9c8d6aad-e19b-4aab-bf70-c7e5297adf9c | lucianmot/codechef-problems | 1001 - C++ - Programming Languages.cpp | // C++ - Programming Languages
// Rating - 1001
// https://www.codechef.com/submit/PROGLANG
#include <bits/stdc++.h>
using namespace std;
int main() {
int testCases;
cin >> testCases;
while(testCases--) {
int a, b, a1, b1, a2, b2;
cin >> a >> b >> a1 >> b1 >> a2 >> b2;
if (( a == a1 && b == b1 ) || ... | ALGO | 0.999527 | 4.359966 | {
"github_metadata": {
"branch": "main",
"commit_count": 647,
"repo_created_at": "2022-09-29T14:12:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fc7af29157... |
a6abe255-9c6a-4dc9-9a8b-0bea3cd94039 | Chae-yun/cpp | chap4/practice_hw/calculate_6.cpp | #include <iostream>
using namespace std;
double add(double, double);
double min(double, double);
double mul(double, double);
double div(double, double);
int main(){
double one, two;
cout << "->-> 사칙연산 기계 <-<-\n\n";
cout << "첫 번째 숫자를 입력하시오 : ";
cin >> one;
cout << "두 번째 숫자를 입력하시오 : ";
cin >> two;
cout << "\n더... | TOOL | 0.90987 | 3.5965 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2016-11-29T08:11: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": "c417e74a4e... |
a42a5908-8332-4454-8026-11b7a028b372 | Slingshot-Physics/slingshot-community | common/math/src/heap_matrix.cpp | #include "heap_matrix.hpp"
#ifdef BUILD_SSE
#include "simd_ops.hpp"
#endif
#include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
HeapMatrix::HeapMatrix(unsigned int numRows, unsigned int numCols)
: num_rows(numRows)
, num_cols(numCols)
, num_padded_rows_(rowPadding(numRows, numCols))
... | ALGO | 0.988864 | 5.567376 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-11-03T20:17:13.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 133,
"forks": 7,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "02478a23852... |
ed76c8e8-d38d-401c-8b37-4b2bbcf379ac | kevin-chalmers/set10108 | labs/lab01/monte-carlo-pi.cpp | #include <iostream>
#include <vector>
#include <random>
#include <cmath>
#include <chrono>
#include <thread>
#include <fstream>
using namespace std;
using namespace std::chrono;
void monte_carlo_pi(size_t iterations)
{
// Seed with real random number if available
random_device r;
// Create random number g... | DATA | 0.916824 | 5.86067 | {
"github_metadata": {
"branch": "master",
"commit_count": 76,
"repo_created_at": "2018-07-07T12:42:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 9,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "95e126bf0... |
31d234b6-9fe9-4417-97ce-783349e166a0 | GabrielSantana013/MaratonaDeProgramacao | Lista-FEI/Grafos/1100MovimentosDoCavalo.cpp | #include <bits/stdc++.h>
#define f first
#define s second
#define _ ios_base::sync_with_stdio(0);cin.tie(0);
#define endl '\n'
#define dbg(x) cout << #x << " = " << x << endl
typedef long long ll;
const int INF = 0x3f3f3f3f;
const ll LINF = 0x3f3f3f3f3f3f3f3fll;
using namespace std;
const int MAX = 8;
vector<vector<in... | ALGO | 0.999863 | 4.405585 | {
"github_metadata": {
"branch": "main",
"commit_count": 134,
"repo_created_at": "2024-03-18T12:29: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": "a49c88000a... |
2db60a76-d110-4d04-9666-7f6ea3de0896 | SYCstudio/OI | Practice/2019.2.11/CFGym102056E.cpp | #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<algorithm>
#include<iostream>
using namespace std;
#define mem(Arr,x) memset(Arr,x,sizeof(Arr))
const int maxN=5010;
const int Num=5000;
const int Mod=998244353;
int n,now,all=1;
int Dp[2][maxN+maxN][2][2];
int F[maxN+maxN][2],G[maxN+maxN][2];
char Input[m... | ALGO | 0.999985 | 3.804012 | {
"github_metadata": {
"branch": "master",
"commit_count": 585,
"repo_created_at": "2018-06-07T14:07:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a027cb29... |
2a7ab7f6-7a41-4f72-830e-d45ff028a41c | hoyong2007/Algorithm | codejam2018/Trouble_Sort.cpp | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <iostream>
#include <algorithm>
#pragma warning(disable: 4996)
using namespace std;
int T, N, CNT = 0;
int numE[100000] = { 0 };
int numO[100000] = { 0 };
int main()
{
int i, idx;
int sizeE, sizeO;
scanf("%d", &T);
for (int t_case = 0; t_case... | ALGO | 0.999805 | 3.949114 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2018-03-09T13:12: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": "f450753f6... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.