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 |
|---|---|---|---|---|---|---|---|
2b76e33d-2f16-4b4c-813a-b2fc5df29254 | OwlFeedMe/izicodearduino | izicode/src/izicode/prueba_izi.ino | #include <MaxMatrix.h>
#include <avr/pgmspace.h>
#include <LedControl.h>
int altavoz = 12; //pin salida del altavoz, el otro pin del altavoz es GND
//octava alta
int Si2 = 1975;
int LaS2 = 1864;
int La2 = 1760;
int SolS2 = 1661;
int Sol2 = 1567;
int FaS2 = 1479;
int Fa2 = 1396;
int Mi2 = 1318;
int ReS2 = 1244;
i... | TOOL | 0.912729 | 3.877795 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-05-05T15: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": "0c2d6538ec... |
9b986a89-d08a-4505-ba1b-70836b140944 | victorhenrique97/Advanced-algorithms-exercises | dp/ex02/9791027.cpp | #include <iostream>
#include <vector>
using namespace std;
vector<vector<int>> loja;
vector<vector<int>> pd;
int M, C, K;
int MAX(int A, int B){
if(A > B) return A;
else return B;
}
int compra(int gasto, int curr){
int valor = -1;
if(gasto < 0) return valor;
if(curr == C) return M-gasto;
if(pd[gasto][curr]... | ALGO | 0.999837 | 3.613194 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-04-19T01:06: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": "4294ae9cd8... |
7f2a98f9-a64d-4588-8985-4f53b32a9ba3 | LevinJ/Pedestrian-Detection-Project | src/video_input/preprocessing/FastReverseMapper.cpp | #include "FastReverseMapper.hpp"
#include <boost/gil/extension/opencv/ipl_image_wrapper.hpp>
#include <opencv2/calib3d/calib3d.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <cstdio>
namespace doppia {
FastReverseMapper::FastReverseMapper(const dimensions_t &dimensions... | TOOL | 0.917576 | 6.29755 | {
"github_metadata": {
"branch": "master",
"commit_count": 47,
"repo_created_at": "2015-01-10T23:27:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 23,
"forks": 21,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "418117a... |
68ee6c5e-c143-494b-b51f-7e2e6a4156e1 | 0point1Zishan/CP | Random_Practice/A_A.cpp | #include<bits/stdc++.h>
using namespace std;
#define fastio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define MOD 1000000007
#define MOD1 998244353
#define INF 1e18
#define nline "\n"
#define pb push_back
#define ppb pop_back
#define mp make_pair
#define ff first
#define ss second
#define int lon... | ALGO | 0.999913 | 5.372675 | {
"github_metadata": {
"branch": "main",
"commit_count": 485,
"repo_created_at": "2024-02-26T07:12:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "148a7ba2ae... |
dfdefd03-b557-49d1-a580-d31bef1413e7 | jorgemf/c-evolutionary-library | src/MultiObjectiveEvolutiveAlgorithm.cpp | #include "MultiObjectiveEvolutiveAlgorithm.h"
#include <cstdlib>
#include <iostream>
#include "PropertiesMap.h"
MultiObjectiveEvolutiveAlgorithm::MultiObjectiveEvolutiveAlgorithm()
{
}
MultiObjectiveEvolutiveAlgorithm::~MultiObjectiveEvolutiveAlgorithm()
{
}
void MultiObjectiveEvolutiveAlgorithm::initializeParams(){... | ALGO | 0.999877 | 5.379561 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2015-02-28T17:37:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 11,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "275ec4e7e... |
d6046190-4ff9-4012-b19b-4e5520015490 | Thunder1989/CS106B | Assignment3-xcode/1-BalancingParens/BalancingParens.cpp | /*
* File: BalancingParens.cpp
* -------------------------
* Name: <NAME>
* Section: Lingtong
* -----
* The Main program prompts the user for an expression using parentheses, braces, and brackets and determines whether the expression is balanced.
*/
#include <iostream>
#include <string>
#include "console.h"
#in... | ALGO | 0.978847 | 6.667313 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2015-05-01T19:36: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": "a8329fd24f... |
e0b17066-f267-472a-a7dc-d3219987fe6f | Amoghprakash2k4/LEETCODE | 0144-binary-tree-preorder-traversal/0144-binary-tree-preorder-traversal.cpp | /**
* 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(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.99999 | 6.054928 | {
"github_metadata": {
"branch": "main",
"commit_count": 812,
"repo_created_at": "2025-04-01T17:23: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": "844805a48a... |
823617af-8790-4a82-854d-0e1f94c65c57 | tynnp/CP-Practice | UPCODER/JUNGLE.cpp | #include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e6 + 5;
#define int long long
int n, m;
bool prime[MAXN];
int32_t main() {
cin >> n >> m;
fill(prime, prime + MAXN, true);
prime[0] = prime[1] = false;
for (int i = 2; i*i < MAXN; i++) {
if (prime[i]) {
for (... | ALGO | 0.999995 | 4.008133 | {
"github_metadata": {
"branch": "main",
"commit_count": 5981,
"repo_created_at": "2024-02-01T10:12:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8de82767e... |
332c186a-51f1-4f67-9456-a51f9f95013a | rod40430/data2.c | 문제코드/chapter_13/test_13_01.cpp | #include <iostream>
using namespace std;
class Point
{
private:
int xpos, ypos;
public:
Point(int x = 0, int y = 0) : xpos(x), ypos(y) {}
void ShowPosition() const
{
cout<<'['<<xpos<<", "<<ypos<<']'<<endl;
}
};
template <typename T>
void SwapData(T& num1, T& num2)
{
T temp = num1;
num1 = num2;
num... | TOOL | 0.937321 | 5.533823 | {
"github_metadata": {
"branch": "main",
"commit_count": 256,
"repo_created_at": "2023-06-30T13:02:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dea9880ce3... |
a9c0b262-07ab-4488-b194-23f7b627b590 | jhpark555/dsa_cpp | articulate_skenna.cpp | #include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stack>
#include <iostream>
#include <iterator>
using namespace std;
#define MAXV 100
#define UNCOLORED (-1)
#define WHITE (1)
#define BLACK (0)
#define TREE (1)
#define BACK (-1)
#define FORWARD (2)
#define CROSS (3)
bool processed[MAXV+1];
boo... | ALGO | 0.99996 | 4.590469 | {
"github_metadata": {
"branch": "main",
"commit_count": 57,
"repo_created_at": "2024-08-20T16:55:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "662e7d0cf46... |
58b5808b-9d30-4252-acbb-a31a8296e621 | RosettaCommons/rosetta | source/src/protocols/aa_composition/AddHelixSequenceConstraintsMover.cc | // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
// vi: set ts=2 noet:
//
// (c) Copyright Rosetta Commons Member Institutions.
// (c) This file is part of the Rosetta software suite and is made available under license.
// (c) The Rosetta software is developed by the co... | ALGO | 0.980559 | 6.045418 | {
"github_metadata": {
"branch": "main",
"commit_count": 11737,
"repo_created_at": "2023-11-17T16:42:18.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 296,
"forks": 100,
"issues": 27,
"pull_requests": 9
},
"file_meta": {
"content_id": "1ee0... |
ce9768b8-f1ea-4f8d-aea0-94333cafe11e | Edith-3000/Algorithmic-Implementations | Pattern - Sliding Window/Variable Size Sliding Window/Length of Longest Substring With K Unique Characters.cpp | // Problem: https://www.geeksforgeeks.org/find-the-longest-substring-with-k-unique-characters-in-a-given-string/
// Ref: https://www.youtube.com/watch?v=Lav6St0W_pQ
/*****************************************************************************************************************/
#include<bits/stdc++.h>
using namespac... | ALGO | 0.999977 | 4.86642 | {
"github_metadata": {
"branch": "master",
"commit_count": 490,
"repo_created_at": "2020-07-24T04:49:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3fb0870e... |
3498697e-e7b3-4b4c-896f-27fd576fbf54 | imyzx2017/mindspore_pcl | mindspore/ccsrc/backend/optimizer/ascend/ir_fusion/lamb_next_mv_with_decay_rule.cc | /**
* Copyright 2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... | ALGO | 0.941441 | 6.022982 | {
"github_metadata": {
"branch": "pcl_gpt",
"commit_count": 5,
"repo_created_at": "2020-11-18T10:57:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "fb6c05374... |
6351eb0f-a1e5-4ed4-b223-570814d0f9d8 | L-and/PSAutoPush | 백준/Gold/19598. 최소 회의실 개수/최소 회의실 개수.cc | #include <iostream>
#include <vector>
#include <utility>
#include <algorithm>
#include <queue>
using namespace std;
bool compare(const pair<int, int>& p1, const pair<int, int>& p2)
{
return p1.first < p2.first;
}
void solution1(std::vector<std::pair<int, int>> &timeList, int n, int &result)
{
// 회의 시작시간으로 오름... | ALGO | 0.999938 | 4.950707 | {
"github_metadata": {
"branch": "main",
"commit_count": 228,
"repo_created_at": "2025-05-01T02:11: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": "0868ce7350... |
549e46d7-000e-4cca-9fda-d2081209f9ee | Nikhil1602/DSA | mathematics/02.cpp | #include <bits/stdc++.h>
using namespace std;
bool isPalindrome(int n)
{
int s, rev = 0, ld;
s = n;
cout << "\trunning while loop:" << endl;
while (s)
{
cout << "\t\tcondition - ( " << s << " != 0 )" << endl;
cout << "\t\t\tlast digit = " << s << " % 10"
<< " = " << s ... | ALGO | 0.999801 | 4.734103 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-04-08T03:28: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": "a267609fa9ff... |
adcf23bc-4b6a-4d3f-84a2-d01f8070c7a3 | Xilinx/Vitis_Libraries | dsp/L1/src/hw/back_transpose_simple/back_transpose_simple_class.h | /*
* Copyright (C) 2019-2022, Xilinx, Inc.
* Copyright (C) 2022-2025, Advanced Micro Devices, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licens... | ALGO | 0.978583 | 6.917026 | {
"github_metadata": {
"branch": "main",
"commit_count": 471,
"repo_created_at": "2019-09-23T19:13:46.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 988,
"forks": 381,
"issues": 0,
"pull_requests": 12
},
"file_meta": {
"content_id": "8f7e1c... |
bb858b30-4214-461c-bfeb-bc2ceb064fa5 | Avgustineiw/uni | cpp/cpp contest/Contest #2/Minesweeper/main.cpp | #include <iostream>
#include <cstdlib>
#include <algorithm>
#include <string>
void readBombs(char **field, int bombs)
{
int bomb_row, bomb_col;
for (int i = 0; i < bombs; i++) {
std::cin >> bomb_row >> bomb_col;
field[bomb_row-1][bomb_col-1] = '*';
}
}
int BombNearby(int pos_row, int pos_col, int row,... | ALGO | 0.999547 | 4.037652 | {
"github_metadata": {
"branch": "main",
"commit_count": 93,
"repo_created_at": "2024-01-20T07:43: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": "cfd2026b047... |
97bd88ab-5d36-4ba2-9814-782c130af3ff | ishandutta2007/codeforces-j | jeroenodb/normal/1672/F2.cpp | #include "bits/stdc++.h"
using namespace std;
#define all(x) begin(x),end(x)
template<typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p) { return os << '(' << p.first << ", " << p.second << ')'; }
template<typename T_container, typename T = typename enable_if<!is_same<T_container, string>::va... | ALGO | 0.999054 | 4.243657 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T05:42:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e42df6f78258... |
42dd7f29-1027-4a24-a236-9f75412758c4 | dilip43/DSA--CODE | Graph/03-MST_Krushkal_Algo.cpp | #include<bits/stdc++.h>
using namespace std;
class Edge {
public:
int source, dest, weight;
};
bool compare(Edge e1, Edge e2) {
return e1.weight < e2.weight;
}
int parent(int v, int *parent) {
if (parent[v] == v)
return v;
return parent(parent[v], parent);
}
void kruskals(Edge* input, int n, int e) {
//sort... | ALGO | 0.999998 | 4.495965 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-01-09T09:44:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bca398e33887... |
d33b3dd9-ce39-43f7-8c9d-19ae7259d99e | Priyansh19077/Dynamic-Programming-CSES | Solution Codes/1_dice_combinations.cpp | /* <NAME>*/
#include<bits/stdc++.h>
#define MOD 1000000007
using namespace std;
void solve1(){
int n;
cin >> n;
vector<int> dp(n + 1);
// state
// dp[i] = number of ways to make a sum of i
// base case
dp[0] = 1;
for(int i = 1; i <= n; i++){
for(int j = 1; j <= 6; j++)... | ALGO | 0.99998 | 3.999661 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2023-11-10T09:10:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 45,
"forks": 12,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c77ad5cf5... |
0df86a9d-4853-408d-91af-9a452ed5ad44 | mostafa-saad/MyCompetitiveProgramming | Olympiad/POI/official/2010/code/ant/prog/ant.cpp | /*************************************************************************
* *
* XVII Olimpiada Informatyczna *
* *
* Zadanie: ... | ALGO | 0.999974 | 3.973118 | {
"github_metadata": {
"branch": "master",
"commit_count": 439,
"repo_created_at": "2017-02-05T22:26:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 415,
"forks": 85,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e6025... |
9a534e4e-8d54-4bb5-bb9b-ceabf62bf6c2 | CQCL/tket | tket/src/Circuit/Simulation/BitOperations.cpp | // Copyright Quantinuum
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writin... | ALGO | 0.900006 | 7.116953 | {
"github_metadata": {
"branch": "main",
"commit_count": 1453,
"repo_created_at": "2021-09-13T12:46:23.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 282,
"forks": 51,
"issues": 73,
"pull_requests": 3
},
"file_meta": {
"content_id": "377061... |
5d1affb2-e67b-4882-9889-f6f98cdf6ef9 | Soumyaworks/Competitive-Programming | codeforces_1333B.cpp | //Author : <NAME>
#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#pragma GCC optimize("Ofast")
#define ll long long int
#define pb push_back
#define mp make_pair
#define ld long double
#define fi first
#define se second
#define mod 1000000007
#define fill(a,x) memse... | ALGO | 0.99996 | 3.984164 | {
"github_metadata": {
"branch": "master",
"commit_count": 207,
"repo_created_at": "2020-04-15T17:56:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2c8431d5... |
3cec4a14-7103-4278-a97d-cac0dd7bc210 | liluming9393/huawei | 自守数.cpp | #include<stdint.h>
#include<vector>
#include<algorithm>
#include<cstdlib>
#include<map>
#include<set>
#include<string>
#include<stack>
#include<queue>
#include<stdio.h>
#include<iostream>
#include<functional>
using namespace std;
void Display_1D_Matrix(vector<int> & data);
void Display_2D_Matrix(vector<vector<int>> & d... | ALGO | 0.999081 | 3.60022 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-08-31T07:21:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "59211db1d1... |
271f8991-37dc-41c0-8d41-3dea3ddbeb14 | XenonWZH/involution | Luogu/P3367.cpp | // P3367 【模板】并查集
// WzhDnwzWzh
#include <iostream>
int fa[10001];
void make_set(int size) {
for (int i = 0; i < size; i++) fa[i] = i;
return;
}
int find(int x) {
if (x != fa[x]) fa[x] = find(fa[x]);
return fa[x];
}
void union_set(int x, int y) {
x = find(x);
y = find(y);
fa[x] = y;
}
i... | ALGO | 0.999971 | 4.915426 | {
"github_metadata": {
"branch": "main",
"commit_count": 615,
"repo_created_at": "2021-07-31T13:30:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1048ff614f... |
7d2fe451-9e20-4c51-a9c8-ed830e8545e2 | Sahenulislam/lightoj | 2022/1040 - Donation.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
const ll mxn=60;
vector<pair<ll,pair<ll,ll>>>g;
vector<ll>temp[mxn+10];
ll pa[mxn+10],vist[mxn+10];
void make_set()
{
for(ll i=0; i<=mxn+2; i++)
pa[i]=i;
}
ll Find(ll u)
{
if(u==pa[u])
return u;
else ... | ALGO | 0.999922 | 3.702076 | {
"github_metadata": {
"branch": "main",
"commit_count": 74,
"repo_created_at": "2020-10-26T06:24: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": "2b9bbdf1d3d... |
10055ac7-cbd0-415b-a7eb-2ca810b4c8f8 | csh1668/ProblemSolving | ps_cpp/solved_baekjoon/19497_Substract If Greater!.cpp | #include <bits/stdc++.h>
using namespace std;
struct Node {
Node *l, *r;
int prior, cnt;
int val, lazy;
Node(int v) : l(0), r(0), prior(rand()), cnt(1), val(v), lazy(0) {}
void push() {
if (lazy == 0) return;
val += lazy;
if (l) {
l->lazy += lazy;
}
... | ALGO | 0.999992 | 5.068954 | {
"github_metadata": {
"branch": "main",
"commit_count": 84,
"repo_created_at": "2024-04-28T12:39:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c768762b3ad... |
1f70eebf-e23f-4154-9c69-74088ed4a7e4 | rjenez/W266-final-project | data/programming-homework-dataset-plagiarism-detection/src/B2016/Z3/Z1/student9538.cpp | /B2016/2017: Zadaća 3, Zadatak 1
//Autotestovi by <NAME> (<EMAIL>)
#include <iostream>
#include <functional>
#include <vector>
#include <cmath>
#include <stdexcept>
using namespace std;
double xsinx (double x) {return x * x + sin(x);}
double DablWe(vector<pair<double,double>> v,int d,int indeks)
{
double suma=0;... | ALGO | 0.985473 | 4.728877 | {
"github_metadata": {
"branch": "main",
"commit_count": 125,
"repo_created_at": "2022-02-09T00:45:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3ddde754a8... |
6d5580ee-baa5-44af-9f0f-d7ce43cd4aef | YoshikiTakashima/vert | benchmark/cpp_transcoder/COUNTS_PATHS_POINT_REACH_ORIGIN_1/COUNTS_PATHS_POINT_REACH_ORIGIN_1_towasm_mutated.cpp | #include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
int min(int x, int y) { return (x < y)? x: y; }
int max(int x, int y) { return (x > y)? x: y; }
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}... | ALGO | 0.999938 | 4.672968 | {
"github_metadata": {
"branch": "main",
"commit_count": 101,
"repo_created_at": "2023-11-26T18:06:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2258edfb12... |
289ccb85-d41c-4b9a-83c7-2cb62b1861f9 | udaykkumar/play_ground | dsalgo_play_cpp_dsalgo/src/inc/038_sublist_search.hpp | #pragma once
#include "019_LinkedList.hpp"
namespace ds
{
template < typename T = int >
bool sublist_search( ds::linked_list<T> &first , ds::linked_list<T> &second )
{
/// if both are empty thats a success
if ( first.count() == 0 && second.count() == 0 )
return true;
/// if one of them is empty .. then i... | ALGO | 0.947573 | 4.752764 | {
"github_metadata": {
"branch": "main",
"commit_count": 336,
"repo_created_at": "2021-02-13T15:06: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": "a608df011b... |
332c5852-92f1-4368-8f34-be48563aa885 | ekg/contend | contend.cpp | #include <iostream>
#include <string>
#include <map>
#include <set>
#include <algorithm>
#include <vector>
#include "split.h"
using namespace std;
string* getSymbolPtr(string& s, set<string>& symbols) {
string* ptr;
set<string>::iterator q = symbols.find(s);
if (q == symbols.end()) {
// pair<set<s... | TOOL | 0.989863 | 4.378073 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2013-10-01T20:39: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": "e6280868e3... |
c59a119d-93f9-4a1c-b4ba-f7104ec05856 | Akanksha2403/codes | kthlargestvalue.cpp | #include <bits/stdc++.h>
#define ll long long
using namespace std;
void inputarr(ll arr[], ll n, ll m = 0)
{
for (int i = m; i < n; i++)
{
cin >> arr[i];
}
}
ll onecount = 0;
void func1(ll arr[], ll n, ll num) //the flipper fuction
{
if (arr[num - 1] == 0)
{
arr[num - 1] = 1;
... | ALGO | 0.999989 | 3.881276 | {
"github_metadata": {
"branch": "master",
"commit_count": 47,
"repo_created_at": "2021-09-24T22:26: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": "8272026f5... |
7001ad42-5ddf-4350-873a-9138b891d515 | xiaoxiaolan612/ctdlgt | danhsachphim.cpp | #include<bits/stdc++.h>
using namespace std;
int k=1;
class Phim{
public:
string tenphim,ngaykhoichieu,theloai;
int sotap,maphim,matheloai;
friend istream &operator>>(istream &input,Phim &a){
a.maphim=k++;
string s; input>>s;
a.matheloai=s.back()-'0';
... | ALGO | 0.999713 | 4.024202 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2022-04-19T14:36: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": "f24ba15deae7... |
ab2e1b73-441a-4a99-9736-63e3e148b7a3 | Quinteros06/parcial-4 | notas2.cpp | #include <iostream>
using namespace std;
float arra1(float nota[][5], int num){
for (int i = 0; i < num; i++)
{
cout<<endl<<"Estudiante"<<i+1 <<endl;
for (int j=0; j<= 4; j++)
{
cout<<"Ingrese la nota "<<j+1 << ": ";
cin>>nota[i][j];
}
}return nota[num][5];
}
float arraynota(float nota[][5], int... | TOOL | 0.97457 | 3.933717 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-06-27T23:26: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": "6f060dc245... |
77d3dec5-222d-4aa6-9964-abcd504f302d | LeadCoding/FrazArmy | Recursion/Lecture 14/CodeStudio/Combination Sum III.cpp | void help(int i, int k, int sumTillNow, int n, vector<int> &subSet, vector<vector<int>> &ans)
{
// base condition
// if the sumTillNow becomes greater than n, then we don't need to proceed further
if (sumTillNow > n)
return;
// base condition
// if k becomes equal to zero(0) , then check if... | ALGO | 0.99999 | 6.053067 | {
"github_metadata": {
"branch": "main",
"commit_count": 69,
"repo_created_at": "2022-05-15T17:55:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 84,
"forks": 71,
"issues": 4,
"pull_requests": 7
},
"file_meta": {
"content_id": "2a86fe8b7... |
c8fd69e4-9d39-4e6a-a7f0-fb7b7a97a293 | tensorflow/tensorflow | third_party/xla/xla/hlo/experimental/auto_sharding/auto_sharding_cost_graph.cc | /* Copyright 2022 The OpenXLA Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, sof... | ALGO | 0.999008 | 7.352099 | {
"github_metadata": {
"branch": "master",
"commit_count": 182413,
"repo_created_at": "2015-11-07T01:19:20.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 190773,
"forks": 74758,
"issues": 873,
"pull_requests": 553
},
"file_meta": {
"content... |
b710eec6-a8ab-4e19-a82c-3db6f5a73983 | varawa/Striver_SDE_Sheet | BinarySearch/MinWeights.cpp | #include<iostream>
#include<math.h>
#include<algorithm>
#include<vector>
#include<limits.h>
using namespace std ;
class Solution {
public:
int shipWithinDays(vector<int>& nums, int days) {
int start = *max_element(nums.begin() , nums.end()) ;
int end = sum(nums) ;
int mid = (start + end)/2... | ALGO | 0.999979 | 5.217971 | {
"github_metadata": {
"branch": "main",
"commit_count": 296,
"repo_created_at": "2024-02-24T16:30: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": "11ea579879... |
07e9a306-8aa6-4af8-9c9a-7b9185018f52 | Drewzyyyy/Student_Sys | List.cpp | #pragma warning(disable:4996) // For disabling errors caused by localtime
// Created by <NAME> <NAME> -- February 16, 2021 -- University of the Philippines Mindano -- BS Computer Science
#include "List.h"
#include "Student.h"
#include "Util.h"
#include <chrono>
#include <regex>
#include <map>
using namespace std;
// ... | TOOL | 0.968883 | 4.337346 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2021-02-26T12:23: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": "f9f3699bfa... |
1f1b7b86-6163-46fa-a4ac-54f43794de59 | Altynai/LeetCode | maximum-element-sum-of-a-complete-subset-of-indices/answer.cpp | struct PrimeFactorization {
// primes.size() <= sqrt(n)
vector<int> primes;
vector<bool> p;
PrimeFactorization(int n) {
p.resize(n);
p.assign(n, true);
p[0] = p[1] = 0;
for (int i = 4; i < n; i += 2)
p[i] = 0;
for (int i = 3; i * i < n; i += 2) {
if (!p[i])
continue;
... | ALGO | 0.999876 | 4.894122 | {
"github_metadata": {
"branch": "master",
"commit_count": 2981,
"repo_created_at": "2014-02-07T14:14:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 21,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "08ef7c... |
ea1e2c56-2ad5-4659-8c7d-f07e66c33a54 | 530154436/cpp_learning | leetcode/ds3_stack/lc962.hpp | //
// Created by Edward on 2020/2/19.
//
#include "../lib.hpp"
/**
962. 最大宽度坡
给定一个整数数组 A,坡是元组 (i, j),其中 i < j 且 A[i] <= A[j]。这样的坡的宽度为 j - i。
找出 A 中的坡的最大宽度,如果不存在,返回 0 。
示例 1:
输入:[6,0,8,2,1,5]
输出:4
解释:
最大宽度的坡为 (i, j) = (1, 5): A[1] = 0 且 A[5] = 5.
示例 2:
输入:[9,8,1,0,1,9,4,0,4,1]
输出:7
... | ALGO | 0.999909 | 5.99939 | {
"github_metadata": {
"branch": "master",
"commit_count": 67,
"repo_created_at": "2018-03-26T08:16:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 82,
"forks": 26,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "477aa6c... |
f497d1dd-1ae7-4113-b94f-0b50f70ed2cb | hseos/hseos-course | 2015/03-compile-link-debug/bc.cpp | #include "ast.h"
#include <cassert>
#include <cstdlib>
#include <iostream>
#include <stdexcept>
#include <string>
int Eval(const AstNode* node) {
switch(node->type) {
case CONST:
return node->value;
case PLUS:
return Eval(node->left.get()) + Eval(node->right.get());
case MINUS:
... | ALGO | 0.973311 | 5.926039 | {
"github_metadata": {
"branch": "master",
"commit_count": 382,
"repo_created_at": "2015-07-19T17:29:11.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 78,
"forks": 28,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "6111b0a... |
b7e3c9ef-451e-4fe2-90f8-370d89092a8c | kaldi-asr/kaldi | src/fstbin/fstaddsubsequentialloop.cc | // fstbin/fstaddsubsequentialloop.cc
// Copyright 2009-2011 Microsoft Corporation
// See ../../COPYING for clarification regarding multiple authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the... | ALGO | 0.997253 | 6.04033 | {
"github_metadata": {
"branch": "master",
"commit_count": 9405,
"repo_created_at": "2015-04-20T17:23:16.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 14986,
"forks": 5368,
"issues": 189,
"pull_requests": 63
},
"file_meta": {
"content_id":... |
7c1f80bc-2abb-4246-9d2d-b45fba8b88e0 | weRginger/vFRM | CacheAlgorithms/ARC.h | #ifndef _ARC_
#define _ARC_
#include <vector>
#include <iostream>
#include "ARC_LRU.h"
#include "ARC_Node.h"
#include "Config.h"
using namespace std;
class ARC
{
public:
ARC(long cacheSize);
ARC_Node* search(long pageToSearch);
void print();
float hitRatio();
... | ALGO | 0.935089 | 3.677078 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2015-09-11T20:21: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": "44409064a1... |
1be09575-6a89-498b-a7da-9cbb0e60fc65 | VainKane/_Scripts | _GSPHVCUTE/RegularContest#1/E.cpp | #include <bits/stdc++.h>
using namespace std;
#define name "lcm"
int n;
long long GCD(long long a, long long b)
{
while (b)
{
int r = a % b;
a = b;
b = r;
}
return a;
}
long long LCM(long long a, long long b)
{
return a / GCD(a, b) * b;
}
int main()
{
ios_base::syn... | ALGO | 0.99984 | 4.07183 | {
"github_metadata": {
"branch": "main",
"commit_count": 171,
"repo_created_at": "2024-10-03T16:34: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": "eec3bed228... |
9a9f721c-00e3-4364-b846-dbb7f0c79d97 | Khemchand5487/450-Questions-BYLB | Matrix/Q8.cpp | /*
Title: Rotate a matrix by 90 degree in clockwise direction without using any extra space
Link: https://www.geeksforgeeks.org/rotate-a-matrix-by-90-degree-in-clockwise-direction-without-using-any-extra-space/
Complexity: TIme - O(N*M), Space - O(1)
*/
#include <bits/stdc++.h>
using namespace std;
void rotate90cloc... | ALGO | 0.99996 | 6.285484 | {
"github_metadata": {
"branch": "main",
"commit_count": 43,
"repo_created_at": "2022-06-05T08:52: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": "308cb8098a3... |
d7ef7c8c-e99d-48b9-a412-5e56b7721000 | jerome784/My-Codes | merge_sort(sample_problem).cpp | /*Sam needs to sort an array of integers using the divide-and-conquer method. He wants to implement the merge sort algorithm, displaying the array after each iteration to track the sorting process.
Assist him in writing a program that divides the array, merges it back, and prints the array.*/
// You are using GCC
#... | ALGO | 0.99998 | 5.849675 | {
"github_metadata": {
"branch": "main",
"commit_count": 64,
"repo_created_at": "2024-09-21T15:27: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": "aeeabc75add... |
baf7b20d-fa71-4c45-a97d-d38dc3f5e33a | Salabh2k2/Leetcode_Solution | 3399-find-the-integer-added-to-array-ii/find-the-integer-added-to-array-ii.cpp |
class Solution {
public:
int minimumAddedInteger(std::vector<int>& nums1, std::vector<int>& nums2) {
int n = nums1.size();
int min1_1 = INT_MAX, min1_2 = INT_MAX, min1_3 = INT_MAX;
for (int val : nums1) {
if (val < min1_1) {
min1_3 = min1_2;
min1... | ALGO | 0.999959 | 6.09864 | {
"github_metadata": {
"branch": "main",
"commit_count": 970,
"repo_created_at": "2023-10-16T14:52: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": "f8c3c41eb0... |
2bc5c21f-74aa-41a2-9c72-848d4f7f2942 | ChrisKimZHT/Algorithm-Problems | Contest/Codeforces/Regular/#834 (Div. 3)/C.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
void solve()
{
ll l, r, x;
cin >> l >> r >> x;
ll a, b;
cin >> a >> b;
if (a == b)
{
cout << 0 << endl;
return;
}
if (a > b)
swap(a, b); // a <= b
if (b - a >= x)
{
cout << 1 <<... | ALGO | 0.999935 | 4.403994 | {
"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": "be6c160c... |
e4b92512-6db9-4e2f-a200-19fbc1f1f739 | akram-anissi/FSTT_IDAI_CPP_TD | TD_2/EX_3.cpp | #include<iostream>
using namespace std;
/* EX 3_a
int main(){
int table[10],i;
int max=0,min,pmax,pmin;
for(i=0;i<10;i++){
cout <<"saisir case "<<i+1<<": ";
cin>>table[i];
}
for(i=0;i<10;i++){
if(max < table[i]){
max=table[i];
pmax=i;
}
... | ALGO | 0.997382 | 3.328758 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2023-10-23T22:55: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": "c2fc81a6146c... |
9a94a99b-acb2-48a3-a13f-c5093c6c611c | MMA-JAY/leetcodes | 257. 二叉树的所有路径.cpp | /*
问题来源:
https://leetcode.cn/problems/binary-tree-paths/description/
解答:
https://programmercarl.com/0257.%E4%BA%8C%E5%8F%89%E6%A0%91%E7%9A%84%E6%89%80%E6%9C%89%E8%B7%AF%E5%BE%84.html#%E6%80%9D%E8%B7%AF
https://leetcode.cn/problems/binary-tree-paths/solutions/400434/257-er-cha-shu-de-suo-you-lu-jing-tu-wen-jie-xi-by/
*... | ALGO | 0.999972 | 6.145407 | {
"github_metadata": {
"branch": "main",
"commit_count": 52,
"repo_created_at": "2023-10-11T07:41: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": "ecd93bc1003... |
c272899b-81b0-476c-be55-955d187e6da3 | nidhiupman568/Codeforces-Problem-Solved | Nikita and LCM.cpp | #include<bits/stdc++.h>
using namespace std;
int t, n, i, a[2000], mx, l, x, y, ans;
void calc(int d) {
for (x = y = 0, l = 1; x < n; x++)
if (a[x] == d) return;
else if (d % a[x] == 0) l = l / __gcd(l, a[x]) * a[x], y++;
if (l == d) ans = max(ans, y);
}
int main() {
#ifndef ONLINE_JUDGE
freopen("input.txt", "r"... | ALGO | 0.999758 | 4.322199 | {
"github_metadata": {
"branch": "main",
"commit_count": 584,
"repo_created_at": "2023-06-02T03:08:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 1,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "27f31177df... |
5b656433-3c6a-428a-acae-4af33413c6e9 | OpenGP/starlab | core/external/eigen-3.2.5/Eigen/src/SparseCore/SparseProduct.h | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2008-2014 <NAME> <<EMAIL>>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You can obtain one at http://mo... | ALGO | 0.973445 | 7.195803 | {
"github_metadata": {
"branch": "master",
"commit_count": 107,
"repo_created_at": "2014-01-27T04:16:47.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 83,
"forks": 30,
"issues": 1,
"pull_requests": 1
},
"file_meta": {
"content_id": "6fad6c9... |
5c7ea87f-9f9d-49f4-8d80-d3753471d9cd | harshi12/Piazza | working/cache/LRUset_cache.hpp | #include <bits/stdc++.h>
#define SETS 8
#define WAYS 2
using namespace std;
class LRUCache
{
// store keys of cache
list<pair<string, string>> dq;
// store references of key in cache
unordered_map<string, list<pair<string, string>>::iterator> ma;
public:
void refer(string, string);
void dis... | ALGO | 0.993389 | 4.366436 | {
"github_metadata": {
"branch": "master",
"commit_count": 99,
"repo_created_at": "2018-11-16T21:33:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9fd0674b6... |
6e8d2ae4-3dde-42a6-bb05-0c06e8d8bd97 | pinam45/USCP | code/solver/include/solver/algorithms/wcrossover/average.hpp | //
// Copyright (c) 2019 <NAME>
//
// Distributed under the MIT license
// See accompanying file LICENSE or copy at
// https://opensource.org/licenses/MIT
//
#ifndef USCP_AVERAGE_HPP
#define USCP_AVERAGE_HPP
#include "common/data/instance.hpp"
#include "common/data/solution.hpp"
#include "common/utils/random.hpp"
#in... | ALGO | 0.998446 | 6.309946 | {
"github_metadata": {
"branch": "master",
"commit_count": 276,
"repo_created_at": "2019-09-05T12:45:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "69a6b961... |
8c6aa8c9-cbb8-427b-b132-d38f166d1d5b | kukiman010/Brute-Force | Brute Force/Brootforce.h | #pragma once
#include <iostream>
#include <string>
#include <vector>
using namespace std;
class Brootforce
{
private:
string password;
string numbers; // есть цифры
string latters; // есть буквы
string answer = "---";
int length = 0;
int flag = 0;
char *p;
vector<char> dictionary = { 'a', 'b', 'c', 'd', 'e'... | ALGO | 0.900723 | 3.140313 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-11-06T03:21: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": "ec5f291387... |
6ad15839-9737-4191-ae0f-c0cefd76416b | UlisesIvan/EPCC-CCII-LAB-B | Lab12/lab12 e1 e2 e3.cpp | /*EJERCICIO 01
EJERCICIO 02
EJERCICIO 03*/
#include <iostream>
using namespace std;
class Nodo{
public:
Nodo(){valor=NULL,sgte=NULL;}
Nodo(int n){valor=n;sgte=NULL;}
int valor;
Nodo* sgte;
};
class Cola : public Nodo{
public:
Cola(){cola=NULL;cabeza=NULL;actual=NULL;};
void insertar(int); ... | ALGO | 0.990471 | 4.043403 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2022-04-29T01:25:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d57be6b87d6... |
90757710-4e54-4326-9878-7f64b78593b5 | drewj71/Jenks-Portfolio | TicTacToe/CPU.h | #pragma once
#include <iostream>
#include <string>
#include <vector>
#include <random>
#include <algorithm>
#include "Board.h"
class CPU
{
public:
bool hasCPUWon = false;
bool CPUMadeMove = true;
void CPUPlay(Board& b) {
srand(unsigned(time(0)));
int x = ((rand() % 9) + 1);
if (x == 1 && b.line1[0] != "X" ... | ALGO | 0.98854 | 4.265857 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2023-01-07T16:55:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "45ae10b9699... |
9b47ed41-45cd-42db-8763-b67eb48c939c | jorgefandinno/eclingo-benchmark-docker | run-benchmark/benchmark-tool/programs/selp-dir/lpopt-2.2-x86_64/htd-1.2/src/htd/TreeDecompositionOptimizationOperation.cpp | /*
* File: TreeDecompositionOptimizationOperation.cpp
*
* Author: <NAME> (<EMAIL>)
*
* Copyright 2015-2017, <NAME>
* E-Mail: <<EMAIL>>
*
* This file is part of htd.
*
* htd is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by ... | ALGO | 0.989238 | 6.797535 | {
"github_metadata": {
"branch": "main",
"commit_count": 75,
"repo_created_at": "2024-07-05T11:36:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "848af4fcaa5... |
65ed663c-27bb-45f5-9995-0ddc5e7b2d32 | b21quocbao/Competitive-Programming | REDSEQ.cpp | #include <bits/stdc++.h>
using namespace std;
bitset<160010> b[30];
int n;
int main()
{
vector<int> v;
v.
ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> n;
unordered_map<int, int> mu;
vector<int> e;
for (int i = 0; i < n; ++ i)
{
string s;
int k = 0, r = 0;
... | ALGO | 0.999894 | 3.566271 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2020-02-22T14:52:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e350b52166... |
2429723f-4c28-4e0e-af8a-4aef43b7a646 | jinlaove17/2024_SSAFY_AlgorithmStudy | Problem_Archive/WEEK_03/JinJu/1251_하나로.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
using namespace std;
using ll = long long;
const int MAX = 1001;
int T, N;
double E;
int posX[MAX];
int posY[MAX];
vector<pair<ll, pair<int, int>>> edges;
vector<int> parent;
void init() {
for (int i = 0; i < MAX; i++) {
posX[i] = 0;
pos... | ALGO | 0.999964 | 4.851487 | {
"github_metadata": {
"branch": "main",
"commit_count": 622,
"repo_created_at": "2024-07-22T02:01:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ef715b882d... |
4c5db731-c6d3-4ebd-b40d-962b2ab091f2 | icl-utk-edu/lapackpp | src/tptrs.cc | // Copyright (c) 2017-2023, University of Tennessee. All rights reserved.
// SPDX-License-Identifier: BSD-3-Clause
// This program is free software: you can redistribute it and/or modify it under
// the terms of the BSD 3-Clause license. See the accompanying LICENSE file.
#include "lapack.hh"
#include "lapack_internal... | ALGO | 0.957198 | 6.081005 | {
"github_metadata": {
"branch": "master",
"commit_count": 776,
"repo_created_at": "2022-06-08T20:25:24.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 65,
"forks": 15,
"issues": 5,
"pull_requests": 1
},
"file_meta": {
"content_id": "c2b25b5... |
0e31a072-ca62-4e6e-ad1f-29361c2bd1b3 | gbm-developers/gbm | src/tdist.cpp | // GBM by <NAME> Copyright (C) 2003
#include "tdist.h"
CTDist::CTDist(double adNu)
{
mdNu = adNu;
double *adParams = new double[1];
adParams[0] = adNu;
mpLocM = new CLocationM("tdist", 1, adParams);
delete[] adParams;
}
CTDist::~CTDist()
{
delete mpLocM;
}
GBMRESULT CTDist::ComputeWorkingResponse
(
... | ALGO | 0.999902 | 6.843741 | {
"github_metadata": {
"branch": "master",
"commit_count": 200,
"repo_created_at": "2017-03-27T13:53:27.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 54,
"forks": 28,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "250854c... |
e572f4ba-9b82-4e3e-87fc-b596ca2975a3 | xueer828/practice_code | cpp/leetcode.com/letter_combinations_of_a_phone_number.h | #ifndef _TEST_
#define _TEST_
// letter_combinations_of_a_phone_number
// Copyright (c) 2013/01/07
// Author: xdutaotao (<EMAIL>)
//
/*
Given a digit string, return all possible letter combinations that the number could represent.
A mapping of digit to letters (just like on the telephone buttons) is given below.
... | ALGO | 0.999698 | 4.881003 | {
"github_metadata": {
"branch": "master",
"commit_count": 107,
"repo_created_at": "2015-04-15T21:29: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": "ec2ffd04... |
eaf355c0-9b5e-45bb-9dc7-d88203d1b1c0 | AliHZaidi/CS736FinalProject | hisat2_server_src/spliced_aligner.h | /*
* Copyright 2015, <NAME> <<EMAIL>>
*
* This file is part of HISAT 2.
*
* HISAT 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later vers... | ALGO | 0.995949 | 7.124269 | {
"github_metadata": {
"branch": "master",
"commit_count": 54,
"repo_created_at": "2019-11-01T18:23: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": "48240aff9... |
f22e1106-1b45-4489-a900-3f03dfa93db9 | pytorch/executorch | kernels/portable/cpu/op_min.cpp | /*
* Copyright (c) Meta Platforms, Inc. and affiliates.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <c10/util/irange.h>
#include <cmath>
#include <tuple>
#include <executorch/kernels/portab... | ALGO | 0.991787 | 7.590538 | {
"github_metadata": {
"branch": "main",
"commit_count": 8008,
"repo_created_at": "2022-02-25T17:58:31.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3046,
"forks": 624,
"issues": 638,
"pull_requests": 609
},
"file_meta": {
"content_id": "d... |
56c9771d-f840-46e1-8afb-df3f04ba1101 | thedyingkai/ACM-Repository | C++_Practices/LuoGu/luogu_103/P1205.cpp | #include "iostream"
using namespace std;
int n;
char k;
bool fi[11][11],la[11][11],re[11][11];
bool f1(){
for(int i=1;i<=n;i++) for(int j=1;j<=n;j++) if(fi[i][j]!=la[j][n+1-i]) return 0;
return 1;
}
bool f2(){
for(int i=1;i<=n;i++) for(int j=1;j<=n;j++) if(fi[i][j]!=la[n+1-i][n+1-j]) return 0;
return 1;... | ALGO | 0.999903 | 3.042422 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2025-03-11T11:20:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e04ab615279... |
9a4d11a2-4b7c-4486-80ba-7ca96a65c668 | hys2rang/WHrkTLQKF | Graph/labeling_BFS.cpp | /*
문제
<그림 1>과 같이 정사각형 모양의 지도가 있다. 1은 집이 있는 곳을, 0은 집이 없는 곳을 나타낸다.
철수는 이 지도를 가지고 연결된 집들의 모임인 단지를 정의하고, 단지에 번호를 붙이려 한다.
여기서 연결되었다는 것은 어떤 집이 좌우, 혹은 아래위로 다른 집이 있는 경우를 말한다. 대각선상에 집이 있는 경우는 연결된 것이 아니다.
<그림 2>는 <그림 1>을 단지별로 번호를 붙인 것이다. 지도를 입력하여 단지수를 출력하고,
각 단지에 속하는 집의 수를 오름차순으로 정렬하여 출력하는 프로그램을 작성하시오.
입력
첫 번째 줄에는 지도의 크기 N(... | ALGO | 0.999978 | 4.276862 | {
"github_metadata": {
"branch": "master",
"commit_count": 228,
"repo_created_at": "2018-08-23T12:44:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e4982af6... |
4f3afb4f-d39d-45d0-86d8-f242f1f72fc6 | anoopjk/Monocular-Visual-Odometry | src/featurematch.h |
#include "opencv2/video/tracking.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/nonfree/nonfree.hpp"
//#include "opencv2/core/eigen.hpp"
#include <iostream>
#include <ctype.h>
#in... | ALGO | 0.993473 | 4.652081 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2017-08-07T22:54: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": "9761d6631a... |
fba6aa96-ed55-40c4-943c-9fc2c888f5e1 | parkjiyong1993/hackerrank_study | Algo_3months_prep/week1/Sparse_Arrays.cpp | /*
* Complete the 'matchingStrings' function below.
*
* The function is expected to return an INTEGER_ARRAY.
* The function accepts following parameters:
* 1. STRING_ARRAY strings
* 2. STRING_ARRAY queries
*/
/* Review : for(auto& str : string)
std::vector<int> numbers = {1, 2, 3, 4, 5};
for(auto&... | ALGO | 0.99959 | 6.15311 | {
"github_metadata": {
"branch": "main",
"commit_count": 48,
"repo_created_at": "2023-06-20T09:22: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": "60ca8b7eac7... |
e78a324d-fc08-4bc4-98a8-8df80635bed2 | tpratap/LeetCode | 650-2-keys-keyboard/650-2-keys-keyboard.cpp | class Solution {
int minCost(int n, int i, int prev, vector<vector<int>> &dp) {
if(i == n)
return 0;
if(dp[i][prev] != -1)
return dp[i][prev];
int ch1 = INT_MAX, ch2 = INT_MAX;
if(i*2 <= n) {
int ret = minCost(n, i*2, i, ... | ALGO | 0.999969 | 5.60885 | {
"github_metadata": {
"branch": "main",
"commit_count": 807,
"repo_created_at": "2022-02-19T18:24: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": "1d75137743... |
b14f172b-92ed-4b1c-9c08-715e36d7f7b3 | bneb/euler | problem5/problem.cc | #include <chrono>
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
namespace euler {
int smallest_multiple(int top) {
int acc = 1;
vector<int> nums(top);
for (int i = 0; i < top; i++) {
nums[i] = i + 1;
}
int num;
for (int ix=1; ix<top; ix++) {
num = nums[ix];
if ... | ALGO | 0.999436 | 5.257749 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2022-06-27T07:00: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": "9564083b75e... |
cfb5648a-8c9a-4d3c-966d-b937be86eac5 | Pixelmath-Academy/Pixelgrader-Codes | C005-graders/code_99/99_06.cpp | #include <iostream>
using namespace std;
const int MAX = 105;
char grid[MAX][MAX];
bool visited[MAX][MAX];
int R, C, sr, sc, cc = 0;
int dx[] = {0,1,0,-1};
int dy[] = {1,0,-1,0};
void dfs(int x, int y) {
if (x < 1 || x > R || y < 1 || y > C) return;
if (grid[x][y] == '#' || visited[x][y]) return;
visited... | ALGO | 0.999581 | 4.953247 | {
"github_metadata": {
"branch": "main",
"commit_count": 32,
"repo_created_at": "2025-02-20T15:49:38.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "562a79cd17c2... |
09b45f8a-caf6-4d5f-ba40-fc4a7f4ed82f | keckj/boids | src/struct/hypercubeTree.hpp |
#ifndef HYPERCUBETREE_H
#define HYPERCUBETREE_H
#include "headers.hpp"
#include "rootNode.hpp"
#include "hypercube.hpp"
class Boid;
namespace Tree {
#define _N_ utils::compute_power_of_two<unsigned int>(D)
template <unsigned int D, typename A, typename T, typename L, typename E>
class HyperCubeTree : ... | ALGO | 0.997201 | 4.907536 | {
"github_metadata": {
"branch": "master",
"commit_count": 119,
"repo_created_at": "2014-11-28T15:19: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": "2f561cf3... |
b1ff9712-b50a-4e6f-b84e-dc25c5663003 | jklsmnk/Homework | ex7p34.cpp | #include <iostream>
using namespace std;
const int N = 100;
void RandomArray(int a[], int n);
void ShiftRight(int a[], int n);
void ShiftLeft(int a[], int n);
void DisplayArray(int a[], int n);
void kShift(int a[], int n);
int main()
{
const int N = 100;
int a[N] = { 0 };
int n;
while (true)
{
cout << "Ente... | ALGO | 0.995561 | 3.844946 | {
"github_metadata": {
"branch": "master",
"commit_count": 27,
"repo_created_at": "2016-10-24T12:41: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": "9d43eee52... |
f12f306d-500f-414f-9164-763183abfe73 | johnathan79717/competitive-programming | CodeChef/DEC14/CHEFBR/main.cc | #include <string>
#include <vector>
#include <climits>
#include <cstring>
#include <map>
#include <queue>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <stack>
#include <deque>
#include <list>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <cassert>
#inc... | ALGO | 0.999976 | 4.143817 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2016-04-07T07:50:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5cfa02358... |
bd3a841e-e9f5-40f2-a788-8acfa9a9a186 | anish-rajan/Cp-algos | kick_start/aug/c.cpp | #include <iostream>
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
#define mp make_pair
#define v vector
#define inp_push(no, v) \
ll no; \
cin >> no; \
v.push_back(no);
#define pb push_back
#define fi first
#define se second
#define ALL... | ALGO | 0.999813 | 3.698417 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2020-05-19T07:45:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0fe955420... |
8a79e65f-f8be-48e9-936b-d4db20f2851d | Keyur2311/Leetcode23 | 0445-add-two-numbers-ii/0445-add-two-numbers-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 *addTwoNumber... | ALGO | 0.999978 | 6.325348 | {
"github_metadata": {
"branch": "main",
"commit_count": 1837,
"repo_created_at": "2023-01-27T18:01:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0955d33c8... |
01209160-37dc-4a17-b642-21ba2410b295 | Vancasola/DataStructure | DataStructure2/A1118.cpp | //
// A1118.cpp
// DataStructure
//
// Created by vancasola on 2020/2/25.
// Copyright © 2020 none. All rights reserved.
// 3:30 3:50
/*
#include <stdio.h>
#include <string>
#include <vector>
#include <queue>
#include <iostream>
#include <algorithm>
#include <unordered_map>
using namespace std;
const int maxn=1000... | ALGO | 0.999733 | 4.155561 | {
"github_metadata": {
"branch": "master",
"commit_count": 439,
"repo_created_at": "2019-06-02T13:55: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": "26507921... |
775d5802-6e57-4098-b508-1523ba681e4e | sarmentow/editoriais-obi | 2020/codigo/candidatas.cpp | #include <iostream>
using namespace std;
#define MAX_N 100000
// seg tree
// why 4*MAX_N?
int nodegcd[4*MAX_N + 1];
int arr[MAX_N + 1];
int gcd(int a, int b) {
if (b == 0) return a;
return gcd(b, a % b);
}
void build_segtree(int i, int l, int r) {
// last node
if (l == r) {
nodegcd[i] = arr[l];
return;
}... | ALGO | 0.999983 | 5.483822 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2021-09-27T18:25:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c072b5e2796... |
098d214b-ad17-4cef-81c6-45087a07afde | DivyamGarg-code/DSA_Problems | Searching and sorting algorithms/books_allocation_problem_v_imp.cpp | // Problem Name: Book Allocation Problem
// Problem Difficulty: 3
// Problem Constraints: 1 < t < 50 <br>
// 1< n < 100 <br>
// 1< m <= 50 <br>
// 1 <= A<sub>i</sub> <= 1000
// Problem Description:
// You are given number of pages in n different books and m students. The books are arranged in ascending order of number ... | ALGO | 0.999978 | 5.339725 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2022-09-12T18:50: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": "7154873ec324... |
ebb510cb-b219-43f4-ae3b-3e2d00812e53 | Slingerr/CS2308 | Program 3/cs2308_Ian_Eslinger_prog3.cpp | /*=====================================================================
Program:Display the address, size, and value of multiple data types with
the use of pointers.
Class: CS2308
Instructor: <NAME>
Date: 2/11/2017
Description: Display the address, size, and value of an int, bool, char, short,
long, float, double, the... | TOOL | 0.907963 | 4.264848 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-06-25T05:11: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": "e787415d40... |
599e4f7b-546f-4e76-acd4-f0e2ea529082 | Yanuar2224/Tugas-SDA-P10 | SELECTION SORT.cpp | #include <iostream>
using namespace std;
void selectionSort(int arr[], int n) {
for (int i = 0; i < n - 1; i++) {
int indeksTerkecil = i;
for (int j = i + 1; j < n; j++) {
if (arr[j] < arr[indeksTerkecil])
indeksTerkecil = j;
}
swap(a... | ALGO | 0.999981 | 5.803216 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-05-19T07:18: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": "3839195623ea... |
e95e825a-e747-496a-87c3-a48161e81e29 | muhammadhasan01/cp | Online Judge/Codeforces/Gym/ACM_ICPC_NEERC_Southern_Subregional_2017-2018/I.cpp | #include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int N = 3e5 + 5;
int n, k;
int a[N];
bool vis[N];
bool can(int x) {
for (int i = 0; i <= n; i++) vis[i] = 0;
vis[0] = 1;
for (int i = 1, pos = k; i <= n - k + 1; i++) {
if (!vis[i - 1]) continue;
while (pos < min(n, i + k - 1)) po... | ALGO | 0.999997 | 4.784832 | {
"github_metadata": {
"branch": "master",
"commit_count": 1187,
"repo_created_at": "2019-07-13T15:49:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "80f15e7... |
0433c2c4-38ec-4ec4-a3d6-66e86df1d7ec | vtsozik/interviews | 2020/flow_traders/intersection/intersection.cpp | /*
* Given 2 ordered vectors of numerical primitives find an intersection between them.
*/
#include <iostream>
#include <vector>
#include <list>
#include <set>
#include <iterator>
using namespace std;
template <class T, class U, class V> void intersection(T ti, T te, U ui, U ue, V vi)
{
for (;ti != te && ui != ... | ALGO | 0.999571 | 5.511472 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-08-21T19:49: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": "68d017160795... |
e93bfc07-b082-4bb9-80c8-8036ef8cc603 | juanbarrios/multimedia_tools | metricknn/metricknn_lib/src/metricknn/metricknn_cpp/mknn_distance_eval.hpp | /*
* Copyright (C) 2012-2015, <NAME> <http://juan.cl/>
* All rights reserved.
*
* This file is part of MetricKnn. http://metricknn.org/
* MetricKnn is made available under the terms of the BSD 2-Clause License.
*/
#ifndef MKNN_DISTANCE_EVAL_HPP_
#define MKNN_DISTANCE_EVAL_HPP_
#include "../metricknn_cpp.hpp"
n... | ALGO | 0.973906 | 7.185363 | {
"github_metadata": {
"branch": "master",
"commit_count": 35,
"repo_created_at": "2015-09-07T20:32:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7276b83ae... |
668eaa8b-8ff1-4da6-a3b0-5ae2e140683a | KongJHong/test | 数组/88. 合并两个有序数组.cpp | 给定两个有序整数数组 nums1 和 nums2,将 nums2 合并到 nums1 中,使得 num1 成为一个有序数组。
说明:
初始化 nums1 和 nums2 的元素数量分别为 m 和 n。
你可以假设 nums1 有足够的空间(空间大小大于或等于 m + n)来保存 nums2 中的元素。
示例:
输入:
nums1 = [1,2,3,0,0,0], m = 3
nums2 = [2,5,6], n = 3
输出: [1,2,2,3,5,6]
------------------------------
和链接两个有序链表一样
class Solution {
public:
void ... | ALGO | 0.999996 | 5.573897 | {
"github_metadata": {
"branch": "master",
"commit_count": 83,
"repo_created_at": "2018-10-20T05:09:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "16bbcf543... |
23454bb2-1586-4a17-abee-00912baa3755 | nitinkaplas123/SDE-SHEET | Graph/Topo_Sort/5)find_eventual_safe_nodes_802.cpp | Question-:
1)Terminal Nodes-:
A node where we have 0 outDegree.
2)Safe nodes.
A node is a safe node if every possible path starting from that node leads to a terminal node (or another safe node).
for eg.
0 1 2 3 4 5 6
graph = [[1,2],[2,3],[5],[0],[5],[],[]]
here 0->node is connected with 1 ... | ALGO | 0.999974 | 5.89221 | {
"github_metadata": {
"branch": "main",
"commit_count": 26,
"repo_created_at": "2024-09-26T19:54: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": "690cc6e6bb0... |
6aef2126-a35b-4a84-a19a-514c352d6f4a | arangodb/arangodb | lib/Basics/StringUtils.cpp | ////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2014-2024 ArangoDB GmbH, Cologne, Germany
/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany
///
/// Licensed under the Business Source License 1.1 (the "License");
/// you may not use this file except... | TOOL | 0.953797 | 6.992845 | {
"github_metadata": {
"branch": "devel",
"commit_count": 51986,
"repo_created_at": "2011-10-26T06:42:00.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 13878,
"forks": 857,
"issues": 743,
"pull_requests": 38
},
"file_meta": {
"content_id": ... |
181e5b37-6a65-4d26-8a56-f5ea473a6f9c | dragons6641/BOJ | dynamic_programming/BOJ11048.cpp | #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#define MAX_R 1000
#define MAX_C 1000
#define MAX_K 100
// rows
int N;
// cols
int M;
// 1부터 사용
int map[MAX_R + 1][MAX_C + 1] = { 0, };
// dp[r][c] : (r, c) 위치까지 이동했을 때 얻을 수 있는 최대 사탕 갯수
// 1부터 사용
int dp[MAX_R + 1][MAX_C + 1] = { 0, };
int Max(const int a, const int... | ALGO | 0.99964 | 3.187355 | {
"github_metadata": {
"branch": "main",
"commit_count": 567,
"repo_created_at": "2021-05-21T07:02: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": "06b8478ae3... |
9b280869-58fa-4b11-bb5d-6e8a7f5f0283 | CommonRoad/commonroad-drivability-checker | cpp/include/collision/raytrace_primitive.h | #ifndef CPP_COLLISION_RAYTRACE_PRIMITIVE_H_
#define CPP_COLLISION_RAYTRACE_PRIMITIVE_H_
#include <cmath>
#include <vector>
#include <Eigen/Dense>
namespace collision {
namespace raytrace {
using namespace std;
struct Point {
public:
Point();
Point(const Eigen::Vector2d &pnt);
double x;
double y;
Point(c... | ALGO | 0.997273 | 5.972888 | {
"github_metadata": {
"branch": "master",
"commit_count": 506,
"repo_created_at": "2024-02-19T07:31:24.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "cc14d42a2... |
578aee5d-4fae-465f-ae6a-b62161dbecde | sahilkhan03/CF-Solutions | codeforces/1099/E.cpp | #pragma GCC optimize("Ofast")
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef long double ld;
#define fast ios_base::sync_with_stdio(false); cin.tie(nullptr);
#define all(x) x.begin(), x.end()
#define F first
#define S second
#define pb push_back
#define pl pair<ll, ll>
#define vl vector<ll>... | ALGO | 0.999984 | 4.210218 | {
"github_metadata": {
"branch": "master",
"commit_count": 2194,
"repo_created_at": "2021-01-27T11:51: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": "b4b7e6c... |
3204b643-0eb1-48b2-beac-0b7754325e0a | lobanovivanphantom/cpp-transport-catalogue | transport-catalogue/router.h | #pragma once
#include "graph.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <iterator>
#include <optional>
#include <stdexcept>
#include <unordered_map>
#include <utility>
#include <vector>
namespace graph {
template <typename Weight> class Router {
using Graph = DirectedWeightedGraph<Weig... | ALGO | 0.999574 | 6.703712 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2023-04-10T17:45: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": "9a5da1e3ee0... |
01bb19cb-4e83-44c0-b732-d6261f564449 | sjatin938/Daily-CP-DSA-Problem | Subset Sums - GFG/subset-sums.cpp | //{ Driver Code Starts
#include<bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution
{
public:
void subsetSum(vector<int> &arr, int &N, int i, vector<int> &temp, int sum) {
if (i == N) {
temp.push_back(sum);
return ;
}
subsetSum(arr, N, i + 1, temp, sum + arr[i]);
... | ALGO | 0.99966 | 6.253287 | {
"github_metadata": {
"branch": "main",
"commit_count": 909,
"repo_created_at": "2022-05-12T13:48:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "45a12bb12b... |
59d67628-2445-48a2-817f-b2884c9fb998 | coding-ninja-dsa-competitive-package/codig-ninja-dsa-learning | 01-introduction-to-c++/modules/002-loops/code-part-2/002-Triangular-Star-Pattern.cpp | #include<iostream>
using namespace std;
/**
* Triangular star Pattern
* - Print the following pattern for the given N number of rows.
* - Pattern for N = 4
* *
* **
* ***
* ****
* Note : There are no spaces between the stars (*).
*
* Input format :
* Inte... | ALGO | 0.999817 | 5.505308 | {
"github_metadata": {
"branch": "main",
"commit_count": 510,
"repo_created_at": "2021-06-04T19:58:03.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 81,
"forks": 30,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dc74bacf3... |
819829d0-8fff-4593-930c-6bbb1758f35d | camilaalj/helloworld | Practicandoexamen/main.cpp | #include <iostream>
using namespace std;
void imprimir(int arr[], int tam){
for (int i=0;i<tam;i++)
cout<< arr[i]<< ' ';
}
void revertir(int arr[], int tam){
int t= tam/2;
tam=tam-1;
for (int i=0;i<t;i++){
swap(arr[i],arr[tam--]);
}
}
void palindromo (int arr[], int tam){
int ... | ALGO | 0.99926 | 4.007267 | {
"github_metadata": {
"branch": "master",
"commit_count": 41,
"repo_created_at": "2019-08-21T13:57: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": "bd8efec17... |
7cf39f36-0a12-480d-b10b-99de8a2619d2 | NalinSa/Data-Structure-CPP-codeblock-2021 | bsplit_package/main.cpp | #include <stdexcept>
#include <vector>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include "map_bst.h"
#include "student.h"
#include <algorithm>
//#pragma once
int main() {
///std::vector<int> v = {10, 20, 30, 40, 50, 60, 70, 80};
std::vector<int> vec;
//std::reverse(v.begin(),v.end());
// ... | ALGO | 0.999925 | 4.670175 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-12-08T17:42: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": "d80bd47b3abe... |
7c8f6d97-1ab8-471b-aeee-c5c53b7768f8 | ishandutta2007/codeforces-s | sankear/normal/356/B.cpp | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <bitset>
#include <queue>
#include <deque>
#include <stack>
#include <complex>
#include <cassert>
using namespace std;
#define pb ... | ALGO | 0.999989 | 3.484685 | {
"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": "926194b9342c... |
63a2aac3-3e63-4007-96a2-8a679f9afb56 | gamephysicsweekend/VulkanRenderer | completed/Book02/Physics/Constraints/ConstraintMotor.cpp | //
// ConstraintMotor.cpp
//
#include "ConstraintMotor.h"
/*
================================
ConstraintMotor::PreSolve
================================
*/
void ConstraintMotor::PreSolve( const float dt_sec ) {
// Get the world space position of the hinge from A's orientation
const Vec3 worldAnchorA = m_bodyA->Body... | ALGO | 0.999838 | 5.637092 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2020-10-25T20:16:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 260,
"forks": 53,
"issues": 4,
"pull_requests": 1
},
"file_meta": {
"content_id": "1ffb1c20... |
dd1e0f39-035f-419b-b02d-27dcb352a6d7 | MihkuU/Lible | src/lible/ints/twoel/shark_mm_kernels/shark_mm_kernels_bra_1_2.cpp | #include <lible/ints/twoel/shark_mm_kernels.hpp>
template<> void lible::ints::shark_mm_bra1<1, 2>(const double *E, const double *R_x_ET, double *E_x_R_x_ET)
{
E_x_R_x_ET[0] += E[0] * R_x_ET[0];
E_x_R_x_ET[0] += E[3] * R_x_ET[15];
E_x_R_x_ET[1] += E[0] * R_x_ET[1];
E_x_R_x_ET[1] += E[3] * R_x_ET[16];
... | ALGO | 0.994107 | 4.910258 | {
"github_metadata": {
"branch": "main",
"commit_count": 272,
"repo_created_at": "2023-06-25T17:02: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": "fe7b181332... |
392a9af0-9e6f-4e7b-9414-96e819aed59f | godsonsphilip/Leetcode | 1876-map-of-highest-peak/map-of-highest-peak.cpp | class Solution {
public:
vector<vector<int>> highestPeak(vector<vector<int>>& isWater) {
int m = isWater.size(), n = isWater[0].size();
// Initial Condition:
vector<vector<int>> result(m, vector<int>(n,-1));
queue<pair<int, int>> q;
for(int i = 0; i<m; i++){
... | ALGO | 0.999991 | 6.112331 | {
"github_metadata": {
"branch": "main",
"commit_count": 596,
"repo_created_at": "2025-01-12T06:49: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": "0cd5cd8aa0... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.