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 |
|---|---|---|---|---|---|---|---|
5d2cd06f-33d4-462d-8185-0c3b1b89f13b | priyakanthariya/gfg_potd | 26.04.2024.cpp | class Solution {
public:
vector<int> FindExitPoint(int n, int m, vector<vector<int>>& matrix) {
// Code here
vector<pair<int, int>> directions = {{0, 1}, {1, 0}, {0, -1}, {-1, 0}};
int i = 0, j = 0;
int dir = 0;
while (i >= 0 && i < n && j >= 0 && j < m) {
if (... | ALGO | 0.999923 | 4.729772 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2024-05-21T09:47: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": "696f124fdf1... |
89af245b-22cf-4cf6-be03-991597dfc4b3 | ishandutta2007/codeforces-n | natofp/normal/1612/F.cpp | #include <bits/stdc++.h>
#include <random>
#define ll long long int
#define pb push_back
#define st first
#define nd second
#define pii pair<int,int>
#define mp make_pair
#define pll pair<long long,long long>
#define ld long double
#define ull unsigned long long
using namespace std;
int n, m;
set<pii> s;
int q;
void... | ALGO | 0.999874 | 3.481802 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:35: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": "e7ee6a8f7069... |
c4f70c7d-77fc-4201-9717-be17a3668840 | Leiru-Cat-Developer/CPP-Educational | Programas Básicos/11 - Funciones - Ejercicio 21 - COMPROBAR MENOR ELEMENTO DE UNA FILA DE MATRIZ.cpp | /*
REALIZE UNA FUNCIÓN QUE DADA UNA MATRIZ Y UN NÚMERO DE FILA DE LA MATRIZ, DEVUELVA
EL MENOR DE LOS DATOS ALMACENADOS DE DICHA FILA
*/
#include<iostream> //LIBRERÍA ESTÁNDAR [LECTURA - SALIDA]
#include<string.h> //LIBRERÍA PARA CADENAS
#include<math.h> //LIBRERÍA DE MATEMÁTICAS
#include<stdlib.h> //LIBRER... | ALGO | 0.99257 | 4.203671 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2024-08-14T19:51: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": "856915384df... |
30b9f874-8b51-42ff-9c9d-64da071dc80f | pope88/ChessCli | Classes/System/IniFile.cpp | #include "Config.h"
#include "IniFile.h"
#include <algorithm>
#include <iostream>
#include <fstream>
namespace System
{
// In the event you want to trace the calls can define _TRACE_INIFILE
#if defined(_TRACE_INIFILE)
#define _INIFILE_DEBUG
#endif
// _CRLF is used in the Save() function
// The class will read the co... | TOOL | 0.970423 | 6.338005 | {
"github_metadata": {
"branch": "master",
"commit_count": 73,
"repo_created_at": "2014-05-15T10:40:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6e0219c52... |
087f779f-721a-40b2-9fb6-b553986558d5 | septag/termite | deps/bgfx/3rdparty/spirv-tools/source/opt/if_conversion.cpp | // Copyright (c) 2018 Google LLC
//
// 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 ... | TOOL | 0.93594 | 7.72435 | {
"github_metadata": {
"branch": "master",
"commit_count": 1049,
"repo_created_at": "2016-01-27T15:15:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 83,
"forks": 10,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "fd258... |
8f74409a-a0e9-4bc6-a574-8cec14a2a412 | httpantwon/C-OpenStreetMap | dist.cpp | #include "dist.h"
#include <cmath>
double distBetween2Points(Coordinates p1, Coordinates p2) {
// Reference: http://www8.nau.edu/cvm/latlon_formula.html
double PI = 3.14159265;
double earth_rad = 3963.1; // statue miles:
double lat1_rad = p1.lat * PI / 180.0;
double long1_rad = p1.lon * PI / 180.0;
doub... | ALGO | 0.998997 | 5.875653 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-07-14T19:33: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": "32cce7a14b00... |
b5bdc849-9446-4315-a5d3-8ebf16fb7b07 | jingkongmtsu/xTron.mKP16 | src/gints_engine/hgp_os/first_deriv/kinetic/hgp_os_kinetic_p_p_d1.cpp | //
//
// This code is generated from CPPINTS, a C++ program to generate the
// analytical integrals based on Gaussian form primitive functions.
// Copyright (C) 2015 The State University of New York at Buffalo
// This software uses the MIT license as below:
//
// Permission is hereby granted, free of charge, to a... | ALGO | 0.997723 | 3.086306 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2022-09-21T14:39:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 2,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "3762683f99... |
f9a4f020-5cd8-4839-8879-c392876d0196 | apprajapati9/CPlusPlus | C++/algorithms/merget_sort/merge-sort.cpp | #include <iostream>
using namespace std;
void sort(int *arr, int start, int end, int mid)
{
int left = start; //left half start
int right = mid + 1; //right half start
int s1 = mid - start + 1; //Size of left size arr
int s2 = end - right + 1; // size of right size arr
int mergedArr[s1+s2] = {0... | ALGO | 0.999993 | 5.285542 | {
"github_metadata": {
"branch": "master",
"commit_count": 81,
"repo_created_at": "2018-01-06T06:50: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": "38a978c79... |
748d918a-4f14-40b2-aab2-53693574570d | rafagorr06/POO-exercises | U1/Unidad 1 Jorge/eje4.cpp | /*
Escriba una función que utilice punteros para buscar e informar la dirección de un
entero dentro de un arreglo. Se pasan como parámetros el arreglo, su tamaño y el
entero a buscar. Si el dato no se encuentra, devolver la dirección de memoria nula
(nullptr o NULL). ¿Desde un programa cliente, cómo se obtiene el índic... | ALGO | 0.999386 | 3.688521 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-12-10T00:38:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "738d888bbce7... |
3b22b200-e6f5-47a9-addc-7aabe869feee | Harshit661000143/Work | heap.cpp | #include "global.h"
class Heap
{
public:
int heapSize;
int capacity;
int *elements;
public:
int extractMin();
void decreaseKey(int key, int newVal);
void insertKey(int val);
void deletekey(int key);
void minHeapify(int key);
void printArray();
int getMin(){ return elements[0];}
int parent(int i) {return... | ALGO | 0.999181 | 3.568505 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2015-02-07T22:03: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": "58d3c80e80... |
b46db8c9-25f6-48ca-b91c-3d13f979e9a2 | HaozheGuAsh/Undergraduate | Visual Studio/Projects/University Project/Project5/Project5/longest common substring.cpp | #include <string>
#include <algorithm>
#include <iostream>
using namespace std;
int main4()
{
string str1 = "cabccb";
string str2 = "babcba";
int m = str1.length();
int n = str2.length();
int c[6][6];
int s[6];
for (int i = 0; i < m; i++)
{
for (int j = 0; j < n; j++)
{
c[i][j] = 0;
}
}
for (int ... | ALGO | 0.999977 | 3.601512 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2017-05-07T10:08: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": "877d8fe03... |
76ff8faa-e84b-4a22-931a-425ea15b3fa7 | huanght1997/CPP-Primer-Plus | PE/ch06/6.2.cpp | /*
* Write a program that reads up to 10 donation value into an array of
* double. (Or, if you prefer, use an array template object.) The program
* should terminate input on non-numeric input. It should report the average
* of the numbers and also report how many numbers in the array are larger
* than the average.... | ALGO | 0.999478 | 3.781507 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2015-07-11T05:00:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 47,
"forks": 22,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5df736c... |
1d6853e3-1863-46dd-adda-3f3b3426e192 | morshedalam3/cp-january-w1 | day-1/c.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin >> t;
while (t--)
{
int n, m;
cin >> n >> m;
string str;
vector<vector<char>> v(n, vector<char>(m));
for (int i = 0; i < n; ++i)
{
for (int j = 0; j < m; ++j)
... | ALGO | 0.999973 | 5.127697 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2024-01-03T17:18: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": "1bb5b566589... |
c0b90fa4-5864-4f00-931e-838eeb49c610 | Aryanlanghanoja/NBS_Training | 10-21-2024 Recurssion/Binary_Search_tree.cpp | #include <bits/stdc++.h>
#include <bits/stdc++.h>
#define Max 15
using namespace std;
int myArray[Max];
void Initialize() {
for (int i = 0; i < Max; i++) {
myArray[i] = -1;
}
}
void Print() {
for (int i = 0; i < Max; i++) {
if (myArray[i] != -1) {
cout << "Root Node :- " << my... | ALGO | 0.999917 | 4.19119 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2024-09-11T16:09: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": "c3e5388f794... |
0d5591f8-a29c-4fdb-95e3-d51817ea7079 | bjarkimb/EQ2443-2445-Project-Group2 | include/volk/volk_32f_binary_slicer_32i.h | /* -*- c++ -*- */
/*
* Copyright 2014 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
* GNU Radio 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, or (at your option... | ALGO | 0.973139 | 6.369872 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2018-12-19T09:13:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0762b392fc... |
1cd9962e-2f37-4274-8112-2de875d055ff | GiuliaFranco/Neuron_Simulations | cpp_Point_Wise/Integrator.cpp | #include "Integrator.h"
#include <iostream>
#include <thread>
#include <future>
using namespace std;
Solver :: Solver(double I,double Periodicity){
I0=I;
Period=Periodicity;
model=new HH(I0,Period,T,4);
//new_model=new Stoch_HH(I0,Period,T,1);
t[0]=0;
double start = 0;
for(int i=0;i<=num;i++){
start+=dt;
... | ALGO | 0.997875 | 3.883376 | {
"github_metadata": {
"branch": "main",
"commit_count": 60,
"repo_created_at": "2021-03-28T13:48:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "435696beda2... |
8f41f674-63bd-4e17-8db6-a451affd3f0b | developerHet/CAndCppPrograms | Code-Forces/1767A.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define endl "\n"
#define deb(x) cout << #x << "=" << x << endl
#define deb2(x, y) cout << #x << " = " << x << " , " << #y << " = " << y << endl
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define all(x) x.begin(), x.end... | ALGO | 0.999957 | 5.124252 | {
"github_metadata": {
"branch": "master",
"commit_count": 70,
"repo_created_at": "2022-01-21T10:31: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": "3dc6b3e1f... |
ac91701c-86ee-42a3-bf1a-1cdb19e6c303 | Wizmann/ACM-ICPC | Luogu/P/P1330.cc | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <functional>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <deque>
#include <string>
#include <cassert>
using namespace std;
typedef long long llint;
const int INF = ... | ALGO | 0.999279 | 3.736809 | {
"github_metadata": {
"branch": "master",
"commit_count": 3480,
"repo_created_at": "2011-12-19T02:04:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 63,
"forks": 29,
"issues": 97,
"pull_requests": 0
},
"file_meta": {
"content_id": "3ac0... |
a960b9d6-d6cc-4c70-822d-ec612510c04d | aximov/atcoder | ABC/abc136/d.cpp | #include <bits/stdc++.h>
#define int long long
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define pb push_back
#define ALL(obj) (obj).begin(), (obj).end()
#define debug(x) cerr << #x << ": " << x << '\n'
using namespace std;
typedef long long ll;
const int MOD =... | ALGO | 0.999841 | 3.782887 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2019-01-29T09:08: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": "8b4d701df... |
beff5119-d091-4ce6-b24b-fef4b8dad961 | ArnabBir/leetcode-solutions | encode_string_with_shortest_length.cpp | // Link : https://leetcode.com/problems/encode-string-with-shortest-length/
class Solution {
string encode_once(vector<vector<string>>& dp, string s, int x) {
string ans = s;
int n = s.size();
for (int l = 1; l < n; ++l) {
int i = 0;
string pattern = s.substr(0,l);
... | ALGO | 0.999892 | 5.215044 | {
"github_metadata": {
"branch": "master",
"commit_count": 266,
"repo_created_at": "2018-03-11T19:06:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f49dc343... |
2fc38f21-7252-477f-9787-b3d637ef77b6 | Xilinx/Vitis_Libraries | security/L1/benchmarks/rc4Encrypt/kernel/rc4EncryptKernel1.cpp | /*
* Copyright 2019 Xilinx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... | ALGO | 0.995354 | 5.262636 | {
"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": "955470... |
7c61b51d-2a46-4a19-bd68-9b10d6bd845c | Boris-Bodin/coding-games | src/puzzle/power-of-thor-episode-1/main.cpp | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
/**
* Auto-generated code below aims at helping you parse
* the standard input according to the problem statement.
**/
int main()
{
int LX; // the X position of the light of power
int LY; // the Y position of ... | ALGO | 0.999829 | 4.634691 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2024-02-28T19:55:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ff64eb1572f... |
a374b05c-bb5d-4922-9108-11ff5ff4b3ed | nikhil4u8/Leetcode-solutions | Leetcode Solutions/1284. Minimum Number of Flips to Convert Binary Matrix to Zero Matrix.cpp | //TIME - O(2^(M*N)*M*N)
//Backtracking
// class Solution {
// public:
// bool isZeroMatrix(vector<vector<int>>&mat, int n, int m){
// for(int i=0;i<n;i++){
// for(int j=0;j<m;j++){
// if(mat[i][j] != 0)
// return false;
// }
// }
/... | ALGO | 0.999975 | 5.684965 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-07-08T13:11: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": "1f39107fb076... |
582c210c-3f3e-4ff0-b4da-15ea3edd50a8 | chenyong2github/UnrealEngine | Engine/Plugins/Experimental/NNERuntimeORTCpu/Source/ThirdParty/onnxruntime/Onnxruntime/Private/contrib_ops/cpu/transformers/beam_search_impl_base.h | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <memory>
#include <vector>
#include <utility>
#include "contrib_ops/cpu/transformers/generate_impl_base.h"
namespace onnxruntime {
namespace contrib {
namespace transformers {
template <typename T>
... | TOOL | 0.995378 | 7.676892 | {
"github_metadata": {
"branch": "5.3",
"commit_count": 258706,
"repo_created_at": "2022-07-28T06:53:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 37,
"forks": 12,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "8d4bde... |
32efaff2-334a-48d2-a0d2-9e6670a417d0 | naruto2/ConjugateGradient | solver.h | #ifndef SOLVER_H
#define SOLVER_H
#ifndef noGPU
#include <cuda_runtime_api.h>
#include <cublas_v2.h>
#include <cusparse_v2.h>
#include <thrust/device_vector.h>
using namespace thrust;
#endif
#include <iostream>
#include <cmath>
#include "solver/sparse.h"
#define SOLVERROR_NONE 0
#define SOLVERROR_MAXIT 1
#de... | ALGO | 0.997734 | 5.142005 | {
"github_metadata": {
"branch": "master",
"commit_count": 44,
"repo_created_at": "2018-10-06T08:25: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": "041ae37a6... |
f44ec4be-2519-469b-a915-4495a5696083 | kiwibrowser/src | third_party/libaom/source/libaom/third_party/libyuv/source/compare_win.cc | /*
* Copyright 2012 The LibYuv Project Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing p... | ALGO | 0.955291 | 5.831465 | {
"github_metadata": {
"branch": "master",
"commit_count": 672,
"repo_created_at": "2020-04-18T07:16:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2888,
"forks": 414,
"issues": 0,
"pull_requests": 5
},
"file_meta": {
"content_id": "761... |
d803a924-dc84-45ac-8464-097fdfb38027 | sanchit-sinha/CP | Contests/Codeforces/CF-Contest/DIV3-1283/D/sol.cpp | #include "bits/stdc++.h"
using namespace std;
#define f first
#define s second
#define pb push_back
#define ll long long
#define ld long double
#define lb lower_bound
#define ub upper_bound
#define m... | ALGO | 0.999983 | 3.722373 | {
"github_metadata": {
"branch": "master",
"commit_count": 383,
"repo_created_at": "2020-07-18T07:42:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a556a7e4... |
19e22bc1-cd87-4f27-8e3c-1b0a3496b633 | moondemon68/cp | Codeforces/PastContests/1237/1237C.cpp | #include <bits/stdc++.h>
#define x first.first
#define y first.second
#define z second.first
#define id second.second
#define pb push_back
#define mp make_pair
#define MOD 1000000007
#define pii pair<int,int>
#define LL long long
using namespace std;
int main () {
//clock_t start = clock();
ios_base::sync_with... | ALGO | 0.999989 | 3.748521 | {
"github_metadata": {
"branch": "master",
"commit_count": 184,
"repo_created_at": "2018-09-17T12:29: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": "dfe9623f... |
cfe9fb69-3d15-4af2-b903-1c11e5069ccc | mahir29/CompetitiveProblems | interviewbit/dynamicProgramming/minJumpsArray.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define ull unsigned long long
#define vi vector<int>
#define vs vector<string>
#define pii pair<int, int>
#define vp vector<pii>
#define pb push_back
#define mp make_pair
#define all(v) v.begin(), v.end()
#define mii map<int, int>
#define w(x) \
... | ALGO | 0.999968 | 3.754645 | {
"github_metadata": {
"branch": "master",
"commit_count": 224,
"repo_created_at": "2021-03-22T11:17: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": "14aca5a4... |
b1b74689-c54b-4278-b4f9-641eda662508 | riteme/test | oi/homework/2015-10-27/1/main.cpp | #include <cmath>
#include <cfloat>
#include <iostream>
#include <complex>
using namespace std;
typedef complex<long double> Complex;
Complex Compute(Complex x);
bool AlmostEqualToZero(Complex n);
#define EPSILON 16
int main() {
ios::sync_with_stdio(false);
long double a, b;
cin >> a >> b;
Complex... | ALGO | 0.999866 | 3.999029 | {
"github_metadata": {
"branch": "master",
"commit_count": 550,
"repo_created_at": "2015-04-26T07:16:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 7
},
"file_meta": {
"content_id": "63187f39... |
769d2722-0046-439d-a554-74107a4bcfaf | Mulab11/cntt2016-hw1 | TC-SRM-551-div1-450/mhy.cpp | #include <cstdio>
#include <cmath>
#include <cstring>
#include <ctime>
#include <iostream>
#include <algorithm>
#include <set>
#include <vector>
#include <sstream>
#include <typeinfo>
#include <fstream>
using namespace std;
class ColorfulWolves {
public:
int dist[105][105];
int getmin(vector<strin... | ALGO | 0.99905 | 4.390745 | {
"github_metadata": {
"branch": "master",
"commit_count": 4450,
"repo_created_at": "2016-09-28T13:04:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 31,
"forks": 28,
"issues": 0,
"pull_requests": 8
},
"file_meta": {
"content_id": "5838d... |
e9d2cbbc-3ea3-4861-82a5-2f61430cd0ae | jiangb2o/Parallel-Programming | lab4/solveEquations.cpp | // g++ -pthread filename.cpp -o filename
#include<pthread.h>
#include<iostream>
#include<stdio.h>
#include<string>
#include<random>
#include<chrono>
#include<algorithm>
using namespace std;
double ans = 0;
pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
random_device rd;
mt19937 gen(rd());
uniform_real_distributio... | ALGO | 0.999893 | 4.739632 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2025-06-09T04:06: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": "9d194f240f65... |
6edf229d-6868-4a6b-9761-ef889fc35f0d | darele/DM-sem3 | lab1/i.cpp | #include <bits/stdc++.h>
#define DBG(x) cerr << #x << "=" << (x) << "\n"
#define RAYA cerr << "======================\n"
#define ll long long
#define ii pair <int, int>
#define dl pair <ll, ll>
#define vi vector <int>
#define vl vector <ll>
#define vii vector <ii>
#define graph vector <vi>
#define ff first
#define ss s... | ALGO | 0.999982 | 3.712302 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2023-06-20T09:03: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": "46e82a3216... |
b336ab76-d4bd-43de-869d-6e474bc540c2 | grame-cncm/faust | tools/physicalModeling/mesh2faust/vega/libraries/volumetricMesh/generateInterpolationMatrix.cpp | /*************************************************************************
* *
* Vega FEM Simulation Library Version 3.1 *
* *
* "volumetricMesh" ... | ALGO | 0.946466 | 4.382184 | {
"github_metadata": {
"branch": "master-dev",
"commit_count": 13912,
"repo_created_at": "2016-11-05T13:09:11.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2789,
"forks": 355,
"issues": 204,
"pull_requests": 7
},
"file_meta": {
"content_id... |
e4f9399f-97ce-4d19-bb3e-cae5193cbb05 | shahidul-brur/OnlineJudge-Solution | Codeforces/879_B - Table Tennis.cpp | /*=================================*\
Md. <NAME>
CSE, BRUR
Rangpur, Bangladesh
mail: <EMAIL>
FB : fb.com/shahidul.brur
Blog: shahidul-brur.blogspot.com
\*=================================*/
#include<bits/stdc++.... | ALGO | 0.999998 | 3.536425 | {
"github_metadata": {
"branch": "master",
"commit_count": 44,
"repo_created_at": "2019-06-15T04:11: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": "93cfefd03... |
1506c335-4b0d-4592-ad87-aa3ca5fd9bfa | KumarRobotics/kr_autonomous_flight | autonomy_core/map_plan/mpl/include/mpl_basis/trajectory.h | /**
* @file trajectory.h
* @brief Trajectory class
*/
#pragma once
#include "mpl_basis/lambda.h"
#include "mpl_basis/primitive.h"
namespace MPL {
/**
* @brief Command class
*
* State includes position, velocity, acceleration and jerk in \f$R^n\f$, where
* the dimension \f$n\f$ can be either 2 or 3. Yaw and y... | TOOL | 0.978524 | 7.453161 | {
"github_metadata": {
"branch": "master",
"commit_count": 560,
"repo_created_at": "2020-11-17T16:52:31.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 722,
"forks": 123,
"issues": 10,
"pull_requests": 4
},
"file_meta": {
"content_id": "f71e... |
6763f54a-f590-46a1-82d9-e0a7838db6b5 | gjghfd/FasterStreamClustering | src/common.h | #pragma once
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <random>
#include <ctime>
#include <cmath>
#include <map>
#include <unordered_map>
#include <set>
#include <vector>
#include <chrono>
#include <sys/sysctl.h>
#include <unistd.h>
#include <assert.h>
u... | ALGO | 0.997332 | 3.096431 | {
"github_metadata": {
"branch": "main",
"commit_count": 36,
"repo_created_at": "2023-12-24T17:12:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "42d55ebadba... |
c4863936-7a83-4aa4-b56d-082b12002fed | noob-hu-yaar/Coding-Questions | GFG/shortest-common-supersequence.cpp | /*
https://practice.geeksforgeeks.org/problems/shortest-common-supersequence/0/
Given two strings str1 and str2, find the length of the smallest string which has both, str1 and str2 as its sub-sequences.
Note: str1 and str2 can have both uppercase and lowercase letters.
Input:
The first line of input contains an inte... | ALGO | 0.99997 | 5.915445 | {
"github_metadata": {
"branch": "master",
"commit_count": 43,
"repo_created_at": "2020-05-22T04:19:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "35d7c5822... |
ea2e0ba6-9c08-411f-9a85-30b835dbbb6c | mayank7jha1/Launchpad_June | Lecture 18/Sum_Of_the_Array.cpp | #include<iostream>
using namespace std;
int SumRecursively(int* a, int n) {
if (n == 0) {
return 0;
}
//Aap recursion ko bol rahe ho ki sum laake do 0 se n-2 tak ka.
int chota_sum = SumRecursively(a, n - 1);
int total_sum = chota_sum + a[n - 1];
return total_sum;
}
int SumRecursively2(int* a, int n) {
... | ALGO | 0.999912 | 4.468489 | {
"github_metadata": {
"branch": "main",
"commit_count": 60,
"repo_created_at": "2023-06-06T09:34:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "eedeb296854... |
26acf07b-549b-409c-a0de-063fd6c5537c | Daek-You/Algorithm | C++/BOJ/단계별로 풀어보기/30. 최단 경로/[BOJ_13549] 숨바꼭질 3.cpp | #include <iostream>
#include <vector>
#include <queue>
using namespace std;
#define FAST_IO ios::sync_with_stdio(false); cout.tie(NULL); cin.tie(NULL);
#define MAX 100000
#define INF 1000000000
int Calculate(int node, int i) {
switch(i) {
case 0: return node - 1;
case 1: return node + 1;
c... | ALGO | 0.999941 | 3.679551 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2025-03-09T02:56:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4fd597b79df... |
a05a6086-17f5-4ed6-882e-4a747fed98a0 | yilinfang/CryptologyCourseDesign | CryptologyCourseDesign/pgp.cpp | #include "pgp.h"
void pgp::CreateECKeys(const char * filepath_pub, const char * filepath_pri)
{
EC_KEY * key = EC_KEY_new();
EC_builtin_curve * curves;
EC_GROUP* group;
int crv_len;
unsigned int nid;
crv_len = EC_get_builtin_curves(NULL, 0);
curves = (EC_builtin_curve*)malloc(sizeof(EC_builtin_curve) * crv_len)... | TOOL | 0.91689 | 3.868969 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2018-09-04T12:58:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0d44ea7e9... |
d5334a1f-6a25-4635-b174-0e52c7773c50 | FrankXu7/AlgorithmCodes | codes/SummaryRanges/SummaryRanges.cpp | /**************************************************************************************************
* 【题目描述】
* 给定一个无重复元素的有序数组,找出数组中的最小有序区间,即数组中,存在一个子数组,它们是按1递增(减)的,
* 如果一个子数组和它左右两侧的元素差值都大于1,则单独输出。
*
*
* 【输入】
* No Duplicate and ASC Array = [1,2,3,6]
* 【输出】
* Summary Ranges Array = ["1->3", "6"]
*
* 【解题思路】
*... | ALGO | 0.999951 | 5.805163 | {
"github_metadata": {
"branch": "main",
"commit_count": 292,
"repo_created_at": "2021-03-30T03:49: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": "dc495eb927... |
2e91e6c9-df2a-42c8-bffa-3bdf0f091205 | ashishtad/LeetCode | valid_sudoku.cpp |
/*
36. Valid Sudoku
Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules:
Each row must contain the digits 1-9 without repetition.
Each column must contain the digits 1-9 without repetition.
Each of the nine 3 x 3 sub-boxes of the grid must contain t... | ALGO | 0.999647 | 6.997775 | {
"github_metadata": {
"branch": "master",
"commit_count": 120,
"repo_created_at": "2020-05-02T11:36: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": "61401a38... |
92c28310-6140-4487-8fde-4d57caabd4d5 | hanasiu/Programming-STROUSTRUP | Chapter11_Customizing_Input_and_Ouput/Punct_stream.cpp | #include "std_lib_facilities.h"
class Punct_stream {
public:
Punct_stream(istream& is)
: source{is}, sensitive{true} { }
void whitespace(const string& s)
{ white = s; }
void add_white(char c) { white += c; }
bool is_whitespace(char c);
void case_sensitive(bool b) { sensitive = b; }
... | ALGO | 0.990825 | 5.268304 | {
"github_metadata": {
"branch": "main",
"commit_count": 271,
"repo_created_at": "2022-07-31T07:52:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "11a9dbd3c5... |
a12ad260-85f7-4740-9eb0-ea5ccc9a3811 | yplusplus/aabbyy | 20131002/b.cpp | #include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const long long mod = 1000000007;
long long f[10010];
long long pow(long long a,long long b)
{
long long ans = 1;
while(b) {
if(b & 1) ans = ans * a % mod;
a = a * a % mod;
b /= 2;
... | ALGO | 0.999932 | 3.809218 | {
"github_metadata": {
"branch": "master",
"commit_count": 29,
"repo_created_at": "2017-04-24T03:24:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 12,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d5a83ccd... |
1ffa829f-442d-44d7-80b6-87e0cf104828 | Mihnea2003/Babes-Bolyai-University | Semester 2/Data Structures and Algorithms/Assignment 2 Bag/Matrix.cpp | #include "Matrix.h"
#include <exception>
using namespace std;
//BC:O(1)-the node is inserted first
//WC:O(n)
Node* Matrix::insert_node(Node** node, int i, int j, TElem value)
{
Node* new_node = new Node;
new_node->line = i;
new_node->col = j;
new_node->value = value;
new_node->next = nullptr;
n... | ALGO | 0.987297 | 4.134007 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2023-11-23T16:09: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": "55fb8f6e47f... |
9b4f142b-9063-4a60-b513-a31bb7fdf181 | jkt10125/Competitive-Programming | Helper Classes/BigInteger.cpp | #include <bits/stdc++.h>
// using namespace std;
class BigInteger {
std::string value;
bool sign;
public:
BigInteger (std::string Value = "", bool Sign = 0) {
value = Value;
sign = Sign;
clean();
}
BigInteger (long long a) {
sign = (a < 0);
a = abs (a)... | ALGO | 0.998779 | 4.167096 | {
"github_metadata": {
"branch": "main",
"commit_count": 206,
"repo_created_at": "2022-09-18T00:42:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "636bf2bbe7... |
bf1a82f1-e766-48b9-b831-d69b3522b1c7 | wisdompeak/LeetCode | Deque/1562.Find-Latest-Group-of-Size-M/1562.Find-Latest-Group-of-Size-M_v2.cpp |
class Solution {
public:
int findLatestStep(vector<int>& arr, int m)
{
const int n = arr.size();
vector<pair<int, int>> ranges(n, make_pair(-1, -1));
int countsForM = 0;
int ans = -1;
for (int i = 0; i < n; ++i)
{
int flipIndex = ar... | ALGO | 0.999986 | 5.914996 | {
"github_metadata": {
"branch": "master",
"commit_count": 8912,
"repo_created_at": "2017-03-01T10:30:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6018,
"forks": 1314,
"issues": 4,
"pull_requests": 0
},
"file_meta": {
"content_id": "9... |
d5e0c7b8-f368-484e-a195-875d43518305 | ermyar/Algo_and_DS-sem-2 | contest4/Q.cpp | #include <algorithm>
#include <iostream>
#include <set>
#include <vector>
const long long cMaxn = 4000 + 100, cInf = __LONG_LONG_MAX__;
struct Graph {
private:
struct Edge {
long long to;
long long flow;
long long capacity;
long long cost;
long long GetCap() const { return capacity - flow; }
... | ALGO | 0.999927 | 4.13388 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2024-02-23T21:58: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": "ac26309c1... |
01650dab-60cf-41a6-97a0-7c092c97840c | jeevanvenkataramana/Programming | Sample programs/PrimeSpirals/PrimeSpirals.cpp | /*
* PrimeSpirals.cpp
*
* Created on: Mar 21, 2018
* Author: jeeva
*/
/* <NAME> SID 011917477 */
#include <iostream>
#include<iomanip>
#include<vector>
#include<cstring>
#include <string>
using namespace std;
const int MAX_SIZE = 101; // maximum size of the square matrix
const int MAX_START = 50; //... | ALGO | 0.999766 | 4.535385 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2018-05-29T07:05: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": "871cbc14a... |
e4f02e01-0000-40f7-b0ee-c3183509c623 | wupsi/PP1_COURSE | Week 3/Friday/insert_eraseVector.cpp.cpp | #include <iostream>
#include <vector>
using namespace std;
int main(){
int n; cin >> n;
vector<int> v;
for(int i = 0; i < n; i++){
int x; cin >> x;
v.push_back(x);
}
cout << "vector:\n";
for(int i = 0; i < v.size(); i++)
cout << v[i] << " ";
for(int i = 0; i < 3;... | ALGO | 0.998447 | 3.857233 | {
"github_metadata": {
"branch": "main",
"commit_count": 67,
"repo_created_at": "2021-09-21T17:58:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c903947cf1a... |
a03f8ec3-c51a-4e91-99d0-f3c5c30e4c94 | ganghe74/algo | baekjoon/3665_최종 순위.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int T, N, M, u, v;
scanf("%d", &T);
while (T--) {
bool a[501][501];
int rank[501], ind[501];
memset(a, 0, sizeof(a));
memset(rank, 0, sizeof(rank));
memset(ind, 0, sizeof(ind));
scanf("%d", &N);
... | ALGO | 0.999995 | 4.209399 | {
"github_metadata": {
"branch": "master",
"commit_count": 645,
"repo_created_at": "2018-05-13T11:19:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 8,
"pull_requests": 0
},
"file_meta": {
"content_id": "16f7b247... |
b0621a7e-0aff-4dcf-a047-319f586d71c8 | jjj5306/Nestnet-Algorithm-Study | ParkSeYeon/8week/1941.cpp | #include <iostream>
#include <vector>
#include <queue>
using namespace std;
vector<string> v;
vector<bool> combination(25, false);
int count2 = 0;
vector<int> dx = { -1, 1, 0, 0 };
vector<int> dy = { 0, 0, -1, 1 };
bool is_bound(const int x, const int y) {
return x >= 0 && y >= 0 && x < 5 && y < 5;
}
bool bfs(const... | ALGO | 0.998564 | 4.590333 | {
"github_metadata": {
"branch": "main",
"commit_count": 112,
"repo_created_at": "2024-09-30T08:35:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 6,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "a15f5d298d... |
977353c9-7e5e-49f0-96c6-95b0b5442ddf | yeasinshamimdev/DSA-by-C-Plus-Plus | module-7-5/problem_5.cpp | #include <iostream>
#include <algorithm>
#include <string.h>
#include <vector>
using namespace std;
class Node
{
public:
int val;
Node *next;
Node(int val)
{
this->val = val;
this->next = NULL;
}
};
void insert_at_tail(Node *&head, Node *&tail, int val)
{
Node *newNode = new N... | ALGO | 0.999832 | 4.510831 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2025-06-25T16:43: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": "b188a53deb40... |
2699d05e-9ae7-414a-977e-aa3ee850268b | alexandraback/datacollection | solutions_5644738749267968_1/C++/BD777/Nxt.cpp | #include <iostream>
#include <cstring>
#include <cstdio>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#define bug puts("here");
using namespace std;
typedef long long ll;
const int maxn = 1086;
const ll mod = 1e9+7;
double a[maxn],b[maxn];... | ALGO | 0.999969 | 3.485896 | {
"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": "1de08a4aa... |
44f50c57-a200-4909-9f08-78ae3ead91e5 | alexandraback/datacollection | solutions_5631572862566400_1/C++/mkn/c.cc | #include <bits/stdc++.h>
/*
#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<set>
#include<map>
#include<queue>
#include<deque>
#include<stack>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<cassert>
*/
using namespace std;
typedef long long ll;
typedef pair<int,int> pin... | ALGO | 0.999772 | 3.699373 | {
"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": "ab19b5e8d... |
342de815-311a-4836-8400-5505483bad27 | Rajan9089/CPP-CODE | string-adv/SubsequencesArray_Recursion.cpp | #include <bits/stdc++.h>
using namespace std;
void SubsequencesArray_Recursion(int ind, vector < int > & ds, int arr[], int n) {
if (ind == n) {
for (auto it: ds) {
cout << it << " ";
}
if (ds.size() == 0) {
cout << "\" \"";
}
cout << endl;
... | ALGO | 0.999628 | 5.288172 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-02-01T13:48: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": "f49d194e59c8... |
c88e32d7-c8fa-40f1-b508-9155da7a3256 | AV2409/DSA_Codes | collage/ds_mst/ass_3/3.cpp | #include <bits/stdc++.h>
#define MAX 100
using namespace std;
class Stack
{
int top = -1;
int arr[MAX];
public:
void push(int n)
{
if (top == MAX - 1)
{
cout << endl
<< "Overflow" << endl;
}
else
{
arr[++top] = n;
... | ALGO | 0.999208 | 5.075102 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2024-08-15T17:45: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": "4e5737975f6... |
0084cb97-070a-40c6-bfd0-3177cded3dc1 | benedictaquino/cpp-primer | ch03/src/ex3_4_1.cpp | /* This program reads two strings and reports whether the strings are equal.
* If not, the program reports which of the two is larger. */
#include <iostream>
#include <string>
using std::cin; using std::cout; using std::endl;
using std::string; using std::getline;
int main()
{
string s1, s2; // initialize two e... | ALGO | 0.999093 | 4.738573 | {
"github_metadata": {
"branch": "master",
"commit_count": 161,
"repo_created_at": "2018-10-22T13:27: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": "6dba320d... |
8ca2ea8b-28ff-4551-85ad-d728f2eb4ce0 | PolusAI/nyxus | src/nyx/helpers/lstsq.h | #pragma once
#include <iostream>
#include <vector>
#include <cmath>
std::vector<double> lstsq(const std::vector<std::vector<double>>& A, const std::vector<double>& b) {
int m = A.size(); // Number of equations
int n = A[0].size(); // Number of unknowns
// Initialize the matrix A transpose and the vector... | ALGO | 0.999828 | 5.200922 | {
"github_metadata": {
"branch": "main",
"commit_count": 1610,
"repo_created_at": "2021-09-15T14:28:01.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 24,
"forks": 8,
"issues": 3,
"pull_requests": 4
},
"file_meta": {
"content_id": "0a549e6c0... |
83df9076-af97-40b2-bac7-963cd86f040d | panzhongxian/leetcode-cpp | src/1742_maximum-number-of-balls-in-a-box.h | #include <algorithm>
#include <vector>
#include "base.h"
using std::min;
using std::vector;
class Solution {
public:
vector<int> vector_shift(const vector<int>& v, int n) {
auto ret(v);
for (int i = 0; i < n; i++) {
ret.insert(ret.begin(), 1, 0);
}
while (ret.back() == 0) {
ret.pop_bac... | ALGO | 0.999235 | 5.778063 | {
"github_metadata": {
"branch": "master",
"commit_count": 94,
"repo_created_at": "2019-10-30T11:15:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 23,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3f6e6435... |
be1563b3-e458-4108-84a0-d665f6bf4cd2 | Yawn-Sean/Daily_CF_Problems | daily_problems/2024/04/0406/personal_submission/cf822c_k423.cpp | // https://codeforces.com/contest/822/submission/255308272
/* 我永远喜欢爱莉希雅♪ */
void elysia() {
int n, m, inf = 2e9 + 1;
cin >> n >> m;
vector<array<int, 3>> p(n);
for (auto &[l, r, v]: p) cin >> l >> r >> v;
int ans = inf;
ranges::sort(p);
map<int, int> mn;
priority_queue<pii, vector<pii>,... | ALGO | 0.999797 | 4.51376 | {
"github_metadata": {
"branch": "main",
"commit_count": 20410,
"repo_created_at": "2024-02-26T01:04:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 478,
"forks": 302,
"issues": 0,
"pull_requests": 7
},
"file_meta": {
"content_id": "19ff... |
0a920f9a-6970-40e5-b8b5-58b3e4ab9aef | kookjd7759/Algorithm | 백준/Bronze/24349. МЕД/МЕД.cc | #include <bits/stdc++.h>
#define Sync ios_base::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);
#define Fixed(x) cout << fixed; cout.precision(x);
#define ll long long
#define in cin >>
#define out cout <<
#define spc << " " <<
#define endl << "\n"
#define ent cout << "\n"
#define Fori(x) for (int i = 0; i ... | ALGO | 0.999451 | 3.42524 | {
"github_metadata": {
"branch": "main",
"commit_count": 2962,
"repo_created_at": "2023-08-07T12:27:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "70629baaf... |
7db9a482-5d96-43f7-834f-9f37b7e22b8f | nikita-sakharin/object-oriented-programming | LW_6/main.cpp | #include <iostream>
#include <memory>
#include "pentagon.h"
#include "hexagon.h"
#include "octagon.h"
#include "queue.h"
int main()
{
Queue<Figure> queue;
Real matrix[HEXAGON_VERTEX_CNT][2u];
for (size_t i = 0u; i < PENTAGON_VERTEX_CNT; ++i)
{
for (size_t j = 0u; j < 2u; ++j)
{
matrix[i][j] = Real(i * PENT... | ALGO | 0.931764 | 4.160119 | {
"github_metadata": {
"branch": "master",
"commit_count": 43,
"repo_created_at": "2016-12-23T15: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": "341b85fb8... |
d6702d11-9e1b-4ede-bb35-66cfb23a68f8 | Dr-Khatib/PT1-SESJ1013 | Students/Vibhusha/LE2.cpp | #include <iostream>
using namespace std;
//Set1
int main() {
int number, sum=0;
cout << "Enter an integer number: ";
cin >> number;
int ValueNumber = number;
while (number != 0){
int digit = number % 10;
cout<<digit;
sum += digit;
number /= 10;
if(number!=0... | ALGO | 0.99711 | 3.172818 | {
"github_metadata": {
"branch": "main",
"commit_count": 762,
"repo_created_at": "2023-08-08T07:05:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 30,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1ef2e1f4c... |
686b44f0-187e-40f2-9276-af20d220774b | sjcnh/cplusplus | jz/3/vector.cc | ///
/// @file vector.cc
/// @author LJW
/// @date 2018-06-29 16:51:13
///
#include <iostream>
#include <vector>
using std::vector;
using std::cout;
using std::endl;
int main()
{
vector<vector<int>> array(3); // m
// 初始化一个m*n二维数组
for(int i = 0; i < 3; ++i)
{
array[i].resize(4); // n
}
int row =... | TOOL | 0.979833 | 4.288276 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2018-06-05T09:02: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": "32896a95a... |
1075d24e-6a2d-40f5-9175-41d67a6ae344 | aim-for-better/acm | hdu/full_context_search.cpp | #include <iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<vector>
using namespace std;
const int maxn=10005;
const int R=10;
char txt[maxn*6];
string key[maxn];
bool vis[maxn];
bool flag=false;
vector<int> ans;
struct Node{
int val;
struct Node* next[R];
Node(){
val=-1;
... | ALGO | 0.999738 | 3.093888 | {
"github_metadata": {
"branch": "master",
"commit_count": 125,
"repo_created_at": "2016-11-16T13:27:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "98b2f6b9... |
cd0fac36-9c01-48c2-96fb-a27985cb0e3c | burakbayramli/books | NumericalRecipes3/odeint.h | struct Output {
Int kmax;
Int nvar;
Int nsave;
bool dense;
Int count;
Doub x1,x2,xout,dxout;
VecDoub xsave;
MatDoub ysave;
Output() : kmax(-1),dense(false),count(0) {}
Output(const Int nsavee) : kmax(500),nsave(nsavee),count(0),xsave(kmax) {
dense = nsave > 0 ? true : false;
}
void init(const Int neqn, co... | ALGO | 0.999501 | 4.967956 | {
"github_metadata": {
"branch": "master",
"commit_count": 652,
"repo_created_at": "2016-10-31T17:24:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 325,
"forks": 201,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "73db... |
6c8b3326-f5aa-47e2-a33c-45ec08d48c45 | gamilian/personal | PAT-B/b1053.cpp | #include <iostream>
#include <vector>
#include <iomanip>
using namespace std;
int main() {
int n, d;
double may = 0.000, empty = 0.000;
double e;
cin >> n >> e >> d;
for (int i = 0; i < n; ++i) {
int k;
cin >> k;
int cnt = 0;
for (int j = 0; j < k; ++j) {
... | ALGO | 0.999548 | 3.6928 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-05-05T01:54: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": "0782d21752fb... |
ffbe40a3-5685-43d8-958d-188aa701fcc7 | UrMagicIsMine/LeetCode-Sol | C++/132_PalindromePartitioningII.cpp | /*
Given a string s, partition s such that every substring of the partition is a palindrome.
Return the minimum cuts needed for a palindrome partitioning of s.
Example:
Input: "aab"
Output: 1
Explanation: The palindrome partitioning ["aa","b"] could be produced using 1 cut.
*/
#include <vector>
#include <string>
#i... | ALGO | 0.999978 | 6.258194 | {
"github_metadata": {
"branch": "master",
"commit_count": 587,
"repo_created_at": "2018-02-12T07:15: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": "b85bd3f2... |
19bf4193-e680-488d-bdb9-579b0b07a997 | devanshdalal/CompetitiveProgrammingAlgos | devanshdalal/codeforces/593-B/593-B-14071833.cpp | #include <bits/stdc++.h>
#include <cstring>
#include <queue>
#define mp make_pair
#define pb push_back
#define F first
#define S second
#define PRIME 23
#define M 100001
#define dbg(x) {std::cerr << #x << " = " << x << endl;}
typedef long long ll;
typedef unsigned long long ull;
typedef double dbl;
using namespace std... | ALGO | 0.999935 | 3.714799 | {
"github_metadata": {
"branch": "master",
"commit_count": 680,
"repo_created_at": "2016-02-06T15:27:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1ce1429d... |
b02d7772-2491-4368-a076-a185df5a6399 | ajitamishra/Leetcode | Non-overlapminLenght.cpp | class Solution {
public:
int minSumOfLengths(vector<int>& arr, int target) {
vector<int> left = minLen(arr, target);
vector<int> arrReverse(arr.begin(), arr.end());
reverse(arrReverse.begin(), arrReverse.end());
vector<int> right = minLen(arrReverse, target);
int mi... | ALGO | 0.999988 | 5.324684 | {
"github_metadata": {
"branch": "master",
"commit_count": 32,
"repo_created_at": "2020-08-20T12:33:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cf6cc78ff... |
e490d5ef-7aaf-4e20-ba44-3e7630de977c | dtrad/geoprogcourse | Lecture9Born/user/dtrad/rtmborn.cc | // rtmborn.
// <NAME>, 2016.
// Based on Penliang Yang program user/pyang/prtm2d.c
#include <iostream>
#include <cstdlib>
#include <cstring> // need memcpy
#include <cmath>
#include "rtmborn.hh"
#include "MyAlloc.hpp"
#include <time.h>
#include <stdexcept>
#include <sys/time.h>
#include <valarray>
#ifdef _OPENMP
#i... | ALGO | 0.999528 | 4.028883 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-04-19T19:31:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e0d651624f3e... |
4b51610b-5916-48a8-989b-d73513d85747 | juanmaarg6/FP | practicas/sesion_10/casa/X_R4A_Ejercicio16_Moda_JMRG.cpp | /*
Ejercicio 16: Programa que lee un vector de caracteres
y devuelve la moda, es decir, el caracter
que mas veces se repite
Código fuente realizado por <NAME>.
*/
#include <iostream>
using namespace std;
struct FrecuenciaCaracter{
char caracter;
int frecuencia;
};
/*
Funcion que... | ALGO | 0.999936 | 4.431796 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2024-02-12T17:34: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": "64c063ed2e1... |
45226b02-bdf5-4183-b170-28bf29922a83 | alexandraback/datacollection | solutions_1674486_1/C++/Hamzawy/a.cpp | /*
* a.cpp
*
* Created on: May 6, 2012
* Author: AhmedHamza
*/
#include <map>
#include <deque>
#include <queue>
#include <stack>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <algorithm>
#include <cstring>
#include <... | ALGO | 0.999808 | 3.725388 | {
"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": "75978ee38... |
30cc9fd8-1905-4659-a021-c583b46aac32 | corvo-007/data-structures-and-algorithms-cpp | problems/DP/min-cost-climbing-stairs.h | #include <algorithm>
#include <vector>
namespace DP {
int minCostClimbingStair_brute_force(const std::vector<int> &vec, int i) {
if (i >= vec.size()) {
return 0;
}
int cost1 = minCostClimbingStair_brute_force(vec, i + 1);
int cost2 = minCostClimbingStair_brute_force(vec, i + 2);
return std::min(cost1, ... | ALGO | 0.998847 | 5.553452 | {
"github_metadata": {
"branch": "main",
"commit_count": 208,
"repo_created_at": "2022-09-24T04:26: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": "8f2ea41f2a... |
78a3a24f-a925-4d34-8058-a1f342a073bc | JosephLivengood/CTCI-CPP14 | CTCI/src/arrays-and-strings.cpp | #include <cstring>
#include <string>
// 1.1
// Implement an algorithm to determine if a string has all unique
// characters. Ignore case.
bool OnlyUniqueChars(std::string *str) {
if (str->empty())
throw std::runtime_error("Empty string is both unique and not unique.");
// int is only 16 bits on LP32, need a... | ALGO | 0.992773 | 6.389202 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2018-03-02T03:15:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "51bbbf586... |
fe3de16a-fd80-4d8f-8ce5-3985ed7d9194 | sofhiasouza/Algorithms | hk.cpp | #include <bits/stdc++.h>
#define pb push_back
using namespace std;
const int maxn = 220, inf = 1e9;
int n, m, h[maxn], age[maxn], d[maxn], pairs[maxn], dist[maxn];
vector < int > grafo[maxn];
bool bfs()
{
queue < int > fila;
for(int i = 1 ; i <= m ; i++)
{
if(!pairs[i])
{
fila.push(i);
dist[i] = 0;
... | ALGO | 0.999202 | 3.261563 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2019-04-09T15:15: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": "dadd5b02cf... |
445e7f9e-9097-4f4b-846d-42753934fc2d | Jacky-Lzx/Luogu-workspace | C-C++/mergesort.cpp | //
// Created by lzx on 2020-3-1.
//
#include <iostream>
using namespace std;
int merge(int* arrayPtr, int n)
{
int number = 0;
if (n == 2)
{
if (arrayPtr[0] > arrayPtr[1])
{
int temp = arrayPtr[0];
arrayPtr[0] = arrayPtr[1];
arrayPtr[1] = temp;
... | ALGO | 0.999997 | 4.54915 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2020-03-17T15:52: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": "32ab52f62... |
bfe18ffb-70f2-41aa-874c-021816855353 | RArora28/SPOJ-Submissions | LCMSUM.cpp | /* <NAME>
IIIT-Hyderabad */
#include <bits/stdc++.h>
using namespace std;
typedef pair<int,int> II;
typedef vector<int> VI;
typedef vector<II> VII;
typedef long long int LL;
typedef unsigned long long int ULL;
#define rep(i, a, b) for(i = a; i < b; i++)
#define rev(i, a, b) for(i = a; i > b; i--)
#define INF INT_... | ALGO | 0.999922 | 4.100921 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-03-06T21:03: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": "6654ef993e... |
07c34bb8-0465-4c0e-ad75-308e2842a6b7 | jocagos/competitive | UVa/UVa377.cpp | #include <bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n {};
string line {};
getline( cin, line );
n = stoi( line );
unordered_map<char, char> c24{ {'V', '0'}, {'U', '1'}, {'C', '2'}, {'D', 3} };
cout << "COWCULATIONS OUTPUT\n";
while( ... | ALGO | 0.999667 | 4.594499 | {
"github_metadata": {
"branch": "master",
"commit_count": 135,
"repo_created_at": "2017-03-07T15:42: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": "b59cf440... |
67423420-1e0a-414d-bb9d-08e84700009e | gbellocchi/xil_open_hw_23 | benchmarks/xilinx/matmul/03_x_bl_pm/hls/src/mmult.cpp | /**********
Copyright (c) 2018, Xilinx, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the fol... | ALGO | 0.999899 | 5.112495 | {
"github_metadata": {
"branch": "master",
"commit_count": 29,
"repo_created_at": "2023-06-23T08:16: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": "1851264c3... |
921fb969-e272-4d7f-a955-a5a5ed684a9f | odiubankov/AlgorithmicChallenges | cpp/leetcode/Google/Interview/ArraysAndStrings/681_NextClosestTime.h | //https://leetcode.com/problems/next-closest-time/
#ifndef ALGORITHMICCHALLENGES_681_NEXTCLOSESTTIME_H
#define ALGORITHMICCHALLENGES_681_NEXTCLOSESTTIME_H
#include <string>
#include <set>
#include <sstream>
#include <vector>
using namespace std;
string formatTime(const vector<int>& time) {
stringstream ss;
fo... | ALGO | 0.960389 | 6.076878 | {
"github_metadata": {
"branch": "master",
"commit_count": 254,
"repo_created_at": "2017-04-11T19:44: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": "a2652d50... |
250501b8-86cd-4f18-a647-bd1ff5361c60 | martyr-deepin/deepin-compiz | plugins/place/src/smart/src/smart.cpp | #include "smart.h"
#include <boost/foreach.hpp>
#ifndef foreach
#define foreach BOOST_FOREACH
#endif
/* overlap types */
static const unsigned short NONE = 0;
static const short H_WRONG = -1;
static const short W_WRONG = -2;
namespace compiz
{
namespace place
{
const unsigned int WindowAbove = 1 << 0;
cons... | TOOL | 0.989291 | 6.009914 | {
"github_metadata": {
"branch": "master",
"commit_count": 162,
"repo_created_at": "2013-04-01T05:00:39.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "de8b1a8c4... |
cbe02dc8-c8d1-4487-96de-0cec20f547eb | wateret/ps | reference/binary-search/binary_search.cpp | // Binary Search Algorithm with duplications
// Same functions with std::lower_bound and std::upper_bound
// Useful when
// - Binary search with custom containers
// - Solving an optimization problem that can be converted to a "decision problem with binary search"
#include <algorithm>
#include <vector>
// Same wi... | ALGO | 0.999971 | 6.020195 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2016-03-29T08:16:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "06eef4925... |
d296d3b0-78be-4df1-892a-754b4fe6280e | TonyMooori/studying | 2016_10/ANT_P037/main.cpp | #include <bits/stdc++.h>
#include <iostream>
#include <cstdio>
using namespace std;
#define N_PRIME 1000000007
#define ll int64_t
int main(void){
int n,m;
cin >> n >> m;
int board[128][128];
int sx,sy;
int gx,gy;
for(int y = 0 ; y < m ; y++ ){
string s;
cin >> s;... | ALGO | 0.999966 | 3.536133 | {
"github_metadata": {
"branch": "master",
"commit_count": 118,
"repo_created_at": "2016-08-30T13:31:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b7a5aea9... |
8cf6be65-58fb-4f4b-9640-0befa56dd8e0 | Bia103/Robotics | Lab homework/Tema_display2.ino | const int pinA = 12;
const int pinB = 8;
const int pinC = 5;
const int pinD = 3;
const int pinE = 2;
const int pinF = 11;
const int pinG = 6;
const int pinDP = 4;
const int pinD1 = 7;
const int pinD2 = 9;
const int pinD3 = 10;
const int pinD4 = 13;
const int pinX = A0;
const int pinY = A1;
const int pinButton = A2;
... | TOOL | 0.941807 | 5.532513 | {
"github_metadata": {
"branch": "master",
"commit_count": 36,
"repo_created_at": "2019-10-29T14:12: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": "ae2571920... |
8884e482-f55e-4ddd-822d-d9d74fd9d251 | rishabhs/sygus-comp14 | solvers/enumerative/esolver-synth-lib/src/z3-4.3.1/src/smt/theory_dense_diff_logic.h | /*++
Copyright (c) 2006 Microsoft Corporation
Module Name:
theory_dense_diff_logic.h
Abstract:
<abstract>
Author:
<NAME> (leonardo) 2008-05-16.
Revision History:
TODO: eager equality propagation
--*/
#ifndef _THEORY_DENSE_DIFF_LOGIC_H_
#define _THEORY_DENSE_DIFF_LOGIC_H_
#include"theory_arith.h"
#... | ALGO | 0.996397 | 7.277748 | {
"github_metadata": {
"branch": "master",
"commit_count": 80,
"repo_created_at": "2014-01-02T19:42:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 40,
"forks": 19,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "c57d1a2... |
c2cb539b-ee77-4cf8-87a7-17887b374465 | Rzakth/SpaceshipGame | vec.cpp | #include <math.h>
#include "vec.h"
vect3D addVector(vect3D v1, vect3D v2)
{
vect3D result;
result.x = v1.x + v2.x;
result.y = v1.y + v2.y;
result.z = v1.z + v2.z;
return result;
};
vect3D subVector(vect3D v1, vect3D v2)
{
vect3D result;
result.x = v1.x - v2.x;
result.y = v1.y - v2.y;
result.z = v1.z - v2.z;... | TOOL | 0.901518 | 5.203983 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-03-11T13:34: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": "503438a11d28... |
bdb4bd0a-8ea6-488e-b789-892497f03b8c | LIZHICHAOUNICORN/Toolkits | leetcode/LinkedList/sort/insertion_sort_list.cc | #include <gflags/gflags.h>
#include <glog/logging.h>
// Problems: https://leetcode-cn.com/problems/insertion-sort-list/
using namespace std;
// Definition for singly-linked list.
struct ListNode {
int val;
ListNode *next;
ListNode() : val(0), next(nullptr) {}
ListNode(int x) : val(x), next(nullptr) {}
Lis... | ALGO | 0.99992 | 6.21889 | {
"github_metadata": {
"branch": "main",
"commit_count": 370,
"repo_created_at": "2021-01-31T03:14:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "095a274fbe... |
c2bc4b4c-713f-4650-94ec-f564e1ae4ea2 | afzalhussain23/Competitive-Programming | LightOJ/1003 - Drunk.cpp | //Source Code Written: 7/4/15
#include <bits/stdc++.h>
using namespace std;
int main() {
//freopen("in.txt", "r", stdin);
map <string, int> mymap;
int t, tc = 0;
scanf("%d\n", &t);
while(t--) {
mymap.clear();
printf("Case %d: ", ++tc);
int m, flag = 0;
scanf("%d\n",... | ALGO | 0.999952 | 3.694684 | {
"github_metadata": {
"branch": "master",
"commit_count": 180,
"repo_created_at": "2016-08-25T10:37: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": "174365b7... |
d07e551f-94b1-43fd-b9ac-122bac1294bc | ChanvithaPraveen/Sudoku-CPP | main.cpp | #include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <chrono>
#include <atomic>
#include <mutex>
#include <sstream>
int SIZE;
int SQRT_SIZE;
std::mutex mtx;
std::atomic<bool> solved(false);
struct SudokuSolver {
std::vector<std::vector<int>> board;
std::vector<std::vector<bool>>... | ALGO | 0.997297 | 6.621941 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2024-01-12T05:02: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": "b4b5e7ff1b... |
0d08fa57-6645-4862-a3a7-485893b9b93c | g-maspero/Computed_Tomography | codigo/src/main.cpp | #include <cmath>
#include "rays.h"
#include "imageHandling.h"
#include "leastsquares.h"
using namespace std;
string getCmdOption(char ** begin, char ** end, const std::string & option){
char ** itr = std::find(begin, end, option);
if (itr != end && ++itr != end){
string cmd(*itr);
return cmd;
... | ALGO | 0.972221 | 5.262527 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2018-11-21T21: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": "02c047b48... |
64a36977-e880-4eed-9976-1e3a0fac78a3 | lgpnk/fast_cpp | Fast9.cpp | #include <stdlib.h>
#include "Fast.h"
#include "CaptureHandler.h"
#include <stdio.h>
#include <syslog.h>
int Fast::fast_corner_score(const uint8_t* p, const int pixel[], int t_start, bool bright)
{
int t_max = 255;
int t_min = t_start;
int t;
if(bright)
while(t_min != (t_max - 1) && t_min != t_max... | ALGO | 0.997126 | 4.840558 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2011-08-11T15:07:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d410ef821... |
95b52001-0828-4f5a-b9da-481def6771b8 | anshuman018/C_plus_plus | selectionsort.cpp | #include <iostream>
#include <climits>
using namespace std;
void selectionsort(int arr[], int n)
{
for (int j = 0; j < n; j++)
{
int minindx = j;
int min = arr[j];
for (int i = j + 1; i < n; i++)
{
if (arr[i] < min)
{
min = arr[i];
... | ALGO | 0.999971 | 5.255053 | {
"github_metadata": {
"branch": "main",
"commit_count": 46,
"repo_created_at": "2024-01-01T04:39: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": "338bf3267fe... |
f8a71689-6413-4d8a-b68c-323d3647dee5 | mnvaidya/adventofcode | 2022/Day07/day7.cpp | #include <bits/stdc++.h>
#include <iostream>
#include <fstream>
#include <cstdarg>
#include <typeinfo>
#include <tuple>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define ordered_set tree<int, null_type, less<int>, rb_tree_tag, tree_or... | ALGO | 0.998142 | 4.442492 | {
"github_metadata": {
"branch": "main",
"commit_count": 22,
"repo_created_at": "2022-12-28T13:09:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8b3f8fbfd88... |
900d6675-369d-4244-bc57-d67d3aaeb961 | Seymour-Lee/leetcode-solutions | tree/449. Serialize and Deserialize BST.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Codec {
public:
// Encodes a tree to a single string.
string serialize(TreeNode* root) {
if(root == n... | ALGO | 0.999908 | 6.129313 | {
"github_metadata": {
"branch": "master",
"commit_count": 718,
"repo_created_at": "2018-06-21T10:48:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "61e30ca2... |
6e81b07f-32c0-4cd3-8447-dd9f63ca258a | Ankur-Dwivedi22/cses | graph/Flight Discount.cpp | #include <bits/stdc++.h>
using namespace std;
#define INF 1e18
typedef long long ll;
typedef pair<ll, ll> pll;
void dijkstra(int start, vector<vector<pll>> &adj, vector<ll> &cost)
{
cost[start] = 0;
priority_queue<pll, vector<pll>, greater<pll>> pq;
pq.push({0, start});
while (!pq.empty())
{
... | ALGO | 0.999959 | 4.119549 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2025-01-31T15:23: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": "d0ea33c02e9... |
674e7689-19fa-4561-b231-1443a847c041 | znoraka/master2 | compression/TP3D/main.cpp | #include <string>
#include <fstream>
#include <math.h>
#include <sstream>
#include <vector>
#include <iostream>
#include <functional>
#include <algorithm>
#include <stdio.h>
#include <string.h>
class Point {
public:
Point(double x, double y, double z, bool cart = true) {
set(x, y, z, cart);
}
void set(doubl... | TOOL | 0.984791 | 4.261426 | {
"github_metadata": {
"branch": "master",
"commit_count": 61,
"repo_created_at": "2015-09-14T11:19:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a35fe188f... |
5317c8b6-68c4-4a37-a368-173b5a3e6693 | OpenSees/OpenSees | SRC/analysis/algorithm/equiSolnAlgo/BisectionLineSearch.h | /* ****************************************************************** **
** OpenSees - Open System for Earthquake Engineering Simulation **
** Pacific Earthquake Engineering Research Center **
** **
** ... | ALGO | 0.998394 | 4.188126 | {
"github_metadata": {
"branch": "master",
"commit_count": 8721,
"repo_created_at": "2018-09-12T00:49:34.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 667,
"forks": 719,
"issues": 42,
"pull_requests": 23
},
"file_meta": {
"content_id": "7b... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.