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 |
|---|---|---|---|---|---|---|---|
f857393a-5f01-4d3a-a9f4-d26332ab5927 | habanero-rice/hclib | test/performance-regression/full-apps/qmcpack/src/QMCHamiltonians/MomentumDistribution.cpp | #include "QMCHamiltonians/MomentumDistribution.h"
using namespace std;
namespace qmcplusplus
{
typedef QMCTraits::IndexType IndexType;
typedef QMCTraits::PosType PosType;
typedef QMCTraits::RealType RealType;
typedef QMCTraits::ValueType ValueType;
typedef QMCTraits::ComplexType ComplexType;
template<... | ALGO | 0.989817 | 4.483535 | {
"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": "4fb319... |
7475825d-bbf2-4504-aae2-29f716c094ca | aryankd123/Coding_Problem_Solutions | cp_code/D_Counting_Pairs.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
int count(const vector<int>& arr, int start, int low, int high) {
int left = lower_bound(arr.begin()+start, arr.end(), low)-arr.begin();
int right = upper_bound(arr.begin()+start, arr.end(), high)-arr.begin();
return right - left;
}
void so... | ALGO | 0.999946 | 5.146727 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-05-26T18:42: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": "3afe6bfa5a4f... |
01660f75-fa09-44fe-ab10-3491d66c1bc0 | henrique4d/Competitive | legado/Codeforces/CFEducational135/c.cpp | #include<bits/stdc++.h>
using namespace std;
template<typename T> ostream& operator<<(ostream &os, const vector<T> &v) { os << "{"; for (typename vector<T>::const_iterator vi = v.begin(); vi != v.end(); ++vi) { if (vi != v.begin()) os << ", "; os << *vi; } os << "}"; return os; }
template<typename A, typename B> ostre... | ALGO | 0.999634 | 4.246369 | {
"github_metadata": {
"branch": "master",
"commit_count": 25,
"repo_created_at": "2022-04-10T00:27:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c91380f6f... |
75ff7704-04ba-4951-8e1a-28b7139991d8 | glykov/basic_cpp | lesson_08/tic_tac_toe.cpp | #include <iostream>
#include <cstdlib>
#include <ctime>
enum chip: char
{
cross = 'X',
nought = 'O',
empty = '_'
};
void init_field(char **field, size_t rows, size_t cols);
void print_field(char **filed, size_t rows, size_t cols);
bool is_valid_cell(int row, int col, size_t rows, size_t cols);
bool is_empty_ce... | ALGO | 0.99504 | 4.800478 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2022-05-17T19:11:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "1703368dc... |
ba585efd-9ca8-4c45-97c7-aafdf05a369f | sgc109/leetcode-solutions | 0092-reverse-linked-list-ii/0092-reverse-linked-list-ii.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
public:
ListNode* reverseBetw... | ALGO | 0.999998 | 5.881473 | {
"github_metadata": {
"branch": "main",
"commit_count": 1114,
"repo_created_at": "2021-08-15T14:38:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4e3d0dc1c... |
2660a9b6-d8ce-44a2-a473-01602d41f33d | aospapp/aosp | external/ComputeLibrary/src/core/CL/kernels/CLGEMMLowpReductionKernel.cpp | /*
* Copyright (c) 2017-2020 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
* 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
* ri... | ALGO | 0.960222 | 6.570447 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2023-11-22T06:39:31.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 16,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f9feb9e6f3c... |
10639a09-92d0-4068-8dd5-0d010735bd58 | CodeAnt626/learning | c++/primer/1/occurs.cpp | /*************************************************************************
> File Name: occurs.cpp
> Author: luowen
> Mail: <EMAIL>
> Created Time: Sat 12 Dec 2020 10:16:18 PM CST
************************************************************************/
#include<iostream>
int main() {
// currVal 是我们正在统计的数;我们... | ALGO | 0.999903 | 4.280728 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2020-11-13T12:18: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": "5b3afc85e21... |
35083080-e405-433e-bfdd-83b01b5dbdf0 | YosysHQ/yosys | techlibs/nanoxplore/nx_carry.cc | /*
* yosys -- Yosys Open SYnthesis Suite
*
* Copyright (C) 2024 <NAME> <<EMAIL>>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* T... | ALGO | 0.989433 | 6.340217 | {
"github_metadata": {
"branch": "main",
"commit_count": 15303,
"repo_created_at": "2013-01-05T10:10:48.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3933,
"forks": 973,
"issues": 482,
"pull_requests": 128
},
"file_meta": {
"content_id": "... |
122bb979-af92-44da-868e-3d2391d34a68 | BessiKo/laba5 | queue.cpp | #include <iostream>
#include <vector>
#include <queue>
#include <string>
#include <sstream>
#include <algorithm>
#include <iomanip>
using namespace std;
// Структура для хранения информации о посетителе - время и номер
struct Visitor {
int time;
string coupon;
};
// выдача талончика
string Coupon() {
sta... | ALGO | 0.99889 | 4.939332 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2025-04-24T03:07: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": "76aba8e814d7... |
d92855db-5264-4c73-92a9-71f800c723f9 | yueyeyuniao/openrave | plugins/rplanners/parabolicsmoother.cpp | // -*- coding: utf-8 -*-
// Copyright (C) 2012-2013 <NAME> <<EMAIL>>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// at your option) any later... | ALGO | 0.950122 | 5.875796 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2017-02-10T21:27: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": "d2db3d54ba... |
f3af657d-354f-4173-92d0-f6eeb3096fc7 | bugoutianzhen123/DataStruct | esp9/CircularQueue_SqList.cpp | #include <bits/stdc++.h>
#ifndef CIRCULARQUEUE_SQLIST_CPP
#define CIRCULARQUEUE_SQLIST_CPP
constexpr int QUEUE_INIT_SIZE = 100;
constexpr int QUEUE_INCREMENT = 10;
typedef struct
{
int *data;
int front, rear;
int queuesize, incrementsize;
} Queue;
void InitQueue(Queue &Q)
{
Q.queuesize = QUEUE_INIT_... | TOOL | 0.959051 | 3.450396 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2024-10-10T12:24:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "79d5ae3666... |
9f5242f2-c409-48f2-936f-ef75f153abb6 | mkhue720/CTDL-GT | bai so 1/bai2.cpp | #include <iostream>
#include <string>
using namespace std;
int main() {
string chuoi;
cout << "Nhap vao chuoi: ";
getline(cin, chuoi);
string hoa = "";
string thuong = "";
for(int i = 0; i < chuoi.length(); i++) {
if(chuoi[i] >= 'a' && chuoi[i] <= 'z') {
hoa += chuoi[i] - 32;
thuong += chuo... | ALGO | 0.996131 | 4.117215 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2024-01-04T16:13:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "96e9a354416... |
47ff016b-e30a-48a8-9d4a-d62551fad10d | NicholasHiga/MazeCrisis | GameEngine/Capstone/KalmanFilter.cpp | #include "KalmanFilter.h"
#include <iostream>
namespace MazeCrisis
{
//const mat3&
void
KalmanFilter::predict()
{
// Mat statePre; //!< predicted state x(k)=A*x(k-1)+B*u(k)
// Mat errorCovPre; //!< priori error estimate covariance matrix P'(k)=A*P(k-1)*At + Q)*/
... | ALGO | 0.953534 | 4.992035 | {
"github_metadata": {
"branch": "master",
"commit_count": 46,
"repo_created_at": "2017-07-03T21:14: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": "019585df1... |
f93d3f37-15d9-4411-a733-1f66f63f597c | IgorAmashukeli/Neetcode | SlidingWindow/characterReplacement.cpp | #include <algorithm>
#include <iostream>
#include <unordered_map>
/**424.
Longest Repeating Character Replacement
You are given a string s and an integer k. You can choose any character of the
string and change it to any other uppercase English character. You can perform
this operation at most k times.
Return the le... | ALGO | 0.999741 | 6.581871 | {
"github_metadata": {
"branch": "main",
"commit_count": 120,
"repo_created_at": "2023-08-21T12:13: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": "b861f2d134... |
e9ea336f-49a0-4fca-b5a8-147e5f0182d7 | Apnasuccess/DSAProblems | 4.Array ADT/11_array_shorted_operation.cpp | #include <iostream>
using namespace std;
struct array
{
int a[10];
int size;
int length;
};
void display(struct array arr)
{
int i;
cout << "array element are ";
for (i = 0; i < arr.length; i++)
{
cout << " " << arr.a[i];
}
}
void insert(struct array *arr, int x)
{
int i = ... | ALGO | 0.999367 | 4.988214 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-08-06T18:01: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": "790e21461ffb... |
e5c64f8a-434f-457e-8f11-d7eecae90234 | dnbaker/sketch | include/blaze/blaze/math/expressions/SVecNormExpr.h | //=================================================================================================
/*!
// \file blaze/math/expressions/SVecNormExpr.h
// \brief Header file for the sparse vector norm expression
//
// Copyright (C) 2012-2020 <NAME> - All Rights Reserved
//
// This file is part of the Blaze library. ... | TOOL | 0.926437 | 7.50483 | {
"github_metadata": {
"branch": "main",
"commit_count": 1275,
"repo_created_at": "2016-11-21T19:41:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 155,
"forks": 14,
"issues": 6,
"pull_requests": 0
},
"file_meta": {
"content_id": "bf4066... |
83ae25f0-72a2-480d-bc5a-6ba552b3be47 | emilyju0314/gpt_code_plagiarism | dataset/code_content_classifier/allpro_train/0_0_555.cpp | #include <iostream>
#include <vector>
#define MOD 1000000007
using namespace std;
long long power(long long base, long long exp) {
long long res = 1;
while (exp > 0) {
if (exp % 2 == 1) {
res = (res * base) % MOD;
}
base = (base * base) % MOD;
exp /= 2;
}
r... | ALGO | 0.999993 | 4.865868 | {
"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": "d713d3beda4... |
f97e18df-ae82-467e-b5a1-46126ece5ee3 | mono-1729/AtCoder_cpp | ARC/160/d.cpp | #include <bits/stdc++.h>
#include <unordered_map>
#include <stdlib.h>
#include <boost/multiprecision/cpp_int.hpp>
#include <atcoder/all>
using namespace atcoder;
using namespace boost::multiprecision;
using namespace std;
#define rep(i, a, n) for(ll i = a; i < n; i++)
#define rrep(i, a, n) for(ll i = a; i >= n; i--)
#d... | ALGO | 0.999972 | 4.214407 | {
"github_metadata": {
"branch": "main",
"commit_count": 296,
"repo_created_at": "2023-07-13T08:05: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": "d3a65e50ee... |
b51de5ef-b26a-4d3a-ba48-b37bbc7eec48 | TaoSama/ICPC-Code-Library | 2015 Training/Spring Plan/03 贪心/B.cpp | //
//
//
// Created by TaoSama on 2015-04-22
// Copyright (c) 2015 TaoSama. All rights reserved.
//
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <set>
#i... | ALGO | 0.999965 | 3.555663 | {
"github_metadata": {
"branch": "master",
"commit_count": 191,
"repo_created_at": "2016-03-24T05:56:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5411de01... |
0a7d9f7d-1251-4ea7-90ca-8784fd4cee15 | ZachTaylor2002/Leetcode-Repo | Arrays and Strings Questions/mergeAlternately.cpp | class Solution {
public:
string mergeAlternately(string word1, string word2) {
//We have two iteratibles here
//Two pointer approach!
int pointer_word1 = 0;
int pointer_word2 = 0;
//Counter (for each iterable) to keep track of each time we appened to the resulting s... | ALGO | 0.999921 | 5.933275 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2025-04-08T13:56: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": "1eddfacdd77... |
f3e9c2f8-4398-4daf-b69f-9d08f086f098 | Sion1407/Find-position-of-first-repeating-element-in-array | arrayprob1.cpp | //given an array off size n, task is to find the first repeating element in the array of integers,
//i.e., an element that occurs more than once and whose index of first occurence is smallest
#include <bits/stdc++.h>
using namespace std;
int main(){
int n,i,j,index=0;
cin>>n;
int a[n],count_array[n],count=0... | ALGO | 0.999985 | 3.715852 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-07-27T14:34: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": "9b15b455db52... |
1765f082-9047-4000-9d76-5f48c7193193 | ngyngcphu/Data-Structures-and-Algorithms | Advance_Tree/Programming_Code/AVL_Tree.cpp | #include <iostream>
#include <queue>
using namespace std;
enum BalanceValue
{
LH = -1,
EH = 0,
RH = 1
};
template <class T>
class Node
{
public:
T data;
Node *left;
Node *right;
BalanceValue balance;
Node(const T &val)
{
data = val;
left = right = nullptr;
... | ALGO | 0.999365 | 4.885917 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2022-12-10T03:49:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4e8b54502adb... |
686dbb8f-3f1c-4da3-b6cd-1e76441ae5cd | whoisroop/LeetCode-Solutions | Striver SDE/Array III/MajorityElementII.cpp | // LeetCode - 229. Majority Element II.
// Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times.
// #include<iostream>
// #include<vector>
#include<bits/stdc++.h>
using namespace std;
class Solution {
public:
vector<int> majorityElement(vector<int> &A) {
int n = A.size()... | ALGO | 0.999985 | 5.844588 | {
"github_metadata": {
"branch": "main",
"commit_count": 168,
"repo_created_at": "2022-07-27T15:50:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f306408c11... |
c8bf32c7-8156-4eb3-8290-e773bbb5a886 | alexeyche/vespa | searchlib/src/vespa/searchlib/tensor/hamming_distance.h | // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "distance_function.h"
#include <vespa/eval/eval/typed_cells.h>
#include <vespa/vespalib/util/typify.h>
#include <cmath>
namespace search::tensor {
/**
* Calculates the Hamming distance def... | TEST | 0.916719 | 7.255033 | {
"github_metadata": {
"branch": "master",
"commit_count": 62084,
"repo_created_at": "2022-03-07T09:53:39.000Z",
"is_fork": true,
"is_org_owned": false,
"forked_from": "vespa-engine/vespa",
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"conte... |
d2301c81-9d27-4600-9679-66a46ec09dab | bryanibit/mosaic_multi_photos | mosaic_multi_photos/main.cpp | #include "mosaic.h"
using namespace std;
using namespace cv;
#define DisPlay 1
int main()
{
mosaic mosaicGenerator;
//遍历文件夹参数
char fileName[50];
string fileFolderPath = "..\\images";
string fileExtension = "JPG";
string fileFolder = fileFolderPath + "\\*." + fileExtension;
struct _finddata_t fileInfo; // 文件信... | ALGO | 0.979377 | 3.934179 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2016-12-26T06:43: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": "56183caa4c... |
765d20eb-6e6e-4795-897e-dfe9e5a4250a | sunbaoshi1975/EricCCC | Kattis/Clinic.cpp | #include <bits/stdc++.h>
using namespace std;
#define LOCAL
struct Clinic {
/* data */
int t;
int s;
char name[11];
};
struct NameNode {
/* data */
char name[11];
list<Clinic>::iterator it;
};
list<Clinic> t1;
list<Clinic>::iterator it1;
int N, K;
int findName(const char *pName) {
l... | ALGO | 0.999395 | 3.502448 | {
"github_metadata": {
"branch": "main",
"commit_count": 39,
"repo_created_at": "2023-01-02T02:22: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": "7c5fff9e7b9... |
5a6b3c47-bb9c-4da8-a697-b1063cb3b50a | oshch/alcs | main.cpp | #include "alcs.h"
#include <algorithm>
#include <random>
using namespace std;
std::default_random_engine generator;
int RandomInt(int left, int right)
{
std::uniform_int_distribution<int> distribution(left, right);
return distribution(generator);
}
bool CompareVectors(std::vector < std::vector <int> > &fir... | TEST | 0.989273 | 4.153608 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2015-05-10T17:44: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": "5191218b74... |
0444afa7-2997-4230-b22f-49515d685276 | liuyubobobo/Play-with-Algorithms | 03-Sorting-Advance/Course Code (C++)/08-Quick-Sort-Three-Ways/main.cpp | #include <iostream>
#include <algorithm>
#include <ctime>
#include "SortTestHelper.h"
#include "MergeSort.h"
#include "InsertionSort.h"
#include "QuickSort.h"
using namespace std;
// 递归的三路快速排序算法
template <typename T>
void __quickSort3Ways(T arr[], int l, int r){
// 对于小规模数组, 使用插入排序进行优化
if( r - l <= 15 ){
... | TEST | 0.997863 | 5.452273 | {
"github_metadata": {
"branch": "master",
"commit_count": 311,
"repo_created_at": "2016-07-05T18:16:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3700,
"forks": 1461,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f1... |
36d700bb-20ac-480c-99fa-ecce1013bd81 | jbarakat/bem3d_ves_tube | lib/ellipsoid.cc | #include "cxxheaders.h"
#include "ellipsoid.h"
#include "mathfunc.h"
/* void ellipsoid::calcLatLonAngles
* void ellipsoid::calcLocalGeom */
void ellipsoid::calcLatLonAngles(double A, double B, double C, const double *x,
double &th, double &phi)
{
assert(fabs(x[2]) <= C);
th = acos(x[2]/C);
phi = atan... | ALGO | 0.994524 | 4.868596 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2015-08-23T19:50:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9fd871307... |
2f0736d5-bf19-4731-aaff-caef53708660 | luciocf/CP-Problems | Codeforces/627C.cpp | // Codeforces 627C - Package Delivery
// <NAME>
// Solution is the same as in editorial
#include <bits/stdc++.h>
#define ff first
#define ss second
using namespace std;
typedef pair<int, int> pii;
typedef long long ll;
const int maxn = 2e5+10;
int r[maxn];
pii a[maxn];
int main(void)
{
int d, n, m;
scanf("%d ... | ALGO | 0.99987 | 3.322562 | {
"github_metadata": {
"branch": "master",
"commit_count": 1082,
"repo_created_at": "2019-02-04T01:05:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1df1d7a... |
2ddeaaf4-e6c1-44c1-a435-1037f7557295 | zholofmeister/20ICPC-template | 计算几何/点.cpp | const double eps = 1e-5;
const double inf = 1e20;
const double pi = acos(-1.0);
const int maxp = 1010;
//Compares a double to zero
int sgn(double x) {
if (fabs(x) < eps) return 0;
if (x < 0) return -1;
else return 1;
}
//square of a double
inline double sqr(double x) {return x * x;}
struct Point {
doubl... | ALGO | 0.997498 | 3.491725 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-12-14T11:31:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "80f16c7181... |
a33e922c-b4b3-4e93-88ad-117a53167033 | Irrelev4nt13/Vectors-Similarity-Search-And-Clustering | modules/Lsh/HashTable/HashTable.cpp | #include <vector>
#include <unordered_map>
#include <string>
#include <climits>
#include <cstdint>
#include "Utils.hpp"
#include "HashTable.hpp"
// That's the number from the slides
static const int64_t M = ((int64_t)(1) << 32) - 5;
// The constructor of the amplified function g_i
AmpLsh::AmpLsh(int w, int numHashFu... | ALGO | 0.98418 | 4.161304 | {
"github_metadata": {
"branch": "main",
"commit_count": 147,
"repo_created_at": "2023-10-08T08:14: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": "c982c80513... |
6dddb100-766e-49f9-b70d-9480ba1e3a32 | Gal2o/Algo_Study | AlgoStudy/6087 레이저 통신.cpp | //#include <iostream>
//#include <vector>
//#include <queue>
//#include <tuple>
//using namespace std;
//
//int w, h, mirror = 987654321;
//char map[100][100];
//pair<int, int> st, fin;
//int dy[4] = {-1, 1, 0, 0}, dx[4] = {0, 0, -1, 1};
//
//int main() {
// cin >> w >> h;
//
// int tmp = 0;
// for (int i = 0;... | ALGO | 0.999938 | 3.590103 | {
"github_metadata": {
"branch": "master",
"commit_count": 53,
"repo_created_at": "2021-04-05T13:46: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": "1ca01220b... |
62d397d2-1df7-4aac-a71b-9b2cc6d2c93e | DiegoHDMGZ/ICPC-notebook | Math/Polynomials/FFT-NTT/Aplications/polynomialsOperations.cpp | #include <bits/stdc++.h>
using namespace std;
using Long = long long;
// MOD = 2^k * c + 1
// r = primitive root of MOD
// wn = r^c
const int MOD = 998244353; // MOD = 2^23 * 119 + 1
const int root = 3; // primitive root of MOD
const int rootInv = 332748118; // modular inverse of root
struct ModInt {
... | ALGO | 0.999878 | 4.949135 | {
"github_metadata": {
"branch": "master",
"commit_count": 1013,
"repo_created_at": "2020-08-08T17:21:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0b965aa... |
1b569ccd-5b0d-4a2f-8510-e5213e3d3772 | the-stranded-alien/LeetCode | 1201_1300/1277_Count_Square_Submatrices_with_All_Ones.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>
#define... | ALGO | 0.999826 | 4.358246 | {
"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": "679f19e401... |
66bb21bf-c237-456d-8eea-0692db9ef2df | ishandutta2007/codeforces-g | gs12117/normal/819/B.cpp | #include<cstdio>
#include<queue>
long long int ans;
int anst;
long long int dev;
int n;
int a[1001000];
int diff[1001000];
int main() {
scanf("%d", &n);
for (int i = 0; i < n; i++) {
scanf("%d", &a[i]);
diff[i] = a[i] - i - 1;
}
std::priority_queue<std::pair<int, int>> pq;
for (int i = 0; i < n; i++) {
if (d... | ALGO | 0.999819 | 3.143723 | {
"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": "08b015ea93f4... |
511e40c7-22a3-49bf-bfe6-4d682fa20fc2 | ra2003/Plagiarism | dataset/test/1624C/18.cpp | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
... | ALGO | 0.997698 | 4.58362 | {
"github_metadata": {
"branch": "main",
"commit_count": 44,
"repo_created_at": "2022-08-06T10:23:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f6d1dcfe9d9... |
a8090630-ae87-4cbc-9ef6-32b579c1b259 | HeHaowei/Leetcode | main/Implement strStr().cpp | class Solution {
public:
int strStr(string haystack, string needle) {
int needle_size = needle.size();
int haystack_size = haystack.size();
if (needle_size > haystack.size()) return -1;
if (needle_size == 0) return 0;
int i = 0;
int ii = 0;
... | ALGO | 0.999907 | 5.480751 | {
"github_metadata": {
"branch": "master",
"commit_count": 86,
"repo_created_at": "2019-06-01T12:08: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": "7b8e6ee2f... |
a8ff2f56-8de3-40d1-a1db-7abae0cae422 | gekon83/cpp_Linked-List | src/LinkedList.cpp | //============================================================================
// Name : LinkedList.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Linked List, Ansi-style
//============================================================================
#include <iost... | ALGO | 0.999114 | 4.921628 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2020-01-13T14:51:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "92c806a173... |
f9344bd9-fd14-4ae3-b87d-83389a9ee75e | gs18103/PS | BOJ/Archive/12736.cpp | #include <bits/stdc++.h>
#define fi first
#define se second
#define all(v) v.begin(), v.end()
#define eb emplace_back
#define em emplace
using namespace std;
typedef long long ll;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;
const int INF = 1 << 30;
const ll LINF = 1LL << 62;
const int MAX = 303030;
ll an... | ALGO | 0.999973 | 3.478271 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2024-03-02T00:20:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2e5ed53f195... |
314ae1c0-3299-4307-b62a-ba2a31199d95 | tomoakiii/atcoder2 | Archive/abc303/e.cpp | #include <atcoder/all>
#include <bits/stdc++.h>
using namespace std;
using namespace atcoder;
#define rep(i,n) for (int i = 0; i < (n); ++i)
typedef long long ll;
const ll INF = 0x0F0F0F0F0F0F0F0F;
const int INFi = 0x0F0F0F0F;
int main(){
ll N;
cin >> N;
vector tr(N, vector<ll>{});
int u,v;
rep(i... | ALGO | 0.999429 | 4.335366 | {
"github_metadata": {
"branch": "main",
"commit_count": 252,
"repo_created_at": "2024-02-05T06:43: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": "ec0548a599... |
4766996b-61ff-4d92-85fe-bc00f5245972 | williammc/dvo | dvo/dense_tracking_impl.cc | #include "dvo/dense_tracking_impl.h"
#ifdef __CDT_PARSER__
#define __SSE3__
#endif
#ifndef __APPLE__
#include <immintrin.h>
#endif
#include <pmmintrin.h>
namespace dvo {
namespace core {
void computeResiduals(const PointIterator &first_point,
const PointIterator &last_point, const RgbdImage &c... | ALGO | 0.999126 | 6.027043 | {
"github_metadata": {
"branch": "master",
"commit_count": 40,
"repo_created_at": "2015-05-06T08:41:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a3dfb2fb4... |
e8fe7937-352d-4135-9b0c-a6a8f3c81816 | zixiao-bios/LeetCode | src/0018_2.h | #ifndef LEETCODE_0018_2_H
#define LEETCODE_0018_2_H
#include <vector>
#include <unordered_map>
#include <algorithm>
using std::vector;
class Solution {
public:
vector<vector<int>> fourSum(vector<int> &nums, int target) {
vector<vector<int>> ans;
if (nums.size() < 4) {
return ans;
... | ALGO | 0.999765 | 6.314275 | {
"github_metadata": {
"branch": "master",
"commit_count": 250,
"repo_created_at": "2022-02-27T05:58: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": "1e534968... |
0e535be7-df0a-4ca5-a312-233310b184a7 | hugobbi/search-algorithms | new/src/uninformed.cpp | /**
* Implementations of uninformed search algorithms
* Mostly taken from the slides
* Standard stuff.
*/
#include "../headers/search.hpp"
#include "../headers/puzzle.hpp"
#include <deque>
#include <unordered_set>
#include <iostream>
void bfs_graph(state_t state, int& expanded_nodes, int& found_cost, int& start_heu... | ALGO | 0.999993 | 6.386557 | {
"github_metadata": {
"branch": "main",
"commit_count": 36,
"repo_created_at": "2024-04-14T16:41: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": "1014a53c75d... |
9382ba57-23af-4bfd-9e36-f250dc437d59 | TimeBear/GitCode | CodeBloksFile/DataConstuctor/二叉树/析构函数.cpp | #include <iostream>
#include <cstdlib>
#include <string>
#include <cstring>
using namespace std;
/*说明:
3.析构函数:release()
4.前序遍历函数
5.中序遍历函数
6.后序遍历函数
7.层序遍历函数
8.求当前节点深度:depth()
9.求该树的叶子节点:leafs()
10.改变左右子树:changelr()
*/
struct BiNode {
string data;
BiNode *lchild,*rchild;
};
class BiTree {
private:
BiNode *root;
... | ALGO | 0.99964 | 3.459342 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2016-12-20T12:01: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": "7d16b3422c... |
13f52578-8045-4243-878c-bd4c7c75fa96 | xitonchong/leetcode | graph-theory/DFS_BFS/c002_bredth_first_search/graph.cpp |
#include<iostream>
#include<list>
using namespace std;
class Graph{
int V;
// Pointer to an array containing adjacency
// lists
list<int> *adj;
public:
Graph(int V); //constructor
//function to add an edge to graph
void addEdge(int v, int w);
//prints BFS traversal from a giv... | ALGO | 0.999605 | 4.069283 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2022-10-24T02:11: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": "1213713b2a... |
2efe2af7-4163-402a-b4e3-8da88b89a7dc | nickyrio1342/Hue2017 | Day2/TREELINE2.cpp | #include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = a; i<=b; i++)
#define FORD(i, a, b) for (int i = a; i>=b; i--)
#define REP(i, a) for (int i = 0; i<a; i++)
#define N 100100
#define pp pair<int, int>
using namespace std;
int n, h, a[N];
const long long MOD = 1e9;
long long f[N][4];
int main() {
ios::syn... | ALGO | 0.999986 | 3.306703 | {
"github_metadata": {
"branch": "master",
"commit_count": 44,
"repo_created_at": "2017-09-08T07:32:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "788579a2e... |
f920ce7d-1d67-4365-8c4e-0c4fa4931cbd | anwesha-tally/static-analyzer | main.cpp | #include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <regex>
#include <sqlite3.h>
#include <filesystem>
#include <sstream>
struct APIInfo {
std::string name;
std::string category; // "OS" or "Standard"
std::string signature;
};
class APIAnalyze... | TOOL | 0.930357 | 6.656593 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-12-26T09:36: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": "342a06b3583d... |
c2d89088-149a-4194-adb1-dfbbbf3d57d3 | jdmc525/arduino-basico | Display_Secuencia_0_9/Display_Secuencia_0_9.ino |
int display7c [10] ={0x3f, 0x06, 0x5b, 0x4f, 0x66,0x6d,0x7d,0x07,0x7f,0x67};
int punto = 5;
int a = 6;
int b = 7;
int c= 8;
int d=9;
int e= 10;
int f= 11;
int g= 12;
int incremento = 2; //pulsadores para que incremente los numeros del 0 al 9 (Resistencia real o pulldown en paralelo con el pulsador)
int decremento = 3... | ALGO | 0.991036 | 3.903387 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-04-03T15:58: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": "151ec514769c... |
ff280396-ee7a-49db-83f1-e66724982aac | praneeth-lakshman/Differential-Solvers-Source-Code | cpp_files/rk45.cpp | #include <algorithm>
#include <cmath>
#include <fstream>
#include <iostream>
class Values {
public:
double y;
double h;
bool accepted;
};
const double a11 = 0;
const double a21 = 1.0 / 4;
const double a31 = 3.0 / 32;
const double a32 = 9.0 / 32;
const double a41 = 1932.0 / 2197;
const double a42 = -7200.0 / 21... | ALGO | 0.999984 | 5.096564 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2025-07-02T18:02:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "952e8710494... |
76bc7a7e-fa89-469b-aa83-e2934a3a7a2d | Eeshan2001/DSA_AbdulBari | Algorithms/Kadane's_Algorithm.cpp | /*
Code by:<NAME>
Created on: 27-12-2021 18:51
*/
#include<bits/stdc++.h>
using namespace std;
void maxSubArray(vector<int>& nums)
{
int endIndex=0;
if(nums.size()==0) cout<<"Empty Array";
int sub_max=nums[0];
int sub_including_current=nums[0];
for(int i=1;i<nums.size();i++)
{
sub_inclu... | ALGO | 0.999934 | 4.743961 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2022-07-31T11:57: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": "cafea528a584... |
3c529d45-50a1-40cd-bb5e-55c9afde94be | SPiskurskyi/MyLabs | 2 course/Algorithms and calculation models/hw16/hw16.cpp | #include <iostream>
#include <string>
#include <utility>
class long_dec
{
private:
struct Node
{
Node* next;
Node* prev;
short value;
};
Node* tail;
Node* head;
std::pair<size_t, bool> __add__digits__carry(char value, char value1, bool carry)
{
size_t sum = (value - 0x30 + value1 - 0x30) + carry;
if (... | ALGO | 0.99981 | 4.579566 | {
"github_metadata": {
"branch": "master",
"commit_count": 42,
"repo_created_at": "2022-12-07T18:43:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "163055401... |
ed286871-06e5-48f7-910d-d0e99aaf79a3 | agazibaric/GP-Image-Processing | main.cpp | #include <ECF/ECF.h>
#include "cartesian/Cartesian.h"
#include "ImageProcessingOp.h"
#include <iostream>
#include <algorithm>
#include <functional>
#include "IP.h"
void writeInfo(const char* fileName, StateP state) {
ofstream file;
file.open(fileName);
vector<IndividualP> best = state->getHoF()->getBest(... | DATA | 0.956843 | 5.304847 | {
"github_metadata": {
"branch": "master",
"commit_count": 35,
"repo_created_at": "2021-01-06T21:49: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": "565d8897c... |
8409fa23-eaa0-4ee7-9403-8570bdfccf3c | xiyanykt/code | Nowcoder/2024_Nowcoder_Multi_University_Training_Contest_4/C.cpp | #include<bits/stdc++.h>
using i64 = int64_t;
#ifndef ONLINE_JUDGE
#include "debug.h"
#else
#define debug(...) (void)42
#endif
int main(void) {
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
auto solve = [&]() {
int n;
std::cin >> n;
std::vector<int>a(n + 1);
for (int i = 1; i <= n; i += 1) {
... | ALGO | 0.99959 | 4.160098 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2025-04-23T01:10: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": "739e07ee45e... |
5c22bf9f-1276-430d-a976-e4794515f220 | pidddgy/competitive-programming | codeforces/pingpongeasy.cpp | // https://codeforces.com/contest/320/problem/B
#include <bits/stdc++.h>
#define cerr if(false) cerr
#define watch(x) cerr << (#x) << " is " << (x) << endl;
#define int long long
#define pii pair<int, int>
#define fi first
#define se second
using namespace std;
signed main() {
int n;
cin >> n;
vector<pii>... | ALGO | 0.999981 | 4.698929 | {
"github_metadata": {
"branch": "master",
"commit_count": 87,
"repo_created_at": "2018-07-01T19:03:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "c1ab5afcb... |
056a9e7f-4194-41e4-a86d-71aea36ac3f5 | conlacda/algo-practice | atcoder/BeginnerContest/357/B - Uppercase and Lowercase.cpp | // [Atcoder|Codeforces].abcxxx.F
#pragma GCC optimize("O3") // optimize("Ofast,unroll-loops")
#include<bits/stdc++.h>
typedef long long ll; // double long double
const ll mod = 1000000007; // 998244353 1000000009 1000000007 // đừng dùng ull
#define int long long // __int128
const int INF = std::numeric_limits<int>::... | ALGO | 0.999906 | 4.668702 | {
"github_metadata": {
"branch": "master",
"commit_count": 427,
"repo_created_at": "2020-11-22T14:26: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": "bfa8a8e4... |
617773a6-08e5-430e-b619-4df76bc440e6 | jeongwwon/CodingTest | 스타트와 링크.cpp | #include<bits/stdc++.h>
using namespace std;
const int INF = 987654321;
int n,s[21][21],ret=INF;
int go(vector<int>& a, vector<int>& b) {
pair<int, int>p;
for (int i = 0; i < n / 2; i++) {
for (int j = 0; j < n / 2; j++) {
if (i == j)continue;
p.first += s[a[i]][a[j]];
p.second += s[b[i]][b[j]];
}
}
... | ALGO | 0.999944 | 3.792232 | {
"github_metadata": {
"branch": "main",
"commit_count": 108,
"repo_created_at": "2023-09-26T06:45: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": "d2dcae7d56... |
35a967ba-62be-45e8-8132-56e5bf0780ea | socc-io/algostudy | baekjoon/smilu/11001.cpp | #include <cstdio>
#include <algorithm>
using namespace std;
typedef long long ll;
ll t[100001], v[100001], n, D, ans;
ll cost(ll i, ll j) {
return (j-i)*t[j]+v[i];
}
void dnq(ll s, ll e, ll l, ll r) {
if (s > e) return;
ll m = (s+e)>>1;
ll k = max(l, m-D);
for (ll i = k; i <= min(r, m); i++) {
if (cos... | ALGO | 0.999982 | 3.736122 | {
"github_metadata": {
"branch": "master",
"commit_count": 785,
"repo_created_at": "2015-01-08T04:25:40.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 10,
"forks": 3,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "2b808648... |
c12b7c8a-ce6f-40ba-abae-6499b488fb84 | MAZHARMIK/Interview_DS_Algo | strings/Detect Capital.cpp | /*
MY YOUTUBE VIDEO ON THIS Qn : https://www.youtube.com/watch?v=DrVLI_NXaic
Company Tags : GOOGLE
Leetcode Link : https://leetcode.com/problems/detect-capital/
*/
//Approach-1 (Simple Checks)
//NOTE : YOU can also use isupper() C++ function to check capital
class Solution {
p... | ALGO | 0.999453 | 5.960227 | {
"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": "... |
9ae0e107-d98d-4966-8bbd-ef7bb547629d | rarysson/controle-ar-condicionado | controla_ar/controla_ar.ino | #include <LiquidCrystal.h>
#include <IRremote.h>
//LCD
LiquidCrystal lcd(12, 11, 7, 6, 5, 4);
//Sensor temperatura
int pin_temp = A0;
int valor_temp;
float R1 = 10000; //valor do resistor da placa
float logR2, R2, temperatura_ambiente;
float c1 = 0.001129148, c2 = 0.000234125, c3 = 0.0000000876741; //steinhart-hart ... | TOOL | 0.947825 | 5.880294 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-10-27T00:45:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c73308b9cc... |
2969a48b-45d9-4460-8c68-4099cd8f72dd | VishalSingh-07/LeetCode | Medium/Compare_Version_Numbers.cpp | /*
165. Compare Version Numbers
Given two version numbers, version1 and version2, compare them.
Version numbers consist of one or more revisions joined by a dot '.'. Each revision consists of digits and may contain leading zeros. Every revision contains at least one character. Revisions are 0-indexed from left to rig... | ALGO | 0.999892 | 5.843694 | {
"github_metadata": {
"branch": "master",
"commit_count": 239,
"repo_created_at": "2022-12-28T10:31:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "927c0455... |
fceabd55-4efc-4447-8509-b2b615486a93 | TasiChicken/LeetCode | cpps/1000/600/40/535.cpp | #include <bits/stdc++.h>
using namespace std;
class Solution {
const string domain = "https://tinyurl.com/";
unordered_map<string, string> l2t, t2l;
string i2base62(int num){
if(num == 0) return "0";
string ans;
while(num){
int temp = num % 62;
num ... | ALGO | 0.996092 | 5.579343 | {
"github_metadata": {
"branch": "main",
"commit_count": 265,
"repo_created_at": "2023-08-02T15:42:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ccb29bd6aa... |
f69a3372-5684-4edc-87d0-6e801eec7dd5 | mohammad-majoony/codeForces-submits | D. Challenging Valleys/main.cpp | #include<bits/stdc++.h>
using namespace std ;
#define enl '\n' ;
string solve(){
int len , count = 0 , where = 0 , num1 , num2 ;
cin >> len ;
cin >> num1 ;
for(int index = 1 ; index < len ; index++){
cin >> num2 ;
if(num2 > num1 && where != 1){
count++ ;
where ... | ALGO | 0.999978 | 4.062716 | {
"github_metadata": {
"branch": "master",
"commit_count": 81,
"repo_created_at": "2023-04-27T10:13:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ceaba5125... |
57e6c058-0bea-404d-8457-f7b4dc5159dc | DAIRLab/dairlib | systems/filters/output_vector_filter.h | #pragma once
#include "systems/framework/output_vector.h"
#include "drake/multibody/plant/multibody_plant.h"
#include "drake/systems/framework/leaf_system.h"
/// OutputVectorFilter implements a first order vector-valued linear
/// lowpass filter. Since the control loops we use generally do not have
/// a fixed samp... | ALGO | 0.953584 | 6.835177 | {
"github_metadata": {
"branch": "main",
"commit_count": 514,
"repo_created_at": "2018-05-30T21:40:36.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 97,
"forks": 32,
"issues": 24,
"pull_requests": 14
},
"file_meta": {
"content_id": "d5163e8... |
a8b4cab0-2178-4e4d-ba8e-cd8dda9477ef | mattprice09/IT279 | asg1/stackProgram/calculate.cpp | #include <algorithm>
#include <set>
#include <cstdlib>
#include <string>
#include <stack>
#include <iostream>
#include "LLStack.h"
using namespace std;
int clear();
int undo();
int redo();
int calculate(int curr, string oper, int operand);
int parseNumber(string input);
int main() {
int DEBUG = 0;
LLStack<int... | ALGO | 0.990607 | 4.964475 | {
"github_metadata": {
"branch": "master",
"commit_count": 91,
"repo_created_at": "2016-09-16T19:11:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4358b20b4... |
c1a60ff4-a52b-43a5-b247-ef69186ebf8a | ishandutta2007/codeforces-p | pavement/normal/1278/D.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define int long long
#ifdef TEST
#define getchar_unlocked _getchar_nolock
#define putchar_unlocked _putchar_nolock
#endif
#define ins insert
#define mp make_pair
#defi... | ALGO | 0.999973 | 3.942669 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:49:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f51f5bf99a96... |
d8249366-e0f8-4c54-92ae-66754b338bac | Sujal1234/Capybara_Patrol_Secy_Task | src/validator.cpp | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr int MIN_N = 2;
constexpr int MAX_N = 1e5;
constexpr ll MIN_M = 1;
constexpr ll MAX_M = 1e7;
ll encodePair(int x, int y, int n){
return (ll) x * (ll) n + y;
}
int main(int argc, char* argv[]) {
registerValidati... | ALGO | 0.999534 | 4.661776 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2025-05-18T16:21: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": "7dc26cbbb24d... |
1a4febc9-1861-4186-b2d2-76d04f7efe60 | PaulLandaeta/algoritmica2 | contenido/Backtracking/Problemas/islas.cpp | #include <bits/stdc++.h>
#define input freopen("in.txt", "r", stdin)
#define output freopen("out.txt", "w", stdout)
using namespace std;
int n;
string graph[1010];
void solve(int fila, int columna) { // column es la columna actual
if(fila>=0 && fila<n && columna>=0 && columna<n && graph[fila][columna]=='1') {
... | ALGO | 0.999866 | 4.717854 | {
"github_metadata": {
"branch": "master",
"commit_count": 124,
"repo_created_at": "2020-09-21T08:54:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 11,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1a8787b... |
7280141c-dbf3-46d5-b022-0b5e62dd5c46 | RedwanPlague/CodeForces | C++/126D | Fibonacci Sums/solution_2.cpp | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
typedef long long ll;
#define br '\n'
const ll mx = round(1e18); // round needed for floating point error :3
const int limit = 85; // fib[86] is > 1e18
ll fib[100];
void make()
{
fib[0] = 1;
fib[1] = 2;
for(int i = 2... | ALGO | 0.999958 | 4.368185 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-06-26T14:19:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "db38fa56a6ec... |
ebdfbe94-3c9a-46df-973e-3a3169ead832 | Evalir/Algorithms | Problems/hackerRank/A.cpp | #include <iostream>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <cmath>
#include <algorithm>
#include <bitset>
#include <list>
#define INF (int)1e9;
using namespace std;
typedef long long llong;
typedef unsigned long long uint64;
typedef vector<int> VI;
typedef vector<VI> ... | ALGO | 0.998934 | 3.426351 | {
"github_metadata": {
"branch": "master",
"commit_count": 318,
"repo_created_at": "2017-08-06T15:20: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": "3f363065... |
29e2ad2d-d922-4804-900c-69aba8bfe81c | Xe0n0/wikioi | 1004-四子连棋.cpp | #include <iostream>
#include <vector>
#include <queue>
#include <cmath>
using namespace std;
class board {
public:
vector<vector<char> > data;
int x1;
int y1;
int x2;
int y2;
int level;
char now;
board(){
data = vector<vector<char> >(4, vector<char>(4, 'O'));... | ALGO | 0.999683 | 3.780032 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2013-09-04T06:02: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": "c56cc0c4d0... |
9d6d0a81-2664-4308-88a8-ca065cd0b2c9 | shivamEr/DSA-In-CPP | Sortings/binarySearch.cpp | #include <bits/stdc++.h>
using namespace std;
// Time Complexity
// Wrost Case = O(n^2) , Ex - 7 6 4 3 2
// Best Case = O(n), Ex - 1 2 3 4 5 (in case of sorted array)
int binarySearch(int arr[],int n,int target){
int start =0,end = n-1;
while (start<end)
{
int mid = (start+mid)/2;
if(arr[mid] == targe... | ALGO | 0.99991 | 5.768188 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2024-06-29T04:25: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": "d4e9a8bbd... |
8bc00432-4d07-4db8-bf32-0772f58def3b | vivekzagade1/training | DS-ALGO/1083.cpp | /**You are given all numbers between 1,2,…,n except one. Your task is to find the missing number.
Input
The first input line contains an integer n.
The second line contains n−1 numbers. Each number is distinct and between 1 and n (inclusive).
Output
Print the missing number.
Constraints
2≤n≤2⋅105
Example
Input:
... | ALGO | 0.99979 | 3.514403 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2020-12-23T14:32:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fcfde7ae2... |
e63361b2-809c-4a8b-a73c-6c454da37748 | tnakai11/Atcoder-practice | ABC/ABC285/c.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
bool DEBUG = 0;
// https://atcoder.jp/contests/abc285/tasks/abc285_c
// c = (A~Zの文字数) とすると
// IDの長さがnである問題の数... c^n
// またIDの長さがnである問題についてあるIDが何番目なのかは
// ID文字列をc進数と解釈すればわかる
// よって入力Sに対する答えは sum_{i=1}^{len(S)-1} c^i + num(S) + 1
const ll c = 'Z' - 'A' + ... | ALGO | 0.999636 | 4.188142 | {
"github_metadata": {
"branch": "main",
"commit_count": 122,
"repo_created_at": "2020-11-29T08:18: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": "6bedfddfe3... |
73c808ca-169a-45d7-92ca-990f1866bea6 | wengsht/USACO-Acceptor | section5/section5.2/01.cpp |
/*
ID: wengsht1
LANG: C++
TASK: snail
*/
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <string>
#include <queue>
#include <map>
#include <set>
using namespace std;
#define HOME
#define MX 100000
int N, M, K;
int ret;
int Board[121][121];... | ALGO | 0.999944 | 3.150759 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2012-11-01T06:46:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d71f3b217... |
d6aa5224-386a-4ddb-80a1-45f665e8da71 | imih/cmplx | source_detector/source_detection_params.cc | #include "source_detection_params.h"
#include <vector>
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <cstring>
#include <random>
#include "../simul/simulator.h"
#include "../common/realization.h"
using cmplx::common::IGraph;
using cmplx::common::BitArray;
using cmplx::common::R... | ALGO | 0.995861 | 6.058938 | {
"github_metadata": {
"branch": "master",
"commit_count": 161,
"repo_created_at": "2015-12-19T09:46: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": "598a0a2a... |
40251367-d47f-4e82-86e2-a93bd4d5d0b5 | emilyju0314/gpt_code_plagiarism | dataset/code_content_classifier/ai_code/train/0_0_3399.cpp | #include <iostream>
#include <vector>
#include <cmath>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> result(m+1, -1);
result[0] = 0;
for (int i = 0; i < n; i++) {
int t, xi, yi;
cin >> t >> xi >> yi;
double x = xi / 100000.0;
vector<int> ... | ALGO | 0.999983 | 3.845646 | {
"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": "93d23b449bf... |
6df9bea5-0558-497f-824e-7bd42129a0ab | limcheling/Ski | Ski/Mountain.cpp | //
// Mountain.cpp
// Ski
//
// Created by <NAME> on 31/1/18.
// Copyright © 2018 <NAME>. All rights reserved.
//
#include "Mountain.h"
#include <iostream>
#include <fstream>
#include <cstdlib> //for exit(1)
bool Mountain::isDescending(const int row, const int col, const short elevation)
//map.data[row][col] is t... | ALGO | 0.997957 | 3.95248 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2019-06-01T11:10: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": "6521cdcb59... |
a5097798-9c21-46b4-946b-466a4b1013f5 | alexandraback/datacollection | solutions_1482494_0/C++/hogeover30/B.cc | #include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cmath>
#include <cstdio>
#include <cst... | ALGO | 0.9999 | 3.552227 | {
"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": "3d5a53bde... |
489c64de-802a-4a27-9238-e657014107b2 | StevensDeptECE/CPE593 | old/session06_GrowArray_LinkedList_Stack_Queue/GrowArray/BadGrowArray_2019S.cc | class BadGrowArray {
private:
int* data; // int[] data
int len;
int capacity;
void grow() { // double the size
}
public:
BadGrowArray() {
data = nullptr;
len = 0;
}
void insert(int pos, int val) {
int* old = data;
data = new int[len+1];
for (int i = 0; i < pos;i++)
data[i] = old[i];
data[pos] = ... | ALGO | 0.932961 | 4.382747 | {
"github_metadata": {
"branch": "master",
"commit_count": 238,
"repo_created_at": "2017-09-05T19:22:17.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 62,
"forks": 57,
"issues": 1,
"pull_requests": 1
},
"file_meta": {
"content_id": "5f34732... |
86cae174-45e1-4379-8d4f-bc20b5c04aea | NikhilYadav16/DS-LAB-EVEN | 22.cpp | #include <iostream>
struct ListNode {
int val;
ListNode* next;
ListNode(int x) : val(x), next(nullptr) {}
};
bool hasCycle(ListNode* head) {
ListNode* slow = head;
ListNode* fast = head;
while (fast && fast->next) {
slow = slow->next;
fast = fast->next->next;
if (slow... | ALGO | 0.999686 | 5.697207 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2024-03-25T07:43: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": "82c286e4fd3a... |
89fc72d7-7565-4246-b074-dc77e2ac6b6c | Oyyko/Algorithm-Problem-Codes | leetcode/week285/33.cpp | #include <iostream>
#include <climits>
#include <queue>
#include <vector>
#include <map>
#include <set>
#include <string>
#include <numeric>
#include <unordered_map>
#include <unordered_set>
#include <stack>
#include <algorithm>
using namespace std;
using LL = long long;
template <typename T>
void pr(vector<T> x)
{
... | ALGO | 0.999734 | 3.567017 | {
"github_metadata": {
"branch": "main",
"commit_count": 66,
"repo_created_at": "2021-01-22T14:36:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3bfb3209634... |
316d5d50-afb8-4918-ae4d-8a6000296875 | sribhargav1345/Striver-SDE | Trees/Hard/ChildrenSum.cpp | class Solution{
public:
//Function to check whether all nodes of a tree have the value
//equal to the sum of their child nodes.
int isSumProperty(Node *root)
{
if(root == NULL){
return true;
}
if(root -> left && root -> right) {
return isSumP... | ALGO | 0.999899 | 5.594636 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2024-12-11T09:32: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": "bb45acea9dce... |
dba09e90-bb19-48b8-a13e-92109adf5ed0 | manosriram/CodeForces-ProblemSets | 604-D2/D.cpp | #include <iostream>
#include <map>
#include <math.h>
#include <string.h>
#include <algorithm>
#include <vector>
#include <float.h>
#include <limits.h>
#include <stack>
#include <queue>
#include <time.h>
#include "unordered_map"
using namespace std;
#define MAX INT_MAX
#define MIN INT_MIN
#define INF 1e9
#define FASTER ... | ALGO | 0.999952 | 3.276707 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2019-10-22T17:17: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": "34f91ee6e... |
85d547e3-b049-4fb2-a9e0-e183b3115937 | adong001/C-C-_NC_Day | C++_CN_Day56/C++_CN_Day56/合唱团.cpp | #define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>
#include<algorithm>
struct Person
{
int weight;
int height;
};
bool cmp(const Person& p1, const Person& p2)
{
if (p1.weight != p2.weight)
{
return p1.weight < p2.weight;//体重按从小到大排
}
else
{
return p1.height <= p2.height;//身高按从高到低
}
}
std:... | ALGO | 0.999984 | 3.852631 | {
"github_metadata": {
"branch": "master",
"commit_count": 123,
"repo_created_at": "2019-06-11T10:08:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ef3e17c9... |
34dd20c1-6314-4794-abd1-feaba86a94cf | tkthegreat99/Coding_Test_Practice | 백준/Gold/4195. 친구 네트워크/친구 네트워크.cc | #include <iostream>
#include <cstring>
#include <vector>
#include <algorithm>
#include <queue>
#include <string>
#include <stack>
#include <map>
#include <set>
#include <list>
#include <unordered_set>
#include <unordered_map>
#include <tuple>
#include <limits.h>
#include <math.h>
#include <deque>
#include <sstream>
#de... | ALGO | 0.999938 | 4.094443 | {
"github_metadata": {
"branch": "main",
"commit_count": 428,
"repo_created_at": "2020-10-26T03:40:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d62fe5a5b7... |
3baf9313-fedd-42bc-b0c6-54d75e1fc593 | haoel/leetcode | algorithms/cpp/h-Index/h-Index.cpp | // Source : https://leetcode.com/problems/h_index/
// Author : <NAME>, <NAME>
// Date : 2015-10-22
/***************************************************************************************
*
* Given an array of citations (each citation is a non-negative integer) of a
* researcher, write a function to compute the... | ALGO | 0.999963 | 5.827953 | {
"github_metadata": {
"branch": "master",
"commit_count": 788,
"repo_created_at": "2014-10-20T03:22:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 17857,
"forks": 4931,
"issues": 26,
"pull_requests": 28
},
"file_meta": {
"content_id": ... |
6b3fa83d-5e35-40ee-9e24-52e756c6d46b | ankitsharma1530/Tree-LinkedList | 53. Make Binary Tree From Linked List.cpp | void convert(Node *head, TreeNode *&root) {
// Your code here
if(head == NULL)
{
return;
}
Node *curr = head;
root = new TreeNode(curr->data);
// copy the head of linkedlist in to the root
curr = curr->next;
queue<TreeNode*> q;
// push the root into th... | ALGO | 0.999926 | 4.606786 | {
"github_metadata": {
"branch": "main",
"commit_count": 39,
"repo_created_at": "2021-05-03T07:47: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": "4991eb90cf8... |
f5c923b1-e8ab-48d7-b454-560b36fc0ab0 | Edu175/Competitive_Programming | oia/nacionales/2023/codigos-nacional-oia-2023/n2/U03N2/bombones/14957.cpp | #include <string>
#include <vector>
#include <algorithm>
using namespace std;
bool estanOrdenados(vector<int> v){
for(int i = 0; i < v.size() - 1; i++){
if(v[i] < v[i+1]){
return false;
}
}
return true;
}
void sortInverso(vector<int> &v, vector<int> &r){
int temp, temp2;
... | ALGO | 0.999887 | 4.447396 | {
"github_metadata": {
"branch": "master",
"commit_count": 66,
"repo_created_at": "2022-09-14T03:09: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": "1f59b2e83... |
e141f7e1-a59b-4177-ab86-8bb7aa536607 | Rikon07/Codeforces-Rik_on | A_Two_Substrings.cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
string SubString(string s)
{
int n = s.size();
vector<pair<int, int>> ab, ba;
for(int i=0; i<n-1; i++)
{
if(s[i] == 'A' && s[i+1] == 'B')
{
ab.push_back({i, i+1});
i++;
}
}
for(... | ALGO | 0.999968 | 3.659736 | {
"github_metadata": {
"branch": "main",
"commit_count": 34,
"repo_created_at": "2025-01-12T10:03: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": "913baf7e731... |
f5316180-1001-4da8-8cee-d29c09ae9120 | SidMnnit/movie-ticket-res | movie_ticket_res.cpp | #include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<string.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<string> vs;
#define FOR(i,a,b) for(ll i = a;i<b;++i)
#define pb push_back
vector< pair<string, vector<vll > > > v;
bool is_aisle(ll num, vll vec... | ALGO | 0.990927 | 3.430041 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-09-12T04:55:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 13,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "79c16cd46... |
ce23366a-8ddf-4abc-99ae-b3c9fb41e31f | ishandutta2007/codeforces-v | vercingetorix/normal/776/E.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <ctype.h>
#include <deque>
#include <cstring>
#include <set>
#include <bitset>
#include <map>
#include <chrono>
#include <random>
#include <unordered_map>
#include <stdio.h>
using namespace std;
typedef long long ll;
typedef long do... | ALGO | 0.999938 | 4.601638 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:31: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": "467ad1334db3... |
c9b32960-a22a-4fe3-b749-f9e3e11f2434 | furkanicer/Programming-Principles-and-Practice-Using-Cpp- | Part I The Basics/4. Computation/Drills/Drill 9-10-11.cpp | #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
double input{ 0 };
string unit_type = "unknown";
char terminator = ' ';
double convertedVal{ 0 };
double sum{ 0 };
int num_of_values = { 0 };
double smallestSoFar = std::numeric_limits<double>::max();
double largestSoFar ... | TOOL | 0.967097 | 4.558078 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2019-03-06T11:36:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bf7e24aed3... |
77a99ba7-357f-4d7f-bbfd-8329f4bca75b | lr580/algorithm_template | code/poj1655_tree_barycenter.cpp | #include <cstdio>
#include <algorithm>
#include <cstring>
using namespace std;
typedef long long ll;
#define mn 20010
struct edge
{
ll to, nx;
} e[mn << 1];
ll t, n, hd[mn], cnt, cf, cfv, siz[mn], w[mn];
void adde(ll u, ll v)
{
e[++cnt] = {v, hd[u]};
hd[u] = cnt;
}
#define sc(x) scanf("%lld", &x)
void dfs(l... | ALGO | 0.999716 | 3.834468 | {
"github_metadata": {
"branch": "master",
"commit_count": 28,
"repo_created_at": "2022-03-24T05:19:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 33,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f9142b78... |
77884379-23bb-48b7-835e-69b191a42b5d | DILET1/usacoarchive | Alphastar/CC41A/Djkistra Lesson/appledelivery.cpp | #include <bits/stdc++.h>
using namespace std;
vector<pair<int,int>> adj[100001];
int dists[100001];
int dist1[100001];
const int INF = 2147483647;
int main(){
int c, p, pb, pa, pc;
cin >> c >> p >> pb >> pa >> pc;
int a, b, d;
for(int i = 0; i < c ; i++){
cin >> a >> b >> d;
adj[a].push_back({b,d});
adj[b].pu... | ALGO | 0.999937 | 3.751173 | {
"github_metadata": {
"branch": "main",
"commit_count": 250,
"repo_created_at": "2022-01-28T18:13:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7b8601f0dc... |
660f576b-4e49-44bc-8f01-ec75bf8a599f | Henry-lsy/3D-Environment-Reconstruction | include/trianglation.hpp | #pragma once
#include <opencv2/opencv.hpp>
#include <vector>
using namespace cv;
using namespace std;
Point2f pixel2cam(const Point2d &p, const Mat &K) {
return Point2f
(
(p.x - K.at<double>(0, 2)) / K.at<double>(0, 0),
(p.y - K.at<double>(1, 2)) / K.at<double>(1, 1)
);
}
void triangulation(
... | ALGO | 0.997016 | 4.439883 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2024-11-25T15:12: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": "b39fdc58f9... |
4f707325-c44d-40eb-b988-71eb50ccf5c4 | Luiz6ustav0/ED-DCC205 | TP2/Projeto/include/HeapSort.hpp | #include "siPair.hpp"
void recreateHeapCondition(int L, int R, siPair *vec) {
int i, j;
siPair item;
i = L;
j = i * 2;
item = vec[i];
while (j <= R) {
if (j < R)
if (vec[j].second > vec[j + 1].second)
j++;
if (item.second < vec[j].second)
... | ALGO | 0.999661 | 4.395814 | {
"github_metadata": {
"branch": "main",
"commit_count": 117,
"repo_created_at": "2020-12-08T07:39: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": "b448291027... |
fafe4921-f499-498b-85c2-8fccef9f5932 | joaopedroxavier/Competitive-Programming | acm-icpc/damascus-2018/k.cpp | //
// 내가 나인 게 싫은 날
// 영영 사라지고 싶은 날
// 문을 하나 만들자 너의 맘 속에다
// 그 문을 열고 들어가면
// 이 곳이 기다릴 거야
// 믿어도 괜찮아 널 위로해줄 magic shop
//
#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define pb push_back
#define st first
#define nd second
typedef long long ll;
typedef long double ld;
typedef pair<int,int> ii;
c... | ALGO | 0.999973 | 4.329668 | {
"github_metadata": {
"branch": "master",
"commit_count": 206,
"repo_created_at": "2017-02-18T15:38: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": "238a7f80... |
341cf5e6-9a2a-4d42-bce1-6bb9defe1487 | WCE-Programmers-Batch-24/Data-Structure-and-Algorithms | Data Structures/Segment Tree/template.hpp | typedef struct seg_node {
// Properties of node
} seg_node;
vector<seg_node> seg_tree(4 * MAXN);
seg_node create_leaf(long long in)
{
seg_node leaf;
// Assign Leaf properties
return leaf;
}
void merge(long long node, long long left, long long right)
{
// Merge the nodes
return ;
}
void ... | ALGO | 0.999861 | 4.872551 | {
"github_metadata": {
"branch": "main",
"commit_count": 81,
"repo_created_at": "2021-10-11T14:38:29.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4,
"forks": 6,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "789c146cd269... |
e0fbdaf0-d5f8-4a87-9b4b-79cc6ca0f6a3 | Jiefei-Wang/exceedance | src/fast_GW.cpp | #include <Rcpp.h>
using namespace Rcpp;
// [[Rcpp::export]]
SEXP C_get_range_by_bound(SEXP R_sx, SEXP R_l, SEXP R_h) {
double* sx = REAL(R_sx);
double* l = REAL(R_l);
double* h = REAL(R_h);
R_xlen_t m = XLENGTH(R_sx);
R_xlen_t n = XLENGTH(R_l);
NumericVector L(n);
NumericVector H(n);
int index_x_l = 0;
int in... | ALGO | 0.999155 | 5.57708 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2020-02-24T06:53:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "22c57dbeb... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.