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 |
|---|---|---|---|---|---|---|---|
de7e1dab-16cc-46fa-9989-5cd18cf8a533 | hyperk/Geant4 | source/4.9.6.p04/source/processes/electromagnetic/standard/src/G4PEEffectFluoModel.cc | //
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration... | ALGO | 0.975846 | 6.401745 | {
"github_metadata": {
"branch": "main",
"commit_count": 36,
"repo_created_at": "2015-01-26T21:29:00.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4,
"forks": 11,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f644aa92588... |
0f38ed91-f6fa-4b8e-9814-1b1077ce6511 | chmnchiang/bcw_codebook | Contest/NEERC2011/pJ.cpp | #include<bits/stdc++.h>
#include<unistd.h>
using namespace std;
#define FZ(n) memset((n),0,sizeof(n))
#define FMO(n) memset((n),-1,sizeof(n))
#define MC(n,m) memcpy((n),(m),sizeof(n))
#define F first
#define S second
#define MP make_pair
#define PB push_back
#define ALL(x) begin(x),end(x)
#define SZ(x) ((int)(x).size()... | ALGO | 0.999941 | 3.560778 | {
"github_metadata": {
"branch": "master",
"commit_count": 361,
"repo_created_at": "2014-06-03T11:38:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 111,
"forks": 22,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "994b8... |
24993ccd-91e5-4a99-9b8c-f7bd536da6e9 | surarijit/DSA_ALGO | sortintegersbypowervalue.cpp | /*
TELL YOUR CODE TO START BELIEVING IN GOD!!
THEY HATE US BECAUSE THEY AIN'T US
<NAME>
@duke_knight
@surcode
IIT ISM
WORK SO HARD THAT YOUR IDOL BECOMES YOUR COMPETITOR
*/
#include<bits/stdc++.h>
#define pi pair<int,int>
#define SIZE 100008
#define mod (ll)(1e9+7)
#define max(a,b) (a>b?a:b)
#define min(a,b) ... | ALGO | 0.999981 | 3.602517 | {
"github_metadata": {
"branch": "master",
"commit_count": 49,
"repo_created_at": "2020-07-22T09:50:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "34b617b59... |
3ab6e436-97fc-49cd-91d7-847c1b5c2df1 | lwfeng-ch/DataStructure | SqStack/LinkStack.cpp | #include <iostream>
using namespace std;
typedef int SElemType;
typedef int Status;
#define TRUE 1
#define FALSE 0
#define OK 1
#define ERROR 0
#define OVERFLOW -1
typedef struct StackNode{
SElemType data;
struct StackNode *next;
}StackNode, *LinkStack;
LinkStack S;
void InitStack(LinkStack &S)
{
S = NUL... | ALGO | 0.999027 | 3.865049 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-15T16:39: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": "e6089ee4f217... |
420a31fb-d3b9-4138-8f47-52595b5f6dbf | aoliveros2/lab1 | lab1.cpp | ///modified by: <NAME>
//date: 9/12/19
//
//Author: <NAME>
//3350 Spring 2019 Lab-1
//This program demonstrates the use of OpenGL and XWindows
//
//Assignment is to modify this program.
//You will follow along with your instructor.
//
//Elements to be learned in this lab...
// .general animation framework
// .animation... | TOOL | 0.951248 | 4.670562 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2019-08-30T16:54: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": "20f873e3d... |
25445d00-70eb-483b-a6eb-9abf3e917c52 | arokua/pastCodeAssignments | 2019/s1/adds/assignment7/main.cpp | #include <iostream>
#include <vector>
#include "Node.h"
#include "LinkedList.h"
#include <string>
using namespace std;
//Holds the numbers of original nodes from input
static int nNodes;
vector<string> takeInput(){
// Get input from console
// Split them by spaces and store to a vector
string in;
vecto... | ALGO | 0.99963 | 5.660745 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2024-08-21T05:52:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1e991cdddb28... |
ab969b7a-bb0b-4ce5-b9ac-c156fd46f88b | SuppFear/conj_grad | tests/timer.cpp | #include "../../grad-SGS/src/grad-SGS.hpp"
#include "../../chebyshev_acceleration/src/chebyshev.hpp"
#include "../../simple_iterative_methods/src/iterations.hpp"
#include "../src/conj_grad.hpp"
#include <fstream>
#include <time.h>
#include <chrono>
int main(){
std::vector<double> x0 = {1., 2., 3.};
std::vector... | ALGO | 0.997203 | 4.84797 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-18T21:06: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": "55a0e5b88e26... |
8a00cfad-651a-4f1c-9797-8dfb6f943f24 | ijoh82/ECE599_Hw02 | joh_ws/src/joh_gap_finding/src/find_gap.cpp | #include "ros/ros.h"
#include "sensor_msgs/LaserScan.h"
#include "geometry_msgs/Vector3.h"
#include "joh_gap_finding/gaps.h"
// (angleMin=-2.355, angleMax=2.355, angleIncr=0.004365, numAngle=1080)
float angleMin = -2.355;
float angleMax = 2.355;
int angleCnt = 1080;
// float angleIncre = 0.04365;
float angleIncr =... | ALGO | 0.995881 | 3.028191 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-04-18T06:31: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": "24c2a8b200... |
402f6d1f-c706-45ac-8096-addba8f20ca1 | ChrisKimZHT/Algorithm-Problems | Contest/Codeforces/Regular/#864 (Div. 2)/C.cpp | #include <bits/stdc++.h>
#define int long long
// #define endl '\n'
using namespace std;
int query(int r, int c)
{
cout << "? " << r << " " << c << endl;
int t;
cin >> t;
return t;
}
void ans(int r, int c)
{
cout << "! " << r << " " << c << endl;
return;
}
void solve()
{
int n, m;
ci... | ALGO | 0.999912 | 3.493675 | {
"github_metadata": {
"branch": "master",
"commit_count": 366,
"repo_created_at": "2022-03-26T17:03:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "81d46a6f... |
0c4b36bd-febc-4db0-8674-b6d0259a84b8 | eunaJung01/Algorithm-Solving | BOJ/Lowest_Common_Ancestor/BOJ3584.cpp | #include <iostream>
#include <vector>
using namespace std;
const int MAX_NUMBERS = 10001;
int N;
int parents[MAX_NUMBERS];
vector<int> children[MAX_NUMBERS];
int depth[MAX_NUMBERS];
int setRoot() {
for (int i = 1; i <= N; ++i) {
if (parents[i] == 0) {
return i;
}
}
return 0;
... | ALGO | 0.999983 | 5.708786 | {
"github_metadata": {
"branch": "main",
"commit_count": 619,
"repo_created_at": "2022-06-29T02:40:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "216156b1ae... |
033982ea-244e-4ff9-b143-6653b8c48600 | jkaye2012/fixed-size-hash | include/fixed-size/hash.hpp | #pragma once
#include <array>
#include <concepts>
#include <cstddef>
#include <functional>
#include <tuple>
#include <type_traits>
#include <utility>
namespace fixed_size {
// clang-format off
template<typename C>
concept FixedSize = std::tuple_size<C>::value > 0;
template<typename C>
concept HashCombine = std::is_... | ALGO | 0.911848 | 6.97091 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2023-05-01T13:46:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8d4f949f634d... |
8aa11341-ae2a-455c-85fb-b0f9ccc5a8d7 | SmileiPIC/Smilei | src/ElectroMagnSolver/PML_Solver3D_Yee.cpp | #include "PML_Solver3D_Yee.h"
#include "ElectroMagn.h"
#include "ElectroMagnBC3D_PML.h"
#include "Field3D.h"
#include "Patch.h"
PML_Solver3D_Yee::PML_Solver3D_Yee( Params ¶ms ):
Solver3D( params ),
pml_sigma_( 3, NULL ),
pml_kappa_( 3, NULL )
{
////Define here the value of coefficient kappa_x_max, ... | ALGO | 0.966854 | 5.43751 | {
"github_metadata": {
"branch": "master",
"commit_count": 11568,
"repo_created_at": "2016-06-23T14:07:44.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 384,
"forks": 130,
"issues": 21,
"pull_requests": 1
},
"file_meta": {
"content_id": "8b... |
745cd3bf-b1d0-4ace-bb0a-0d56f37bdcd6 | tlsgkdns/study | DataStructure/Graph-Tree/MinimumSpanningTree/4386_makeConstellation.cpp | #include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;
vector<vector<double>> cost;
vector<pair<int, int>> pos;
vector<int> set;
double getDist(double x1, double y1, double x2, double y2)
{
return sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2));
}
int getParent(int x)
{
if (set[x]... | ALGO | 0.99963 | 4.108023 | {
"github_metadata": {
"branch": "master",
"commit_count": 2028,
"repo_created_at": "2021-02-18T10:49: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": "ed8d11c... |
0beb99b6-2643-4ca3-bd06-31473747cdff | Tushar-Sukhwal/codeforces | A_Alice_s_Adventures_in_Chess.cpp | // Author :- Tushar || 11-01-2025 11:25:13
#include <bits/stdc++.h>
#define int long long
using namespace std;
/*
∧_∧
(。・ω・。)つ━☆・*。
⊂/ / ・゜
しーJ °。+ * 。
.・゜
*/
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int tt;
cin >> tt;
whil... | ALGO | 0.999942 | 5.008232 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2023-01-31T11:16:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0338882aab8... |
9ce24756-cbaf-4e86-a0b6-79e81cee38ed | marioyc/Online-Judge-Solutions | Live Archive/2068 - PC^3.cpp | #include <cstdio>
#include <cstring>
#include <algorithm>
#include <map>
#include <set>
using namespace std;
int main(){
int tc,P,T,R;
int val[13];
map<int, int> sc;
set< pair<int, int> > S;
while(true){
scanf("%d %d %d %d",&tc,&P,&T,&R);
if(tc == 0 && P == 0 && T == 0 && R ==... | ALGO | 0.998688 | 3.197499 | {
"github_metadata": {
"branch": "master",
"commit_count": 364,
"repo_created_at": "2010-09-24T16:07:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 603,
"forks": 359,
"issues": 1,
"pull_requests": 9
},
"file_meta": {
"content_id": "aa9b... |
6e8bff2e-1673-4e04-a711-68f00ba35f63 | tpalayda/asd | Exercises/Lista4/t2.cpp | #include <iostream>
#include <algorithm>
template<typename T=size_t>
constexpr void printArray(const T*const arr,const size_t& n = 0)
{
for(size_t i = 0; i < n; ++i)
std::cout << arr[i] << " ";
std::cout << std::endl;
}
void counting_sort(size_t*const& t,const size_t& n,size_t c)
{
size_t exp = 1;... | ALGO | 0.999871 | 5.275276 | {
"github_metadata": {
"branch": "master",
"commit_count": 100,
"repo_created_at": "2018-03-01T09:53:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "33247153... |
b17a7db0-8c8d-41ee-ab7a-404d54e6e7d3 | qiaotian/CodeSprint | leetcode/cpp/qt_bitwise_and_of_numbers_range.cpp | // 3rd solution (代码冗长 ugly)
/*
class Solution {
public:
int rangeBitwiseAnd(int m, int n) {
if(m == 0) return 0;
int moveFactor = 1;
while(m != n){
m >>= 1;
n >>= 1;
moveFactor <<= 1;
}
return m * moveFactor;
}
};
*/
// 2nd solution (6... | ALGO | 0.999964 | 6.116737 | {
"github_metadata": {
"branch": "master",
"commit_count": 675,
"repo_created_at": "2016-02-12T17:26:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "635418b7... |
d06de409-9a8e-4a8a-b15b-959489f87b5f | ishandutta2007/codeforces-f | flashmt/normal/436/A.cpp | #include <bits/stdc++.h>
using namespace std;
int n, height[2222], mass[2222], type[2222];
int calc(int startingType, int strength)
{
int candies = 0, status[2222] = {0}, currentType = startingType;
while (1)
{
for (int i = 0; i < n; i++)
if (height[i] <= strength && !status[i])
status[i] = 1;
int ... | ALGO | 0.999877 | 3.583666 | {
"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": "654748bf3a17... |
b684e0c4-be19-4c40-a035-e5dd0497bf23 | IshanManchanda/competitive-cpp | Codeforces/Contests/1569 - Educational Codeforces Round 113/[WIP] D - Inconvenient Pairs.cpp | #include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define PB emplace_back
#define MP make_pair
#define MT make_tuple
#define REP(i,a,b) for (ll i = (a); i < (b); ++i)
#define RREP(i,a,b) for (ll i = (a); i > (b); --i)
#define FAST_IO ios_base::sync_with_stdio(false); cin.tie(nullptr); co... | ALGO | 0.99996 | 3.441254 | {
"github_metadata": {
"branch": "master",
"commit_count": 144,
"repo_created_at": "2019-04-29T11:25:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f9d2a595... |
47406b60-c8e7-4b3e-871c-0f6241690bdc | alphakys/leetcode | main.cpp | //
//
//class BinarySearch {
//public:
// int search(vector<int> &nums, int target) {
//
// int len = nums.size();
// int first = 0;
// int end = len;
// int pivot = (first + end) / 2;
// int answer = 0;
//
// while (first <= pivot) {
// cout << "first : " << firs... | ALGO | 0.999955 | 4.605407 | {
"github_metadata": {
"branch": "master",
"commit_count": 110,
"repo_created_at": "2022-11-01T08:27:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0d28829e... |
20a3ffdd-040b-4a70-a7d1-7bb51960112a | abhinashgiri/CP | BIT.cpp | #include "bits/stdc++.h"
using namespace std;
template <typename T>
class BIT{
int n;
vector<T> bit;
public :
BIT(int tree_size){
n = tree_size;
bit.resize(n + 5) ;
}
bool update(int x, T val){
if(x>n or x<1)return false;
for (; x <= n; x += x & -x){
bit... | ALGO | 0.999276 | 3.442355 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2022-01-05T10:41: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": "5a2eac9c1... |
fbbde28f-e8f7-4632-959b-549c1a88b2a5 | HenryGabriel-2407/Estruturas-de-Dados | edi_exemplos de Struct e Ponteiro/ponteiro_C++.cpp | #include <iostream>
using namespace std;
int main() {
int a , b , *ptr1 , *ptr2 , *ptr3;
a = 8;
cout << "Valor de a : " << a << endl;
cout << "Endereco de a : " << &a << endl << endl; //o uso do & indica que deseja-se acessar o endereço em hexadecimal da variável a
ptr1 = &a; //... | ALGO | 0.987881 | 3.847176 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-09-15T18:01: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": "916cd4ce1395... |
da1bc2f0-9a15-496f-9606-0fcc28c2078c | Merlinkk/Codes | C++/23-subsets.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
void backtrack(vector<int> &nums, int start, vector<int> &path, vector<vector<int>> &result)
{
result.push_back(path);
for (int i = start; i < nums.size(); ++i)
{
if (i > start && nums[i] == nums[i - 1]) // Avoid dupli... | ALGO | 0.999866 | 6.059627 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T04:40: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": "c1b31fbb95f2... |
35238a01-6f16-4fcc-82a6-bb5573f5c1c3 | ripankundu/Scaleable-Computing-project-work | serial.cpp | """
@author:<NAME>
M.Sc in Electrical Engineering
University of Rostock
"""
#include <iostream>
#include <cstdlib>
#include <png.h>
#define SIZE 6000
using namespace std;
/* 2D array for storing pixel value of input and output image */
unsigned char pointerImageRowBytes[6000][6000];
unsigned char convolvedImagePixel... | ALGO | 0.963848 | 4.990067 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2021-03-04T20:59:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "edf4161ed1e7... |
586be1de-e7d6-4c6d-8ce6-39855e0cd1c3 | liuyaqiu/LeetCode-Solution | 874-Walking-Robot-Simulation.cpp | class Solution {
public:
int robotSim(vector<int>& commands, vector<vector<int>>& obstacles) {
unordered_map<int, set<int>> obstacles_by_x_axis;
unordered_map<int, set<int>> obstacles_by_y_axis;
for (int i = 0; i < obstacles.size(); i++) {
int x = obstacles[i][0];
int... | ALGO | 0.999989 | 5.278093 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2016-11-06T12:48: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": "1a9f860637... |
44ac4352-64c4-4c23-9fa9-531cc388e602 | xingoxu/leetcode | 61.cpp | #include <iostream>
#include <vector>
#include <sstream>
using namespace std;
struct ListNode {
int val;
ListNode *next;
ListNode(int x) : val(x), next(NULL) {}
};
class Solution {
public:
ListNode* rotateRight(ListNode* head, int k) {
ListNode *end = NULL;
ListNode *iterator = head;
... | ALGO | 0.999937 | 5.456862 | {
"github_metadata": {
"branch": "master",
"commit_count": 258,
"repo_created_at": "2019-05-15T12:19: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": "ef4fcd3f... |
482d46a2-e6ae-4d2d-adb1-b85033a63af6 | overflow218/Algorithms | 230619-2.cpp | /*
어차피 다해보는거 아니면 예측을 하기 어려운 상황임.
전체 8개 밖에 안되니까 8! 하면은 4만개 정도밖에 안되니까 그냥 다 계산해보면 됨.
*/
class Solution {
public:
int ans = 0;
void find(vector<int> &chosen, vector<bool>& isChosen,vector<vector<int>>& students, vector<vector<int>>& mentors)
{
if(chosen.size() == students.size())
{
... | ALGO | 0.999937 | 5.450762 | {
"github_metadata": {
"branch": "master",
"commit_count": 351,
"repo_created_at": "2020-09-08T07:03: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": "552868f4... |
943b318c-1734-4862-92f5-aaed4614a345 | maxlutay/ADT_C_plus_plus_lab | lb_2/index.cpp | #include <iostream>
#include <cmath>
#include<cassert>
typedef unsigned long long int BIG;//BIG bit = 64;//64bit
//typedef unsigned long int BIG; BIG bit = 32;//32bit
#include"header.hpp"
struct ch_structurus {
BIG *p_massivus;
BIG n_studentus;
BIG n_blockus_alocatedus;
BIG n_passus;
BIG n_failus;
};
... | ALGO | 0.922546 | 3.282818 | {
"github_metadata": {
"branch": "master",
"commit_count": 66,
"repo_created_at": "2016-03-31T17:56: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": "fa208db62... |
e7fa5430-8b4d-4ab9-89b8-9fd720fc0072 | dani-tro/DAA_practicum_24_25 | group-2/week-05/rivers.cpp | // O(2 ^ 2 * 128 ^ 3)
#include <bits/stdc++.h>
using namespace std;
double l, g, w[4], s[4];
double calc(int idx, double x)
{
if(idx == 3)
{
return (l - x) * (1.0 / g);
}
double left = x, right = l, m1, m2;
for(int i = 0; i < 128; i++)
{
m1 = left + (right - left) * (1.0 / 3);
m2 = left + (right - lef... | ALGO | 0.999408 | 4.154916 | {
"github_metadata": {
"branch": "main",
"commit_count": 43,
"repo_created_at": "2025-02-24T13:47:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5aeb21c4b22... |
616b2084-9d44-4660-9cba-cc73220ca2f8 | tlsgkdns/study | Implement/1063_king.cpp | #include <string>
#include <iostream>
#include <vector>
#include <unordered_map>
using namespace std;
using pos = pair<int, int>;
vector<string> mv;
unordered_map<string, pos> um;
string k, s;
int N;
pos king, stone;
pos operator+(pos p1, pos p2)
{
return make_pair(p1.first + p2.first, p1.second +
p2.second);
}
bool... | ALGO | 0.999967 | 3.57712 | {
"github_metadata": {
"branch": "master",
"commit_count": 2028,
"repo_created_at": "2021-02-18T10:49: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": "7610639... |
dc2ffd71-ba28-4cc3-974b-b13eb1dc1f81 | ishandutta2007/codeforces-c | calabash_boy/normal/842/D.cpp | #pragma warning(disable:4786)//
#pragma comment(linker, "/STACK:102400000,102400000")//
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <u... | ALGO | 0.999919 | 3.830842 | {
"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": "0c6c66e49b1c... |
6b9b3104-f69c-4799-ad98-3b4caa6d2362 | IHR57/Competitive-Programming | CodeForces/CodeForces - 1315B.cpp | //<NAME>
#include <bits/stdc++.h>
#define mem(a, b) (memset(a, b, sizeof(a)))
#define pb push_back
#define mk make_pair
#define ff first
#define ss second
#define PI acos(-1)
#define INF 2147483647
#define MOD 1000000007
#define MAX 100005
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair... | ALGO | 0.999707 | 3.721366 | {
"github_metadata": {
"branch": "master",
"commit_count": 80,
"repo_created_at": "2018-12-28T07:37:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3ce03ad1b... |
c8c5e8cf-08ba-4f91-b502-a76654351500 | rafal-tarnow/sequences | solution_2.cpp | #include <iostream>
#include <map>
#include <cstdint>
#include <vector>
#include <sys/sysinfo.h>
#include <pthread.h>
#include <chrono>
#include <cmath>
using namespace std;
static bool isPrime_Cached(uint32_t number)
{
//CACHE
static map<uint32_t, bool> primes_cache;
if(primes_cache.count(number))
... | ALGO | 0.999931 | 4.012459 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2021-06-03T11:13: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": "be37ef5c59b7... |
74ae3e9e-18ab-404e-8b60-2a81928d5896 | DT3264/ProgrammingContestsSolutions | Codeforces/1538F.cpp |
// Problem : F. Interesting Function
// Contest : Codeforces - Codeforces Round #725 (Div. 3)
// URL : https://codeforces.com/contest/1538/problem/F
// Memory Limit : 256 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)
#include<bits/stdc++.h>
#define f first
#define s second
... | ALGO | 0.999867 | 4.295087 | {
"github_metadata": {
"branch": "master",
"commit_count": 216,
"repo_created_at": "2018-12-04T05:13: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": "82465a58... |
34c2b5db-bdb1-4324-b27b-37b5228e37bd | Gnaroshi/practice-algorithm-solvedac | With_Levels/Bronze/Bronze_2/11158.cpp | // problem: Angry Grammar Nazi
// id: 11158
// time taken:
#include <bits/stdc++.h>
using namespace std;
int main(void)
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int tc;
cin >> tc;
cin.ignore();
while (tc--)
{
string s, t, bef;
int ans = 0;
getline(cin, s);
... | ALGO | 0.995592 | 4.272911 | {
"github_metadata": {
"branch": "main",
"commit_count": 476,
"repo_created_at": "2024-03-13T08:59:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9be451e5cf... |
29aa3efd-f0a8-47d2-9385-2a46fa512fbb | Am10aN16/webD_projects_beginners_Hacktoberfest22 | Recursion/Return_Permutations_string.cpp | #include<bits/stdc++.h>
#include <string>
using namespace std;
#include <string>
using namespace std;
void swap(char &x, char &y)
{
char temp;
temp = x;
x = y;
y = temp;
}
int permutation(string s, int l, int r, string output[])
{
int i;
static int j = 0, count = 0;
if (l == r)
{
... | ALGO | 0.999982 | 5.138381 | {
"github_metadata": {
"branch": "master",
"commit_count": 67,
"repo_created_at": "2022-10-12T15:10:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 17,
"issues": 3,
"pull_requests": 2
},
"file_meta": {
"content_id": "20add3e5... |
0c6835a7-ae8f-445c-b6cc-c9c274ff34b9 | Napoleon314/Venus3D_old | Tool/CmdTools/MeshConvertor/Utility/DirectXMeshVBWriter.cpp | //-------------------------------------------------------------------------------------
// DirectXMeshVBWriter.cpp
//
// DirectX Mesh Geometry Library - Vertex Buffer Writer
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
/... | TOOL | 0.909202 | 6.237975 | {
"github_metadata": {
"branch": "master",
"commit_count": 504,
"repo_created_at": "2015-05-13T09:17:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 40,
"forks": 10,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bf3acf... |
2510c0d4-bc81-46a5-8565-efac330c098c | OnePieceLwc/105-basic-exercises-in-C-and-data-structures | 09_46-50.cpp | #include <stdio.h>
#include <cstring>
#include <ctype.h>
#include <math.h>
int main() {
// 46.在带头结点的单链表工中,别除所有值为x的结点,并释放其空间,假设值为x的结点不唯一,试编写算法以实现上述操作。
void Del_x(LiukList &L,int x){
Lnode *pre=L,*p=L->next;
while(p){
if(p->data==x){
pre->next=p->next;
free(p);
p=pre->next;
}
else{
pre=p;
p=p->ne... | ALGO | 0.999883 | 3.06682 | {
"github_metadata": {
"branch": "main",
"commit_count": 108,
"repo_created_at": "2024-08-07T06:39:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c2c848cf2c... |
51baddde-f258-48f2-9f8f-3df54ea3ce80 | cran/glmmAK | src/summary_Gspline1.h | /*** summary_Gspline1.h ***/
#ifndef _SUMMARY_GSPLINE_EEN_H_
#define _SUMMARY_GSPLINE_EEN_H_
#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>
#include <R.h>
#include <Rmath.h>
#include "AK_Error.h"
#include "AK_BasicFun.h"
#include "AK_BLAS_LAPACK.h"
#include "In_Output2.h"
#include "Quan... | ALGO | 0.998215 | 5.747984 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2014-03-13T17:11:25.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "daa5e840b42... |
53c703af-e013-4b1d-8042-a3a59b48f5c8 | Rya-man/test-demo | daa/partA/2.cpp | #include <utilties.h>
int linsearch_iterative(vi& nums,int find)
{
FOR(i,0,nums.size())
{
if(nums[i]==find)
return i;
}
return -1;
}
int linsearch_recursive(vi&nums,int& find,int i)
{
if(i>=nums.size())
return -1;
if(nums[i]==find)
return i;
return linsearch_re... | ALGO | 0.999169 | 4.996288 | {
"github_metadata": {
"branch": "main",
"commit_count": 115,
"repo_created_at": "2023-10-11T09:30:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4abb7cd9dd... |
21bf5b30-5ff4-4c10-ad87-911f27f6d374 | CPE-476/Experience | Final/src/spline.h | // Author: <NAME>
// Program: Experience
// File: Spline
// Date: May 2022
#ifndef SPLINE_H
#define SPLINE_H
#include <glm/glm.hpp>
using namespace std;
using namespace glm;
vec3 vec3Lerp(vec3 a, vec3 b, float t)
{
return (1.0f - t) * a + t * b;
}
float floatLerp(float a, float b, float t)
{
return (1.0f -... | ALGO | 0.981576 | 6.585094 | {
"github_metadata": {
"branch": "main",
"commit_count": 465,
"repo_created_at": "2022-04-07T23:29:58.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 29,
"pull_requests": 0
},
"file_meta": {
"content_id": "4b22299e2e... |
6cd2ae09-a1d0-473c-89cb-62d10e2def75 | EverettHan/lambda-sketch | ThirdParty/CGM_R425/include/CATPolyBVHTreeCompare.h | //=============================================================================
// COPYRIGHT <NAME> 2009
//=============================================================================
//
// CATPolyBVHTreeCompare.h
//
//=============================================================================
// 2009-05-26 JXO
//... | ALGO | 0.926601 | 6.270016 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2023-02-08T21:59:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d5264cd564c... |
6c7b3298-5d16-4e8a-bf6d-44eeec8c8df0 | dbarnwal/GRAPHS | bellman_ford.cpp | /* mamba mentality */
#include "bits/stdc++.h"
using namespace std;
typedef long double ld;
#define int long long
typedef pair<int,int> pii;
#define RAGE ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define rep(i,n) for(i=0; i <n; i++)
#define repv(i,k,n) for(int i=k; i<=n; i++)
#define pb push_back... | ALGO | 0.999993 | 3.760662 | {
"github_metadata": {
"branch": "master",
"commit_count": 80,
"repo_created_at": "2020-04-17T19:50:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 9,
"issues": 0,
"pull_requests": 3
},
"file_meta": {
"content_id": "765857788... |
2f44ef5c-9420-478f-a0e8-482bf52c7b97 | basakjeet08/2nd-Year-Code | 3rd Semester Code/C++ Codes/Area_Circle_Rec_overloading.cpp | #include <iostream>
using namespace std ;
class Circle{
private :
float radius;
public :
void getData(){
cout << "Enter the Radius of Circle : ";
cin >> radius;
}
friend void Area(Circle);
};
class Rectangle{
private :
int length,breadth;
... | ALGO | 0.976819 | 4.154617 | {
"github_metadata": {
"branch": "main",
"commit_count": 310,
"repo_created_at": "2022-07-19T21:16:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "aaf3952e88... |
a293344c-12ee-4e00-937c-be170c0cca26 | sunilbhara/competitive_coding | N meetings in one room - GFG/n-meetings-in-one-room.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution
{
public:
//Function to find the maximum number of meetings that can
//be performed in a meeting room.
int maxMeetings(int start[], int end[], int n)
{
int cnt = 0;
map<int,int>... | ALGO | 0.999971 | 5.636573 | {
"github_metadata": {
"branch": "main",
"commit_count": 212,
"repo_created_at": "2022-04-30T09:04: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": "1d32d4bcfd... |
20640bfa-480e-449b-b8bc-4a3701d2a4e6 | ivankra/acm | contester.tsure.ru/178.cc | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <cassert>
#include <algorithm>
#include <vector>
#include <sstream>
#include <iostream>
using namespace std;
string add(string a, int k, string b) {
reverse(a.begin(), a.end());
reverse(b.begin(), b.end());
int carr... | ALGO | 0.999769 | 3.57142 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2010-01-03T06:51:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 118,
"forks": 43,
"issues": 1,
"pull_requests": 1
},
"file_meta": {
"content_id": "48087f... |
d91b28eb-32e9-4c8f-b4ad-3e6b8aefab7f | ProjetInfoIlo/Projet | Projet1/Matrice.cpp | #include <iostream>
#include <amp.h>
using namespace std;
using namespace concurrency;
class Matrice {
private:
int lignes, colonnes;
double **matrice;
public:
Matrice(int lignes, int colonnes, bool initToZero = false, int defaultValue = 0) {
this->lignes = lignes;
this->colonnes = colonnes;
matric... | TOOL | 0.932204 | 4.688816 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2016-11-28T20:20:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a8eedce15... |
1ae286b1-a623-4879-99e7-d6df2a19558c | hiroshi-maybe/codeforces | solutions/CountTheRectangles.cpp | #include <bits/stdc++.h>
using namespace std;
// type alias
typedef long long LL;
typedef pair<int,int> II;
typedef tuple<int,int,int> III;
typedef vector<int> VI;
typedef vector<string> VS;
typedef unordered_map<int,int> MAPII;
typedef unordered_set<int> SETI;
template<class T> using VV=vector<vector<T>>;
// minmax
te... | ALGO | 0.99953 | 4.26801 | {
"github_metadata": {
"branch": "master",
"commit_count": 1095,
"repo_created_at": "2018-04-29T09:01:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "aea49e7... |
ff25e844-c851-4f7c-ba67-f35bb400f54e | JY251/Competitive_Programming | ABC338/c_v3.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int max_servings(vector<int>& Q, vector<int>& A, vector<int>& B) {
int n = Q.size();
vector<int> dpA(n, 0), dpB(n, 0);
dpA[0] = Q[0] / A[0];
dpB[0] = Q[0] / B[0];
for (int i = 1; i < n; i++) {
dpA[i] = max(Q[i] / A[i], dpA[i - 1] ... | ALGO | 0.99994 | 4.320866 | {
"github_metadata": {
"branch": "main",
"commit_count": 437,
"repo_created_at": "2023-12-02T15:12:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "76efea8452... |
e810e128-c8d2-46e9-aba0-9464f95fd2df | Silver-Sword/Competitive-Programming-Samples | 2022/grid.cpp | // Grid
// Problem G
// ACM ICPC 2012–2013, NEERC, Northern Subregional Contest
// Problem Description
/*
Given integer intersection points between a line and a xy grid, find the original parameters of the grid.
The parameters of the grid are the starting and ending x/y
and the distance between the grid l... | ALGO | 0.999977 | 4.373949 | {
"github_metadata": {
"branch": "main",
"commit_count": 111,
"repo_created_at": "2021-02-25T19:45: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": "e37cd3092a... |
28e94185-0106-43fd-a0d4-73ef9ea30179 | bratay/data-structures-and-algorithms | binary-search-tree/executive.cpp | #include "executive.h"
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
Executive::Executive(string filename)
{
myTree = new BiSearchTree();
string curInput;
ifstream infile;
infile.open(filename);
while(getline(infile, curInput, ','))
{
myTree->insert(curInput);
}
... | TOOL | 0.984086 | 3.175573 | {
"github_metadata": {
"branch": "master",
"commit_count": 75,
"repo_created_at": "2019-10-20T23: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": "ef514454a... |
80b5f607-7258-4bb3-9ea8-4555c1fa149f | justbydev/Algorithm-PS | Tree/6416/6416.cpp | /*BOJ 6416*/
/*tree*/
/*1. 빈 노드는 tree*/
/*2. root는 반드시 한개만 존재*/
/*3. cycle 존재하지 않음*/
/*4. 한 노드에서 다른 노드까지 가는 길은 반드시 한개만 존재*/
/*map 사용법*/
/*map.find(key)==map.end()이면 key값이 없는 것*/
/*for(auto it=map.begin(); it!=map.end(); it++)를 통해 map iterate*/
#include<iostream>
#include<map>
using namespace std;
int k=1, u, v;
typedef... | ALGO | 0.999496 | 4.470336 | {
"github_metadata": {
"branch": "master",
"commit_count": 113,
"repo_created_at": "2020-08-31T09:11:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ca40a378... |
1ebd7567-14a9-425c-bf20-9a60c1c091c1 | OCIoficial/2016-10-Regional | D - moriarki/solutions/partial/nlehmann_mul_sum.cpp | /*
* -----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* <<EMAIL>> wrote this file. As long as you retain this notice
* you can do whatever you want with this stuff. If we meet some day, and you
* think this stuff is worth it, you can buy me a be... | ALGO | 0.999921 | 3.17863 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2016-09-14T12:06:51.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6603ecfbee... |
c3d9e03a-0f83-453c-841d-42e2cf13944d | Jeffer-Hernandez/C-Project-1 | projectMain/Project1.cpp | #include <iostream>
#include <ctime>
using namespace std;
// <NAME> - 15007776
// CSC 231 -0500
// CSC231 Discrete Structure and Applications
// Counting the Number of Days between January 1, 1900 to today (whenever the program is run)
// Using Virtual Studio that is installed on the Virtual Machine, write a progra... | TOOL | 0.953197 | 4.114808 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2020-09-26T19:56: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": "5a2a74c89... |
a384f7f3-2f6f-4cf1-8174-c0166b5c54ba | SCIInstitute/ShapeWorks | Libs/Optimize/Function/SamplingFunction.cpp |
#include "SamplingFunction.h"
#include "Libs/Common/Logging.h"
#include "Libs/Optimize/Domain/DomainType.h"
#include "vnl/vnl_vector_fixed.h"
namespace shapeworks {
//---------------------------------------------------------------------------
double SamplingFunction::EstimateSigma(unsigned int idx, unsigned int dom... | ALGO | 0.999881 | 7.024142 | {
"github_metadata": {
"branch": "master",
"commit_count": 11241,
"repo_created_at": "2013-05-21T18:43:08.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 119,
"forks": 34,
"issues": 206,
"pull_requests": 5
},
"file_meta": {
"content_id": "7f... |
ac3d7700-0b66-454c-bba8-2abb6abf2b71 | Oracynx/Source-Code | Problem/Luogu/P1119.cpp | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <functional>
#include <queue>
#include <tuple>
#include <vector>
constexpr int MaxN = 2e2 + 5;
int n, m, q;
int p[MaxN][MaxN];
bool available[MaxN];
std::priority_queue<std::tuple<int, int>, std::vector<std::tuple<int, int>>, std::greater<>> queue;
void... | ALGO | 0.999981 | 4.418798 | {
"github_metadata": {
"branch": "master",
"commit_count": 682,
"repo_created_at": "2023-12-24T08:55:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "996c6a16... |
96627292-35a5-4f20-9ca4-14615a940b65 | mzry1992/workspace | contest/UESTC Spe♂cial Training/C.cpp | #include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
int n,m,lr,lc;
char mp[20][20];
int num[60],cntE,cntB,bx[20],by[20],ex[60],ey[60],id[60][60];
int repairB;
bool g[60][60];
int N;
void INIT(int n)
{
N = n;
memset(g,false,sizeof(g));
}
void ADD(int s,int t)
{
... | ALGO | 0.999937 | 3.898887 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2012-11-03T05:40: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": "05360ba63... |
f9b8272c-7636-4170-bbc3-51013612784e | kamiuetian/Data-Structures | Lecture Slides/Lecture 4/LinkedListCode.cpp | #include <iostream>
using namespace std;
struct Node {
int data;
Node* next;
Node(int val) : data(val), next(NULL) {}
};
class LinkedList {
public:
Node* head;
LinkedList() : head(NULL) {}
void insertAtEnd(int value);
void display();
void insertAtStart(int value);
void insertAft... | ALGO | 0.999752 | 6.059917 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2024-09-06T09:48:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 12,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cebbfec4d9... |
02b98ee7-459d-4dfb-8ff0-27920b37e94e | OpenFOAM/OpenFOAM-11 | src/waves/fvModels/waveForcing/waveForcing.H | /*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation
\\... | ALGO | 0.988921 | 6.733485 | {
"github_metadata": {
"branch": "master",
"commit_count": 7041,
"repo_created_at": "2023-07-11T08:30:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 83,
"forks": 35,
"issues": 10,
"pull_requests": 0
},
"file_meta": {
"content_id": "34bc... |
0b85c7f4-d862-439c-a0d5-1b8a8b5864af | PCC-CS-AN/71140_in_class_examples | Lab6/main.cpp | /*
* Assignment Title
* Full Name - ID Numbers
*
* Short problem description
*
*/
#include <iostream>
#include <cassert>
using namespace std;
// Function Declarations
void test();
// Calculates the positive square root using the quadratic formula
// Assumes the answer is real, that is: b^2 >= 4ac
// a - the... | ALGO | 0.996303 | 4.734573 | {
"github_metadata": {
"branch": "master",
"commit_count": 35,
"repo_created_at": "2017-08-29T20:18:25.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f8d91f2c71... |
776772ee-c139-4df9-8d99-b101f18dad2c | Kanhakhatri065/competitive_programming | codeforces/1408B-ArraysSum.cpp | /*** I came, I saw, I conquered. ***/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;typedef unsigned long long ull;
#define sc(a) cin >> a
#define pf(a) cout << a << endl
#define forIn(arr, num) for(ll i = 0; i < num; i++) cin >> arr[i];
#define vpnt(ans) for(ll i = 0; i < ans.size(); i++) cout << ... | ALGO | 0.999953 | 3.959729 | {
"github_metadata": {
"branch": "master",
"commit_count": 61,
"repo_created_at": "2020-05-12T22:56: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": "9be357bc3... |
af31acaf-3c5b-429d-b9b4-7776aabdea14 | abhisheksuman413/A2Z_DSA_Course_Sheet | 02_Learn Important Sorting Techniques/Lec_02_01_Sorting 1/Question_03_Insertion_Sort.cpp | #include <bits/stdc++.h>
using namespace std;
void insertionSort(int arr[], int n)
{
for (int i = 1; i <= n - 1; i++)
{
int j = i;
while (j > 0 && arr[j - 1] > arr[j])
{
int temp = arr[j];
arr[j] = arr[j - 1];
arr[j - 1] = temp;
j--;
... | ALGO | 0.999988 | 5.814084 | {
"github_metadata": {
"branch": "master",
"commit_count": 43,
"repo_created_at": "2023-08-12T10:12: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": "bd6c0c136... |
959a0ca3-1145-469c-bcbc-b94033d06de4 | itohdak/AtCoder | ARC/105/D.cpp | #include <bits/stdc++.h>
#include <print.hpp>
using namespace std;
// #include <atcoder/all>
// using namespace atcoder;
#define ll long long
#define ld long double
#define REP(i,m,n) for(int i=(int)(m); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)
#define RREP(i,m,n) for(int i=(int)(m); i>=(int)(n); i--)
#define rrep(... | ALGO | 0.999871 | 4.7932 | {
"github_metadata": {
"branch": "master",
"commit_count": 172,
"repo_created_at": "2018-05-20T09:26:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "4a46d549... |
2d55a224-4891-4b98-8743-a0d345d9a638 | CharlieGearsTech/Codility | Codility_FibFrog.cpp | /*
The Fibonacci sequence is defined using the following recursive formula:
F(0) = 0
F(1) = 1
F(M) = F(M - 1) + F(M - 2) if M >= 2
A small frog wants to get to the other side of a river. The frog is initially located at one bank of the river (position −1) and wants to get to the other bank (position N). Th... | ALGO | 0.999996 | 5.200558 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2020-10-02T00:46:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a81dc319a1d2... |
50b6d276-ca2e-406b-8bb0-808dbcd90805 | delsiiin/leetcode | 二叉树/103.二叉树的锯齿形层序遍历.cpp | /*
* @lc app=leetcode.cn id=103 lang=cpp
*
* [103] 二叉树的锯齿形层序遍历
*/
// @lc code=start
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullpt... | ALGO | 0.999979 | 6.475644 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2023-05-04T16:17: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": "ed6616a56... |
7cf70c7f-551e-41d3-8bed-d4670293e1b2 | OpenXRay/xray-16 | src/xrCore/_cylinder.cpp | #include "stdafx.h"
#include "xrCore/_cylinder.h"
#include "xrCommon/math_funcs_inline.h"
#ifdef DEBUG
#include "xrCore/xrDebug_macros.h"
#include "xrCore/log.h"
#endif
#include <limits>
int Fcylinder::intersect(const Fvector3& start, const Fvector3& dir, float afT[2], ecode code[2]) const
{
constexpr float fEp... | ALGO | 0.989472 | 5.761312 | {
"github_metadata": {
"branch": "dev",
"commit_count": 8240,
"repo_created_at": "2014-09-05T04:28:23.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3256,
"forks": 472,
"issues": 220,
"pull_requests": 23
},
"file_meta": {
"content_id": "e4a... |
5f49a0cf-220a-4069-af59-7b1497dcda1c | geass-4m4n/Competitive-practice | leetcode practice/79. Word Search.cpp | class Solution {
public:
bool isFound(vector<vector<char>>& board, int i, int j, string word, int index)
{
if(index == word.length()) return true;
if(i < 0 || j < 0 || i >= board.size() || j >= board[0].size()) return false;
if(word[(index)] != board[i][j]) return fa... | ALGO | 0.999983 | 6.094574 | {
"github_metadata": {
"branch": "master",
"commit_count": 306,
"repo_created_at": "2020-08-13T12:40:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e5840c56... |
0de869b4-9b4d-4012-bf56-527bcc78fb3b | youoj/Algorithm | Baekjoon/[2468]안전영역.cpp | /* 2468번 안정영역(DFS/BFS)
* https://www.acmicpc.net/problem/2468
*/
#include <iostream>
#include <vector>
#include <queue>
#define MAX(X,Y) ((X)>(Y))? (X):(Y)
using namespace std;
int result = 1;
int max_high = 0;
int dir_x[4] = { 0, 0, 1, -1 };
int dir_y[4] = { 1, -1, 0, 0 };
int main() {
int inputN;
cin >> input... | ALGO | 0.999813 | 4.633389 | {
"github_metadata": {
"branch": "master",
"commit_count": 101,
"repo_created_at": "2018-05-28T04:30: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": "1aef8efe... |
bbb1e74f-1a19-4b52-90e6-7e6d6c35f30a | ishandutta2007/codeforces-s | sooke/normal/1208/G.cpp | #include <cstdio>
#include <algorithm>
const int N = 1e6 + 5;
int n, k, p, pri[N], phi[N];
long long ans;
bool vis[N];
void sieve(int n) {
phi[1] = 1;
for (int i = 2; i <= n; i++) {
if (!vis[i]) {
pri[p++] = i; phi[i] = i - 1;
}
for (int j = 0; j < p; j++) {
in... | ALGO | 0.999952 | 4.133883 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:07:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3695bd3955e5... |
500b3db5-5510-4de7-9ffb-de434458ff06 | SaifulJnU/LeetCode300 | Detect cycle in an undirected graph - GFG/detect-cycle-in-an-undirected-graph.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
bool detect(int node, int parent, vector<int> adj[], int vis[]) {
vis[node] = 1;
for(auto x : adj[node]) {
if(!vis[x]) {
if(detect(x, node, adj, vis)) return true;
... | ALGO | 0.999936 | 6.026993 | {
"github_metadata": {
"branch": "main",
"commit_count": 600,
"repo_created_at": "2023-01-14T10:35:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0c0ab5b007... |
85cd2c4c-9d19-4f08-8a52-d213687195d0 | thecsapprentice/SBSS_Public | src/lib/CG_Optimized_Kernels/Dot_Product/Dot_Product_Helper.h | //#####################################################################
// Copyright 2010, <NAME>.
// This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt.
//#####################################################################
#ifndef __Dot... | ALGO | 0.9919 | 5.797109 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2019-06-20T15:11: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": "2ba1b74e1... |
7d9b4538-fb17-4b9b-97a3-ba84ef78f88a | j-beniwal/cpp | preperation/arrays/merge.cpp | long long int merge(long long arr[], long long low, long long mid, long long high){
int size = high - low;
int ia = low;
int ib = mid;
int it = 0;
int *tmparr = new int[size];
long long int count=0;
while(ia < mid && ib < high){
if(arr[ia] <= arr[ib]){
... | ALGO | 0.999986 | 4.954031 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2022-01-02T10:31: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": "560f89b87a3a... |
ed6f9cd3-c15d-46b4-8601-344eb668926c | honood/leetcode | solutions/0530-minimum-absolute-difference-in-bst.cpp | // HoNooD
// 2024.05.15 10:53
// 530. Minimum Absolute Difference in BST
// https://leetcode.com/problems/minimum-absolute-difference-in-bst/description/?envType=study-plan-v2&envId=top-interview-150
//
// Note: This question is the same as:
// 783. Minimum Distance Between BST Nodes
// https://leetcode.com/problems/... | ALGO | 0.999745 | 7.00507 | {
"github_metadata": {
"branch": "main",
"commit_count": 320,
"repo_created_at": "2022-06-04T09:04: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": "9e20d3c3f3... |
8e693a61-7062-46a3-b6fe-3586bca4890a | MiguelAgueda/AI-Driven-Rowbot | rplidar/sdk/app/vector_based_mapper/main.cpp | #include <valarray> // Lib for element-wise operations.
#include "geometry.h"
#include "rplidar.h" //RPLIDAR standard sdk, all-in-one header
const int body_unit = 305; // Farthest part of rover from scanner.
const int map_dim = 2048; // Size of map in each dimension.
int base_point = (map_dim / 2) -... | ALGO | 0.967074 | 4.754342 | {
"github_metadata": {
"branch": "master",
"commit_count": 178,
"repo_created_at": "2019-02-09T21:25:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 5
},
"file_meta": {
"content_id": "7c9c1aaf... |
76a2485e-eccf-4142-a580-fac5bfb2f99f | Abdullah-mujaa/Elzero_Fundamentals_course | 41.Array–Two_Dimensional_Array.cpp | /*
Arrays
- Two Dimensional Arrays AKA [2D Array] => it is like a table with rows and columns, row x columns
Search For
- Matrix Operations
- 3D Array
*/
#include <iostream>
using namespace std;
int main()
{
int points_a[3] = {1, 2, 3};
int points_b[3] = {4, 5, 6};
int points_c[3] = {7, 8, 9};
//G... | TOOL | 0.973385 | 4.304545 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-05-03T05:07: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": "da8cca6cb165... |
17417cfe-32a0-4db2-ae89-7c34b2f7675c | hhlrank/Algorithm-problems | Floyd.cpp | #include<iostream>
using namespace std;
const int inf = 99999;
int shortlength(int n, int x, int y, int** array)
{
for(int m=1;m<=n;m++)
for(int i=1;i<=n;i++)
for(int j=1;j<=n;j++)
if (array[i][m] + array[m][j] < array[i][j])
array[i][j] = array[i][m] + array[m][j];
int temp = array[x]... | ALGO | 0.999967 | 3.08599 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2019-03-12T07:45: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": "3288581330... |
b9141c47-02ab-4378-9955-01b3cd712c41 | bhavi0906/NeuroNexus | project1/project 1.cpp | #include<iostream>
#include<cstdlib>
#include<ctime>
using namespace std;
int main() {
srand(time(NULL)); //seeding of rand()
int orignal,temp;
int count=0;
int random=rand() %100;
orignal=random;
cout<<"enter your guess: "<<endl;
cin>>temp;
while(temp!=orignal)
{
if(temp ... | ALGO | 0.990487 | 3.292084 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2024-03-07T11:50: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": "f015d4d8efb4... |
58cb95be-23e5-4774-9af2-501623fa49fc | CmplxN/DS_algorithms | BOJ/BOJ_17837.cpp | #include <bits/stdc++.h>
using namespace std;
typedef struct info{
int x,y,dir,floor;
}info;
int main() {
cin.tie(nullptr);
cout.tie(nullptr);
ios_base::sync_with_stdio(false);
int n, k, r, c, dir;
int dx[4] = {1, -1, 0, 0};
int dy[4] = {0, 0, -1, 1};
cin >> n >> k;
int color[n][n];
vector<pair<int, int>> map... | ALGO | 0.999751 | 3.973482 | {
"github_metadata": {
"branch": "master",
"commit_count": 187,
"repo_created_at": "2019-11-10T12:59: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": "6e258393... |
b4520861-fb38-4a0e-b532-4a1bdc015f8c | dietzt2/roulette-simulation | Roulette_Simulation/Roulette_Simulation/simulation.cpp | #include <cstdlib>
#include <iostream>
#include "Spinner.h"
using namespace std;
void set_spinner1(Spinner& spinner1);
void set_spinner2(Spinner& spinner2);
int main() {
//Spinner with 5 inner sections and 16 outer sections
//Spinner spinner1(5, 16);
Spinner spinner1;
spinner1.change_num_sections(Section::INNERS... | ALGO | 0.975247 | 4.714492 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2015-12-21T16:45:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "3fe68d1d3... |
57815dd6-ea7c-4d32-a4c7-f4475a9f3622 | joe-stifler/uHunt | String Processing/Suffix Trie, Tree, Array/719.cpp | /*------------------------------------------------*/
// Uva Problem No: 719
// Problem Name: Glass Beads
// Type: Suffix Trie, Tree, Array (String Processing)
// Autor: <NAME>
// Data: 2017-10-06 07:38:30
// Runtime: 1.130s
// Universidade: Unicamp
/*------------------------------------------------*/
#include <bits/st... | ALGO | 0.999709 | 3.690518 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2018-07-09T04:02:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "96ea3e0a84... |
e504addc-2993-4e02-92e0-c94c32ac8b9a | chengouxuan/sgu6 | Connect6Searcher/Connect6Searcher/MoveSearcher.h | #pragma once
/*
* 文件定义了搜索类 MoveSearcher, 负责搜索所需要的初始化, 搜索的线程创建, 撤销等.
* 调用 SearchGoodMoves() 开始搜索, 然后从 GetDMove() 获取最佳着法. 搜索会在 _TIME_LIMIT
* 毫秒内结束, 如果时间不够搜索一层, GetDMove() 将会获取到一个随机着法.
*
* 文件也定义了一些全局函数, 用于对 complexBoard, segmentTable 等全局变量的访问.
*
* ... | ALGO | 0.995832 | 3.728666 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2013-03-31T03:26:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6ba0c67879... |
97b5e7f0-701b-44f7-9e91-466265423b55 | emilyju0314/gpt_code_plagiarism | dataset/code_content_classifier/ai_code/train/0_0_6301.cpp | #include <iostream>
#include <vector>
std::string f(std::string s) {
return s + s;
}
int main() {
std::string S;
std::cin >> S;
long long l, r;
std::cin >> l >> r;
std::vector<int> occurrences(26, 0);
int currentLength = S.length();
for (char c : S) {
occurrences[c - 'a'] +=... | ALGO | 0.999899 | 3.9524 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2024-04-28T03:59: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": "b554f9aa837... |
24718922-1aa6-4462-8afb-878aa1021540 | Vlad-ole/Parser_signal_finder | VS2013/Parser/Parser_OOP/FTFilter.cpp | #include "FTFilter.h"
#include "TMath.h"
#include "fftw3.h"
#include "TVirtualFFT.h"
using namespace std;
FTFilter::FTFilter(std::vector<double>& yv, const double cut_frequency_low, const double cut_frequency_high, const double time_scale) : yv(yv)
{
int n_size_raw = yv.size();
const int n_size_fft = n_size_raw /... | ALGO | 0.984689 | 4.824677 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2016-09-29T09:35: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": "525c74e3c... |
6ac92474-a1ab-41b8-aff4-3fb74cbc7664 | razzasid/Cpp | 01 C++ Examples/02 Decision And Loops/29_01_pattrn_Palindromic_pattern.cpp | // Palindromic pattern
#include <iostream>
using namespace std;
int main()
{
int rows, i , j;
cout << "Enter the number of rows: ";
cin >> rows ;
for(int i = 1; i <= rows; i++)
{
int k = i;
for (j = 1; j <= (rows - i); j++)
{
cout << " ";
}
f... | ALGO | 0.99977 | 4.940711 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-09-25T10:31: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": "126def3e6509... |
82fe6f52-97ec-448d-b7ff-2a48f2402977 | Adidier/HackerRank | Encryption/Encryption.cpp | #include <iostream>
#include <string>
using namespace std;
std::string removeSpaces(std::string& s)
{
std::size_t found = s.find(" ");;
while (found != std::string::npos)
{
found = s.find(" ");
if (found != std::string::npos)
s.erase(s.begin() + found);
}
return s;
}
... | ALGO | 0.999938 | 5.033863 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2021-02-20T05:22: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": "288191b346... |
423723be-8681-4a7f-b54c-74f571698028 | ce39906/self-practices | leetcode/combinationSum.cpp | /*************************************************************************
> File Name: combinationSum.cpp
> Author: carbon06
> Mail: <EMAIL>
> Created Time: 2018-08-21 21:58:35
************************************************************************/
class Solution {
public:
vector<vector<int>> c... | ALGO | 0.999992 | 6.286041 | {
"github_metadata": {
"branch": "master",
"commit_count": 128,
"repo_created_at": "2018-07-30T07:01:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 12,
"forks": 4,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "e3c2154... |
9f5926c6-d8b0-4358-9360-4493adba9426 | ghibli613/cp-coding | library/divideConquer/countInversions.hpp | int merge(vector<int> &a, int l, int m, int r)
{
vector<int> b(a.begin() + l, a.begin() + m + 1);
vector<int> c(a.begin() + m + 1, a.begin() + r + 1);
int nB = m - l + 1, nC = r - m;
int i = 0, j = 0, k = l;
while(i < nB && j < nC)
{
if(b[i] > c[j])
{
a[k++] = c[j++];... | ALGO | 0.999973 | 4.732236 | {
"github_metadata": {
"branch": "main",
"commit_count": 248,
"repo_created_at": "2024-06-30T18:10: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": "774e2d89f9... |
946f5eda-9a19-4282-8b7c-e40fef257a13 | NVIDIA-ISAAC-ROS/isaac_ros_image_pipeline | isaac_ros_gxf_extensions/gxf_isaac_tensorops/gxf/extensions/tensorops/core/DBScan.cpp | // SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
// Copyright (c) 2020-2024 NVIDIA CORPORATION & AFFILIATES. 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... | ALGO | 0.999026 | 5.493863 | {
"github_metadata": {
"branch": "main",
"commit_count": 48,
"repo_created_at": "2021-10-19T00:14:25.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 153,
"forks": 27,
"issues": 9,
"pull_requests": 0
},
"file_meta": {
"content_id": "fc1d9a223... |
d994c46f-80eb-42a4-9468-e529e3b6d2ba | llynv/CP-files | 2041I.cpp | /*
Code by: linvg
Created: 25.11.2024 14:07:16
*/
#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize(" unroll-loops")
#pragma gcc optimize("Ofast")
#pragma GCC optimization("Ofast")
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
string to_upper(string a) { for (int i = 0;i ... | ALGO | 0.999684 | 5.143826 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2023-05-26T04:12: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": "657bd6db0a0... |
3f6c6af9-8646-4cbf-852c-3cae68cba5f9 | MarcoHassan/C-HSG | General_Exercises/Strings/count_letter.cpp | // Find Frequency of Characters of a String Object
// Your task is to define a new string named mystring and assign to it "C++ Programming is awesome"
// once you do that, you will have to count the number of characters of letters a and i
// at the end you will print the number of occurences
#include <iostream>
usi... | ALGO | 0.994338 | 3.735111 | {
"github_metadata": {
"branch": "master",
"commit_count": 53,
"repo_created_at": "2019-03-06T17:56: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": "cc48b8a12... |
46f16dde-fa78-4879-98f8-0aee96060b47 | Virinchi-12/August-leetcoding-challenge | Detect_Capital-520.cpp | /*
520. Detect Capital
Easy
509
259
Add to List
Share
Given a word, you need to judge whether the usage of capitals in it is right or not.
We define the usage of capitals in a word to be right when one of the following cases holds:
All letters in this word are capitals, like "USA".
All letters in this word are no... | ALGO | 0.999791 | 5.62484 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-08-01T11:02: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": "22a4baeacf... |
f3a6358a-e1a7-44ea-90c2-5120378501ec | yulinghan/ImageQualityEnhancement | other/akaze/akaze/akaze_utils.cpp | //=============================================================================
//
// utils.cpp
// Authors: <NAME> (1), <NAME> (2)
// Institutions: Georgia Institute of Technology (1)
// TrueVision Solutions (2)
//
// Date: 15/09/2013
// Email: <EMAIL>
//
// AKAZE Features Copyright 2013, <NAME>, <NAME>
/... | TOOL | 0.952393 | 5.641219 | {
"github_metadata": {
"branch": "master",
"commit_count": 170,
"repo_created_at": "2023-08-21T02:23:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 111,
"forks": 28,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "03620... |
d8840b6f-3d2a-4a5b-9045-cc83f35fe037 | avinashyadav16/Codeforces-CodeSolution-And-OOPs | CPP OOPS CONCEPTS/FULL OOPS/Lecture_44.cpp | /**
* @file: Lecture_44.cpp
* @author: <NAME>
* @brief: Writing our First C++ Template in VS Code
* @date: 24-11-2023
*/
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////... | ALGO | 0.998238 | 5.800927 | {
"github_metadata": {
"branch": "main",
"commit_count": 61,
"repo_created_at": "2024-01-01T13:44: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": "93a7e046e0b... |
21c44b62-8388-4fa0-89c4-971450e88d7d | AbhiHegade/Dynamical-Tidal-Response-of-Polytropic-Stars | Polytropic-EoS/src/ode_steppers.hpp | // #ifndef _ODE_STEPPERS_HPP_
// #define _ODE_STEPPERS_HPP_
// #include <vector>
// #include <string>
// #include <functional>
// void step(std::function <void(const std::vector<double>& , std::vector<double>& , double )> rhs,
// std::vector<double> &y, double &r, double &dr);
// void step_controlled(std::functio... | ALGO | 0.99958 | 4.316135 | {
"github_metadata": {
"branch": "main",
"commit_count": 48,
"repo_created_at": "2023-12-03T00:25:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7a86c5f8d3b... |
18825f26-8f4b-453f-a9ab-dc508f269ee6 | xirc/cp-algorithm | atcoder/abc157/B/main.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
using ff = long double;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0); cout.tie(0);
vector<vector<int>> A(3, vector<int>(3, 0));
vector<vector<bool>> C(3, vector<bool>(3, false));
auto const mark = [&](int n) {
... | ALGO | 0.999954 | 5.933284 | {
"github_metadata": {
"branch": "main",
"commit_count": 2676,
"repo_created_at": "2019-12-07T23:53:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 15,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "aee2f99f... |
8e322133-952a-464f-b1af-6e2391276ee0 | S6bastian/CC2 | Encriptador/main.cpp | #include <iostream>
#include <fstream>
#include <string>
#include <cstdlib>
using namespace std;
void positivizador(int &n, int mod){
if (n >= mod) {
n %= mod;
}
if (n < 0) {
n = n + mod;
}
}
void suma(int n1, int n2, int mod) {
int result;
result = n1 + n2;
positivizador... | ALGO | 0.997064 | 3.102257 | {
"github_metadata": {
"branch": "master",
"commit_count": 63,
"repo_created_at": "2023-03-22T20:00:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0f27a95df... |
1ea5272e-e966-4ff9-94d5-f0f472009a2f | yja938882/CSE | coding_problem/baekjoon_14501.cpp | #include <iostream>
#include <vector>
#include <string>
using namespace std;
int max_pay = 0;
/**
@brief calculate maximum pay and update max_pay
*/
void getMaxPay( vector< pair< int, int > > schedule , int n, int d, bool* visited){
if( n == d ){
int total_pay = 0;
bool temp_visited[ n ];
for( int i=0; i<n; i+... | ALGO | 0.999746 | 3.648171 | {
"github_metadata": {
"branch": "master",
"commit_count": 238,
"repo_created_at": "2018-04-02T13:50: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": "a190e39b... |
bc8e8eb2-4fff-4255-9e9b-9392e0880ae7 | ArsalLivoroi/Progetto-Sistemi-Digitali | codice/1_SHA256/src/sha256.cpp | #include "sha256.hpp"
#include <stdio.h>
#include <stdlib.h>
#include "round_data.hpp"
#include "compress_data.hpp"
//#include "flow_sha256_2.hpp"
/*
* -------------------------------------------------------------------------------------
* VERSIONE USATA ------------------------------------------------------------... | ALGO | 0.984467 | 4.294312 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2022-04-12T13:28: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": "01ddf4fccb93... |
1fdf4b02-5b0f-4c0d-b621-2cfcfcb1e977 | yeohj0710/BOJ-solutions | 백준/Silver/24159. フェルマー方程式 (Fermat)/フェルマー方程式 (Fermat).cc | #include <bits/stdc++.h>
#define int long long
using namespace std;
main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL), cout.tie(NULL);
int M, N; cin >> M >> N;
vector<int> v(M, 1), u(M);
for(int i=0; i<M; i++) {
int a = i, b = N;
while(b > 0) {
if(b % 2 == 1) ... | ALGO | 0.999987 | 4.47238 | {
"github_metadata": {
"branch": "main",
"commit_count": 5765,
"repo_created_at": "2022-04-05T01:21:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a2d8ad525... |
76050dba-d917-48cf-bac5-5c13b1c7084c | ajaykumarkannan/useful | include/myprint.h | using namespace std;
template <class t> void printBin(t value){
unsigned long mask;
int size = sizeof(value) * 8;
mask = (1 << (size - 1));
for(int i = size - 1; i >= 0; i--){
cout << (unsigned short) (((mask & value) >> i) & 1);
mask >>= 1;
}
}
template <class t> void printHex(t value){
unsigned long int m... | ALGO | 0.904952 | 3.763345 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2012-07-02T10:48:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f02afa12b... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.