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 |
|---|---|---|---|---|---|---|---|
b699893f-3836-4fb4-946d-079b019a96e8 | windystrife/UnrealEngine_NVIDIAGameWorks | Engine/Source/ThirdParty/IntelEmbree/Embree270/src/kernels/xeon/bvh8/bvh8_intersector8_chunk.cpp | // ======================================================================== //
// Copyright 2009-2015 Intel Corporation //
// //
// Licensed under the Apache License, Version 2.0 (the "License"); //
// y... | ALGO | 0.999344 | 5.529539 | {
"github_metadata": {
"branch": "4.18-GameWorks",
"commit_count": 14,
"repo_created_at": "2018-03-06T15:44:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 284,
"forks": 176,
"issues": 4,
"pull_requests": 2
},
"file_meta": {
"content_id"... |
12c01c48-20b2-4073-8b7e-dc8780dbf9ae | MShinigami/CPP | tempCodeRunnerFile.cpp | #include <iostream>
#include <vector>
#define MAX 10
using namespace std;
class Queue
{
private:
vector<string> data;
int front, rear;
public:
Queue() : data(MAX), front(-1), rear(-1) {}
bool isEmpty() const
{
return front == -1;
}
bool isFull() const
{
return (r... | ALGO | 0.980788 | 5.307217 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2023-10-23T06:45: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": "25a9496370a1... |
cbc8c0b0-b0f3-4548-b3b1-f73378210301 | moai/moai-dev | src/moai-sim/MOAIMoveConstraint2D-poly-poly.cpp | // Copyright (c) 2010-2017 Zipline Games, Inc. All Rights Reserved.
// http://getmoai.com
#include "pch.h"
#include <moai-sim/MOAIMoveConstraint2D.h>
// uncomment me to debug log
//#define MOAIMOVECONSTRAINT2D_DEBUG
#ifdef MOAIMOVECONSTRAINT2D_DEBUG
#define DEBUG_LOG printf
#else
#define DEBUG_LOG(...)
#endif
//=... | ALGO | 0.999356 | 4.768547 | {
"github_metadata": {
"branch": "develop",
"commit_count": 7166,
"repo_created_at": "2011-04-08T18:37:29.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 954,
"forks": 311,
"issues": 161,
"pull_requests": 4
},
"file_meta": {
"content_id": "c... |
faf21b10-eb61-4ee7-9f31-cbc759cbabe6 | rfabbri/vxd | old/contrib/gel/vsrl/vsrl_raster_dp_setup.cxx | // This is gel/vsrl/vsrl_raster_dp_setup.cxx
#include "vsrl_raster_dp_setup.h"
//:
// \file
#include <vsrl/vsrl_dynamic_program.h>
#include <vsrl/vsrl_image_correlation.h>
#include <vsrl/vsrl_intensity_token.h>
#include <vsrl/vsrl_parameters.h>
#include <vsrl/vsrl_token.h>
#include <vcl_iostream.h>
// constructor
vsrl... | ALGO | 0.990004 | 5.168223 | {
"github_metadata": {
"branch": "master",
"commit_count": 493,
"repo_created_at": "2016-10-26T01:12:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 16,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e49d883... |
a71de5c2-994a-4850-ba2d-cb1c62997718 | bhavyajain464/AI-Problems-in-C- | Water Jug Problem.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int a,b,target;
cin>>a>>b>>target;
map<tuple<int,int>, int> m;
bool check = false;
vector<tuple<int,int>> path;
queue<tuple<int,int>> q;
q.push(make_tuple(0,0));
while (!q.empty()) {
tuple<int,int> u = q.front();
q.pop();
if (m[make_... | ALGO | 0.999993 | 3.756996 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2020-11-19T09:53: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": "536b03266082... |
bb03b8ab-eabb-4853-b2a4-272bd78c6ed0 | ghostktjMactavish/PHY690Code | CPP/cpp_serial_2d.cpp | #include <iostream>
#include <cmath>
#include <fstream>
#include <chrono>
#define IX(x,y) ((x)+N*(y))
// xxxx
// y
// y
// y
using namespace std;
using namespace std::chrono;
int N = 41;
int nx = N;
int ny = N;
int nt = 10000;
int nit = 50;
float Lx = 2.0;
float Ly = 2.0;
float dx = Lx/(nx-1);
float dy = Ly/... | ALGO | 0.999145 | 4.247818 | {
"github_metadata": {
"branch": "master",
"commit_count": 49,
"repo_created_at": "2021-03-16T22:29:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b4a0c173d... |
250d1b19-2b78-4165-a8fd-7ff260b6d853 | projectescape/cp-archive | GFG/case-specific-sorting-of-strings.cpp | string caseSort(string str, int n) {
string ans = str;
sort(str.begin(), str.end());
int i = 0, j = 0;
while (i < str.size() && !(str[i] >= 'a' && str[i] <= 'z')) i++;
while (j < str.size() && !(str[j] >= 'A' && str[j] <= 'Z')) j++;
for (int k = 0; k < str.size(); k++) {
if (ans[k] >= 'a... | ALGO | 0.999662 | 4.732935 | {
"github_metadata": {
"branch": "master",
"commit_count": 477,
"repo_created_at": "2019-06-25T08:37:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1f106a06... |
07b5b931-2016-4d38-bf85-405ee6905808 | mohammedjasam/Technical-Interview-Guide | HackerRank/quicksort1.cpp | /*
*
* Tag: Implementation
* Time: O(n)
* Space: O(n)
*/
#include <map>
#include <set>
#include <list>
#include <cmath>
#include <ctime>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <cstdio>
#include <vector>
#include <cstdlib>
#include <numeric>
#include <sstream>
#include <iostream>
#... | ALGO | 0.999956 | 4.287574 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2017-04-01T19:15:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 110,
"forks": 34,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "a10d58... |
086c9e83-57a4-4057-b9e9-5941c3a567e5 | slcss/Leetcode | Leetcode62.cpp | // Leetcode62.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include <vector>
using namespace::std;
int uniquePaths(int m, int n)
{
/*vector<vector<int>> grid;
vector<int> line(n,0);
for(int i=0;i<m;++i)
{
grid.push_back(line);
... | ALGO | 0.999668 | 5.623435 | {
"github_metadata": {
"branch": "main",
"commit_count": 48,
"repo_created_at": "2023-02-12T17:03:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "20c55822091... |
1e8f8d3e-68a5-44cf-a9b1-1ef1fd0c8f23 | anico-dev/Data-Structures | Linked List/removalofduplicates.cpp | #include<iostream>
#include<stdlib.h>
#include<string.h>
using namespace std;
struct list
{
int rollno;
char name[50];
int age;
struct list * next;
};
struct list * start=NULL;
void insatend(int item,char name[50],int age)
{
struct list *ptr;
struct list *temp;
ptr=new list;
if(start=... | ALGO | 0.997999 | 3.573582 | {
"github_metadata": {
"branch": "master",
"commit_count": 34,
"repo_created_at": "2018-07-24T17:36: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": "7d6ca355f... |
337cc5fb-cf20-4d3c-bad7-49cbff615a92 | skylord18/lc-sols | Binary Tree - Right Side View - Trivial.cpp | #include<bits/stdc++.h>
using namespace std;
/**
* 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,... | ALGO | 0.99989 | 5.597474 | {
"github_metadata": {
"branch": "main",
"commit_count": 32,
"repo_created_at": "2022-04-18T05:28:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8fb0e5aee4a... |
5f951d86-cfff-4470-8017-29ed9f53f671 | jianfeipan/CodingGame | AChildsPlay.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.
**/
/*
0 up
1 right
2 down
3 left
*/
bool canGo(int direction, int x, int y, string * maze, in... | ALGO | 0.999981 | 3.791098 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2020-04-18T15:48:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "23ccc3b3ed... |
9a235125-a0a4-41b6-925e-51ebfaafc146 | rolandjansky/athena | Reconstruction/egamma/egammaMVACalib/Root/egammaMVALayerDepth.cxx | /*
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#include <egammaMVACalib/egammaMVALayerDepth.h>
#include <cmath>
std::array<float, 4> get_MVAradius(float eta)
{
eta = std::abs(eta);
std::array<float, 4> radius{};
if (eta / 0.025 < 57)
{
static const float
X0IN = 1.6... | ALGO | 0.970234 | 5.618051 | {
"github_metadata": {
"branch": "master",
"commit_count": 100549,
"repo_created_at": "2022-08-07T05:54:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cba77... |
6742118b-0e61-48a9-9729-60e262e97ea8 | Joseeelv/Universidad | 2º Carrera/2º Cuatrimestre/Estructura de Datos No Lineales/EjerciciosExamenÁrboles/ÁrbolPerroflauta.hpp | //Un arbol es perroflauta si tiene mas hijos izquierdos que derechos.
#include <iostream>
#include "../Árboles/Abin.h"
template <typename T>
bool perroflauta(const Abin<T> &A){
if(!A.arbolVacio()){
return perroflauta_rec(A.raiz(),A);
}
}
//Función que calcula el numero de nodos hijos izquierdos y derechos
te... | ALGO | 0.996607 | 3.829824 | {
"github_metadata": {
"branch": "main",
"commit_count": 81,
"repo_created_at": "2024-03-06T12:30:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "356f9835b89... |
7e20cc8a-8475-46cf-879f-7d3c7ca212ca | monero-project/monero | src/ringct/bulletproofs.cc | // Copyright (c) 2017-2024, The Monero Project
//
// 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 o... | ALGO | 0.994032 | 6.758226 | {
"github_metadata": {
"branch": "master",
"commit_count": 12102,
"repo_created_at": "2014-04-30T14:38:28.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 9640,
"forks": 3235,
"issues": 477,
"pull_requests": 247
},
"file_meta": {
"content_id"... |
3d210bd8-e316-4eaa-914c-403ba8753377 | Xilinx/Vitis_Libraries | hpc/L2/src/hw/rtm3d/rtmforward_rbc.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.999335 | 7.013936 | {
"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": "21ce9f... |
883ec8f0-564e-48a7-b5a1-dd370d24b7d3 | yizhang0301/2143---oop-yizhang | oldfile/PO2/MyVector.cpp | #pragma once
#include <iostream>
using namespace std;
template <typename T>
class myVector {
private:
int *vPtr; // int pointer to array
int maxSize; // max size of array
int minSize; // min size of array
int index; // current location to insert or remove
int* _resize(int);
public:
myVector(int... | TOOL | 0.977076 | 4.418378 | {
"github_metadata": {
"branch": "master",
"commit_count": 89,
"repo_created_at": "2018-09-05T17:26:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c5ed0d647... |
f4c681d5-8cc0-424a-b042-2d27035b3c63 | Shubham1727/GfgCoding | Medium/Find the number of islands/find-the-number-of-islands.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
// Function to find the number of islands.
void dfs(int row, int col, vector<vector<char>> &grid, vector<vector<bool>> &vis)
{
vis[row][col] = true;
int n = grid.size();
int m =... | ALGO | 0.999876 | 6.748167 | {
"github_metadata": {
"branch": "main",
"commit_count": 205,
"repo_created_at": "2023-01-05T12:05: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": "080c82301f... |
a17f63d1-f805-4cac-b609-25f56a80ccba | atandritC/Competitive-Programming-Solutions | TLE's CP-31 Sheet/800/A_Serval_and_Mocha_s_Array.cpp | #include <bits/stdc++.h>
using namespace std;
// Define common macros
#define int long long
#define all(x) (x).begin(), (x).end()
#define endl '\n'
#define pb push_back
#define F first
#define S second
#define pii pair<int, int>
#define vi vector<int>
#define vvi vector<vector<int>>
#define vpii vector<pair<int, int>>... | ALGO | 0.99946 | 5.29856 | {
"github_metadata": {
"branch": "main",
"commit_count": 73,
"repo_created_at": "2024-06-09T12:16: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": "fb1ac0f0957... |
c60036c1-176f-4283-b3ac-8b6a107156fa | TheOnlyWei/computer_vision | disjoint_sets.h | // by <NAME> (based on code by <NAME>)
// last modified 09/23/16
// Modified DisjointSets data structure for use in image processing
#ifndef DISJ_SETS_H
#define DISJ_SETS_H
// DisjSets class
//
// CONSTRUCTION: with int representing initial number of sets
//
// ******************PUBLIC OPERATIONS*********************... | ALGO | 0.982154 | 5.418863 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2016-12-13T11:29: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": "50e71b990e... |
ae509838-31e0-4951-809f-36b20442dc17 | hlldwxq/NewLanguage | tests/benchmark/CPP/binarySearch.cpp | #include <cstdlib>
#include <iostream>
#include <algorithm>
#include <chrono>
const size_t RPT = 15000000;
extern "C" {
typedef struct {void * p;} *array;
array newarray(uint64_t);
void setarray(array,uint64_t,uint64_t);
uint64_t getarray(array,uint64_t);
void sort(array arr, uint64_t first, uint64_t last... | TEST | 0.987893 | 4.343209 | {
"github_metadata": {
"branch": "master",
"commit_count": 63,
"repo_created_at": "2020-05-15T08: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": "8ecc9c09e... |
2c215522-fc5e-4c3d-9ffe-de246a1184d0 | milmillin/comp-prog | Spoj/Orderset.cpp | #include <cstdio>
#include <set>
#include <cassert>
#include <ctime>
#include <cstdlib>
using namespace std;
int getRand() {
int tmp = 0;
for (int i = 0; i < 4; i++) {
tmp <<= 8;
tmp |= rand();
}
return tmp;
}
struct node {
int key, prior, size;
node *l, *r;
node(int _key) {
key = _key;
prior = getRa... | ALGO | 0.999562 | 3.867582 | {
"github_metadata": {
"branch": "main",
"commit_count": 27,
"repo_created_at": "2022-02-28T08:15: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": "4c6b9021c58... |
c7026269-bcaa-4b69-ad3e-8c94e1f78080 | kylipoo/algorithm | u_aw1362_healthy_cow/healthy_cow.cpp | #include <iostream>
#include <cstring>
#include <vector>
using namespace std;
const int N =15, M=25;
int needs[M], s[N][M], sum[M];
int n, m;
int main() {
cin >> m;
for(int i=0; i<m; i++) {
cin >> needs[i];
}
cin >> n;
for(int i=0; i<n; i++) {
for(int j=0; j<m; j++) {
... | ALGO | 0.999976 | 3.376015 | {
"github_metadata": {
"branch": "main",
"commit_count": 96,
"repo_created_at": "2022-08-02T14:01: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": "e5c472f3075... |
a8b63e18-e78e-43cf-9e20-c56ab5007bed | BlackBeard009/Competitive-Programming.Sagor | Codeforces/Ad-hok/1712C.cpp | /*#pragma GCC optimize("Ofast,unroll-loops")
#pragma GCC target("avx,avx2,fma")
*/
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define pf push_front
#define ppb pop_back
#define ppf pop_front
#define powr(x,n,p) for(int axy=0 ; axy<p ; axy++){x=x*n;}
#define YES cout<<"YES\n"
#define Yes cout<<"Y... | ALGO | 0.999863 | 3.702699 | {
"github_metadata": {
"branch": "main",
"commit_count": 68,
"repo_created_at": "2022-06-09T06:18:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9dae1afb665... |
dae5b2b7-fccd-4dba-abe4-13be7c8b7d83 | davideberly/GeometricToolsLibrary | GTL/Mathematics/Intersection/2D/IntrLine2Triangle2.h | // Geometric Tools Library
// https://www.geometrictools.com
// Copyright (c) 2025 Geometric Tools LLC
// Distributed under the Boost Software License, Version 1.0
// https://www.boost.org/LICENSE_1_0.txt
// File Version: 0.0.2025.01.28
#pragma once
// The queries consider the triangle to be a solid. The algorithms a... | ALGO | 0.970289 | 7.437485 | {
"github_metadata": {
"branch": "main",
"commit_count": 27,
"repo_created_at": "2025-01-12T23:50:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 11,
"forks": 1,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "09cce73f36... |
2751deec-0ef0-491f-b691-e4cde72440b3 | eae11/algorithm | zyr/algoritm/src/main/java/com/douma/_7_day_排序算法/_912/代码实现_C++.cpp | class Solution {
public:
// 归并排序
vector<int> sortArray(vector<int>& nums) {
vector<int> tmp((int)nums.size(), 0);
mergeSort(nums, 0, (int)nums.size() - 1, tmp);
return nums;
}
void mergeSort(vector<int>& nums, int lo, int hi, vector<int>& tmp) {
if (lo >= hi) return;
... | ALGO | 0.999983 | 5.651442 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2022-08-08T17:45: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": "bfe2027762... |
4fd2a957-e183-4ea2-ab5a-4f6152d90c10 | Joanne0119/DataStructure | recurisive.cpp | #include <iostream>
using namespace std;
// Factorial
int Fac(int n){
if(n == 0) return 0;
else if(n == 1) return 1;
else {
n = n*Fac(n-1);
return n;
}
}
//Fibonacci Number
int Fib(int n ){ //Recurisive
if(n == 0) return 0;
else if(n == 1) return 1;
else {
n =... | ALGO | 0.999493 | 3.506014 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-11-03T11:32: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": "66c7ab881d4c... |
2981269b-9c90-468a-b3f7-319834488917 | alexfreud/winamp | Src/Plugins/General/gen_ml/ml_imagefilter.cpp | #include "./ml_imagefilter.h"
#include <strsafe.h>
typedef struct _IMAGEFILTER
{
GUID uid;
MLIMAGEFILTERPROC proc;
LPARAM param;
UINT flags;
LPWSTR pszName;
} IMAGEFILTER;
typedef struct _IMAGEFILTERMGNR
{
IMAGEFILTER *filters;
INT count;
INT allocated;
INT allocstep;
} IMAGEFILTERM... | TOOL | 0.938944 | 6.38394 | {
"github_metadata": {
"branch": "community",
"commit_count": 9,
"repo_created_at": "2024-09-24T14:31:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 435,
"forks": 3010,
"issues": 0,
"pull_requests": 6
},
"file_meta": {
"content_id": "0c... |
7bce6f9a-b04f-44bc-8c80-81f6ff43bb90 | domz1/SourceFlyFF | Program/boost_1_34_1/boost_1_34_1/boost/xpressive/proto/proto.hpp | ///////////////////////////////////////////////////////////////////////////////
/// \file proto.hpp
/// The proto expression template compiler and supporting utilities.
//
// Copyright 2004 <NAME>. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http... | TOOL | 0.917944 | 7.17178 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2013-10-15T13:15:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 31,
"forks": 24,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c5a0d87c... |
d8ef2736-184e-4168-a6ed-d51def46ebe1 | Diegojacober/estrutura-de-dados | sintaxe_c++/jogo_da_forca/main.cpp | #include <iostream>
#include <cstdlib> // Para a função rand()
#include <ctime> // Para a função time()
#include <vector>
#include <algorithm>
#include <locale>
using namespace std;
vector<string> letras_tentadas;
int chances = 6;
string sortearPalavra()
{
string palavras[] = {"CARRO", "MARCO", "TESTE"};
s... | TOOL | 0.964083 | 4.22401 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2024-02-04T14:17:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5bd5c957cad... |
3ef7ec41-f21a-4071-bea4-ab686e9475d6 | THISISDAEKYUNG/assignment_4 | assignment_9.cpp | #include <iostream>
using std::cin;
using std::cout;
using std::endl;
class hanoi {
public:
hanoi(int number_of_disks);
void print_hanoi(int number_of_disks, int source, int destination, int via);
void print_total_move();
//You can add your own member functions
private:
int num_disks_tower0;
... | ALGO | 0.999798 | 5.055503 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2025-03-24T07:07: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": "c8cc4f8fe52... |
f929a301-6190-4a9e-91d4-932cd31e7c1b | ishandutta2007/codeforces-w | weakesttopology/normal/1670/F.cpp | #include <algorithm>
#include <cassert>
#include <iostream>
#include <numeric>
#include <utility>
#include <vector>
#include <type_traits>
template <unsigned P>
struct Z {
unsigned value;
constexpr Z() : value(0) {}
template <typename T, typename = std::enable_if_t<std::is_integral<T>::value>>
constexpr Z(T... | ALGO | 0.998132 | 4.51535 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:34: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": "239693b9efff... |
cbab2455-76fe-4fc8-9000-4dfbb168abe3 | Mmounaji176/cpp_modules | module09/ex02/PmergeMe.hpp | #ifndef PMERGEME_HPP
#define PMERGEME_HPP
#include <iostream>
#include <fstream>
#include <string>
#include <list>
#include <vector>
#include <algorithm>
class PmergeMe
{
private:
std::list<int> list;
std::vector<int> vector;
public:
PmergeMe();
~PmergeMe();
PmergeMe(... | TOOL | 0.960472 | 4.545627 | {
"github_metadata": {
"branch": "main",
"commit_count": 44,
"repo_created_at": "2023-04-30T10:27:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0cef1719a05... |
3a4ec78c-5eeb-4624-a5b6-47d26743aec4 | lawenliu/CodeInterview | InterviewQuestions/LeetCode2/47_PermuteUnique.cpp | /*********************************************************************
* Given a collection of numbers that might contain duplicates, return
* all possible unique permutations.
* For example,
* [1, 1, 2] have the following unique permutations:
* [1, 1, 2], [1, 2, 1] and [2, 1, 1].
**************************************... | ALGO | 0.999906 | 6.662711 | {
"github_metadata": {
"branch": "master",
"commit_count": 53,
"repo_created_at": "2016-06-15T18:31:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "ef642ffde... |
43d72126-b880-4e03-a800-271870e96972 | Vatsalya-24/DSA | String/convert_string_integer.cpp | #include <iostream>
#include <string>
#include<vector>
using namespace std;
class Solution {
public:
std::string multiply(std::string num1, std::string num2) {
if (num1 == "0" || num2 == "0") {
return "0";
}
int len1 = num1.size();
int len2 = num2.size();
vector... | ALGO | 0.999929 | 5.798041 | {
"github_metadata": {
"branch": "main",
"commit_count": 31,
"repo_created_at": "2023-08-07T16:04:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "22fc561b89c... |
35ab62bf-3c60-4f93-93af-a9f6c874a8a2 | marcinlos/iga-ads | include/ads/lin/dense_matrix.hpp | // SPDX-FileCopyrightText: 2015 - 2023 <NAME> <<EMAIL>>
// SPDX-License-Identifier: MIT
#ifndef ADS_LIN_DENSE_MATRIX_HPP
#define ADS_LIN_DENSE_MATRIX_HPP
#include <iomanip>
#include <iostream>
#include <vector>
#include "ads/lin/lapack.hpp"
namespace ads::lin {
class dense_matrix {
private:
std::vector<double>... | TOOL | 0.984097 | 6.966109 | {
"github_metadata": {
"branch": "develop",
"commit_count": 713,
"repo_created_at": "2016-05-08T23:31:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 18,
"forks": 9,
"issues": 12,
"pull_requests": 3
},
"file_meta": {
"content_id": "29a06... |
76096387-c2ed-40c0-985a-c6182ab0c4eb | LovelyEther/ICPC | Codeforces/Educational Codeforces Round 123 (Rated for Div. 2)/C.cpp | #include <bits/stdc++.h>
using namespace std;
#define N 5050
int t, n, x, a[N], g[N];
int main() {
// freopen("in.txt", "r", stdin);
scanf("%d", &t);
while (t --) {
scanf("%d %d", &n, &x);
for (int i = 1; i <= n; i ++) scanf("%d", &a[i]);
for (int i = 1; i <= n; i ++) {
int sum = 0;
for (int j = 1; j <... | ALGO | 0.999914 | 3.848752 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2022-08-07T10:01: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": "2fda7ec2957... |
a6faccab-6436-47eb-bddd-bef5d0d94afd | SuhailRafi/NASA-Astrobee-Robot-Simulator-JAXA-KRPC-2023 | astrobee/src/astrobee/gnc/matlab/code_generation/sharedutils/ophdecbiohdblnoh_xzlarf.cpp | //
// File: ophdecbiohdblnoh_xzlarf.cpp
//
// Code generated for Simulink model 'est_estimator'.
//
// Model version : 1.1142
// Simulink Coder version : 8.11 (R2016b) 25-Aug-2016
// C/C++ source code generated on : Tue Oct 16 10:06:07 2018
//
#include "rtwtypes.h"
#include "imopjmglppphcbai_xg... | ALGO | 0.982178 | 4.243852 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-06-26T23:47:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a28cbf5934e6... |
7efa64e7-b694-4b0b-bc4a-c4105e7507a1 | BaronPipistron/mai-studying | 3-sem/OS (operating-systems)/lab-4/run.cpp | #include <iostream>
#include "third_party/eulers_number/include/calculate_eulers_num.h"
#include "third_party/prime_numbers/include/prime_count.h"
int main(int argc, char** argv) {
if (argc < 3 || argc > 4) {
std::cerr << "Invalid input data!\nExample:\nmake mode=1 a=1 b=1\nor\nmake run mode=2 a=1" << std... | ALGO | 0.997081 | 4.559675 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2024-04-20T10:06:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e960c46634e... |
c46616a1-169b-41ec-b039-c4ef3e7c1aa5 | jki14/competitive-programming | 2013/MUTC/1/proG.cpp | #include<iostream>
#include<sstream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<ctime>
#include<climits>
#include<algorithm>
#include<vector>
#include<string>
#include<queue>
#include<list>
#include<bitset>
#include<set>
#include<map>
#include<functional>
#include<numeric>
#include<ut... | ALGO | 0.999837 | 4.059475 | {
"github_metadata": {
"branch": "master",
"commit_count": 363,
"repo_created_at": "2019-01-21T03:40:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f453f37a... |
40f61d18-e72d-47fe-a0fc-1b76b646a40e | ivarhaugerud/FYS3150 | project5/code/MainClass.hpp | #ifndef MAINCLASS
#define MAINCLASS
//import what we need
#include <iostream>
#include <cmath>
#include <armadillo>
#include <cstdio>
#include <string>
#include <iomanip>
#include <fstream>
//make it easier
using namespace std;
using namespace arma;
class MainClass
{
//the public variables
public:
//writing to fi... | ALGO | 0.987026 | 4.044468 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2019-01-14T08:15:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c1cf5749b5... |
eb7cb8a5-c9b3-4119-8e64-6b7ffb67dc77 | EpsteinLab/Survival-MC | main.cpp | #include <math.h>
#include <iostream>
#include <stdlib.h>
#include <list>
#include <array>
#include <ctime>
#include <time.h>
#include <random>
#include <string>
#include <fstream>
#include <limits.h>
#include <algorithm>
#include "include/GrowArray.h"
#include "include/ZArray.h"
#include "include/Irid.h"
#include "in... | ALGO | 0.99944 | 4.498334 | {
"github_metadata": {
"branch": "main",
"commit_count": 35,
"repo_created_at": "2020-11-11T15:28:20.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "067f84909042... |
e44774e0-3bde-4991-86a6-59d41662c552 | mo-ayman/Lexical-Syntax-Analyzer | ParserGenerator/parserGenerator.cpp | #include <sstream>
#include <iomanip>
#include "ParsingCFG/ParsingCFG.h"
#include "Parser/Parser.h"
#include "Predictive_PT/PPT.h"
#include "FirstAndFollow/First.h"
#include "FirstAndFollow/Follow.h"
#include "ParsingCFG/AdaptCFG.h"
using namespace std;
static void printTable(
const std::unordered_map<Definiti... | TOOL | 0.956396 | 6.003955 | {
"github_metadata": {
"branch": "main",
"commit_count": 178,
"repo_created_at": "2023-11-26T13:54:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "84b670238b... |
9a146fa5-8119-4bec-9993-1a3d128567e9 | kaushal02/CP | Online-Judges/SPOJ/AGGRCOW.cc | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
const int LIM = 1E9 + 1;
bool canKeepDistance(vector <int>& a, int count, int distance) {
if (a.empty()) {
return count == 0;
}
int used = 1, last_pos = a[0];
for (int i = 1; i < a.size(); i++) {
if (a[i] -... | ALGO | 0.999999 | 4.96616 | {
"github_metadata": {
"branch": "master",
"commit_count": 312,
"repo_created_at": "2016-10-11T20:09:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 26,
"forks": 13,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bfc509... |
1348d9a4-12c3-4780-9fb3-f8765c4a0226 | PlatonYadrov/Second_semester | cpp/Second_contest/Stack.h | #include <iostream>
#include <deque>
#ifndef STACK_H
#define STACK_H
template <class T, class Container = std::deque<T>>
class Stack {
public:
Container stack;
Stack() = default;
Stack(const Container& other) { // NOLINT
for (auto to : other) {
stack.push_back(to);
}
}
template <class Iter>... | TOOL | 0.912799 | 6.566314 | {
"github_metadata": {
"branch": "main",
"commit_count": 115,
"repo_created_at": "2023-03-21T17:40:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2b367e3a6d... |
5cf5070f-2d05-48b8-bd5e-a83a098920f4 | LarsenAster2892/CSUMB-CST238 | Assignments/Assignment 4/BinaryTree.cpp | //********************************************************
// File Name : BinTree.cpp
// Author : <NAME>
// Assignment : Number 4
// Date Due : December 10, 2003 (5:30 PM)
// Description : Class member functions for Binary Tree Class
// ----------------------------------------------------------- ... | ALGO | 0.994588 | 3.587536 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2016-06-19T22:09:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0442ea998f... |
77572fd5-8b4d-4d1c-a5ea-3766d9efb904 | Samuel-2000/VUT-FIT-BIT-Projekty | IZG/Cviceni #5, Zobrazovani 2D krivek v rastru/2020L/student.cpp | /******************************************************************************
* Laborator 04 Krivky - Zaklady pocitacove grafiky - IZG
* <EMAIL>
*
*
* Popis: Hlavicky funkci pro funkce studentu
*
* Opravy a modifikace:
* - <EMAIL>
*
*/
#include "student.h"
#include "globals.h"
#include "main.h"
#include ... | ALGO | 0.970321 | 3.81742 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2023-02-21T13:55: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": "e5b20eb997... |
ea2a2529-b599-465e-930b-26ac34738a40 | cryptobiu/MPC-Benchmark | MaliciousYaoBatch/apps/OnlineP2/AppOnlineP2.cpp | #include <boost/thread/thread.hpp>
#include <lib/include/common/CommonMaliciousYao.hpp>
#include <lib/include/primitives/CommunicationConfig.hpp>
#include <lib/include/primitives/CryptoPrimitives.hpp>
#include <libscapi/include/circuits/GarbledCircuitFactory.hpp>
#include <libscapi/include/cryptoInfra/Protocol.hpp>
#in... | ALGO | 0.991729 | 4.695075 | {
"github_metadata": {
"branch": "master",
"commit_count": 35,
"repo_created_at": "2018-07-19T10:21:29.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 12,
"forks": 6,
"issues": 5,
"pull_requests": 0
},
"file_meta": {
"content_id": "586424062... |
b9624f07-c02a-4c09-8624-67a17649ecc3 | Otrebus/timus | 1805.cpp | /* 1805. Chapaev and a Cipher Grille - http://acm.timus.ru/problem.aspx?num=1805
*
* Strategy:
* We assign the numbers in turn to the grille as follows: assume that the first i - 1 numbers have
* been assigned, and we know that this grille is at rank m. In order to assign position i, we count
* how many grilles st... | ALGO | 0.999958 | 4.129241 | {
"github_metadata": {
"branch": "master",
"commit_count": 601,
"repo_created_at": "2015-07-08T14:22:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 83,
"forks": 28,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3fc14a... |
ee2a83c6-8f2a-4882-8b3d-822743b66208 | saideep-arikontham/Video-Special-Effects-using-OpenCV | src/faceDetect.cpp | /*
<NAME>
Spring 2024
CS 5330 Computer Vision
Functions for finding faces and drawing boxes around them
The path to the Haar cascade file is define in faceDetect.h
*/
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <opencv2/opencv.hpp>
#include "faceDetect.h"
/*
Arguments:
cv::Mat grey ... | ALGO | 0.931724 | 5.981721 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2025-01-17T02:06:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e50534b9b6b... |
2dd4ad5b-7771-494e-89a2-a77a1f856d62 | excellence-center-1/Karlen-Matevosyan | C++/endWith5.cpp | #include <iostream>
using namespace std;
int main() {
int n;
cout << "Enter the size of the array: ";
cin >> n;
int arr[n];
cout << "Enter the elements of the array:" << endl;
for (int i = 0; i < n; ++i) {
cout << "Element " << i + 1 << ": ";
cin >> arr[i];
}
int sum =... | ALGO | 0.99843 | 4.759851 | {
"github_metadata": {
"branch": "master",
"commit_count": 131,
"repo_created_at": "2022-11-09T18:25:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f38fc573... |
d138ed5c-0682-4831-97cb-fd23396ec6ad | peeyushy95/SPOJ | CHOCOLA.cpp | /*
AUTHOR : <NAME>
Problem : http://www.spoj.com/problems/CHOCOLA/
*/
#include<bits/stdc++.h>
using namespace std; typedef long long ll; typedef pair<int,int> grp;
inline ll power(ll a,ll b) { ll r=1; while(b){ if(b&1) r=r*a ; a=a*a ; b>>=1;} return r;}
inline ll power(ll a,ll b,ll m){ ll r=1; while(b)... | ALGO | 0.999851 | 3.128412 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2014-09-20T02:38:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "88f773b91... |
6db53028-cd56-4fd7-8c27-312e933e0568 | andreiavrammsd/archive | cpp-learn/stl/threads_and_tasks/example_threads_share_data.cpp | #include <vector>
#include <iostream>
#include <thread>
#include <mutex>
#include <algorithm>
#include <condition_variable>
#include <atomic>
int main() {
// Generate vector of numbers
std::vector<int> numbers = {};
for (int i = 1; i <= 1000; i++) {
numbers.push_back(i);
}
// Vector to col... | ALGO | 0.998728 | 6.295049 | {
"github_metadata": {
"branch": "master",
"commit_count": 52,
"repo_created_at": "2023-02-12T19:07: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": "f409edf14... |
462fe908-74b5-43ee-b79f-579a3c5e6918 | Aashimajain18/MyCodes | graphs/prim's algo.cpp |
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<cmath>
#include<deque>
#include <utility>
#include<stack>
#include<list>
#include<unordered_map>
#include<queue>
#include<map>
#include<set>
using namespace std;
class Graph {
//adjacency list
std::vector<pair<int, int> > *l;
int V;
... | ALGO | 0.99991 | 3.919273 | {
"github_metadata": {
"branch": "master",
"commit_count": 226,
"repo_created_at": "2020-05-10T15:48:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cc3d8862... |
25f824dd-53bf-4107-9afa-51561bbdcc94 | Dai0526/Algorithm | Algorithm/OnlineAssessment/LeetCode/Hard/295_FindMedianFromDataStream.cpp | class MedianFinder {
public:
/** initialize your data structure here. */
MedianFinder() {
}
void addNum(int num) {
m_fstHalf.push(num);
// balance two head, such the top of fst had and top of snd half are adjacent numbers
m_sndHalf.push(m_fstHalf.top());
m_f... | ALGO | 0.999996 | 6.213078 | {
"github_metadata": {
"branch": "master",
"commit_count": 515,
"repo_created_at": "2020-06-13T04:23: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": "a347c99b... |
4fb8b965-12a7-46bb-8b80-51832edbdfde | wendajiang/leetcode | cpp/301.remove-invalid-parentheses.cpp | /*
* [301] Remove Invalid Parentheses
*
* https://leetcode.com/problems/remove-invalid-parentheses
*
* Hard (35.00%)
* Total Accepted:
* Total Submissions:
* Testcase Example: '"()())()"'
*
*
* Remove the minimum number of invalid parentheses in order to make the input
* string valid. Return all possible r... | ALGO | 0.999581 | 5.864595 | {
"github_metadata": {
"branch": "master",
"commit_count": 510,
"repo_created_at": "2017-07-02T16:19:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b1624434... |
1ab45cb0-e29f-45b5-b32d-34744a3d99f0 | ishandutta2007/codeforces-g | golovanov399/normal/1060/F.cpp | #include <bits/stdc++.h>
#define itn int
#define all(x) (x).begin(), (x).end()
#define make_unique(x) sort(all((x))); (x).resize(unique(all((x))) - (x).begin())
#define random_shuffle(...) shuffle(__VA_ARGS__, rng)
#define rand() rng()
using namespace std;
inline int nxt() {
int x;
scanf("%d", &x);
return x;
}
... | ALGO | 0.999713 | 4.573342 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:55:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2f03c848141c... |
d1485a7e-3693-4d23-be4b-b37fd08dc79e | bustercopley/advent2021 | src/06.cpp | #include "precompiled.h"
auto regex = re::regex(R"(^(\d+),(\d+)$|^(\d+(?:,\d+)*)$)");
auto regex2 = re::regex(R"((\d+)(.*))");
void parts(std::istream &stream, int part) {
bool test = false;
ll result = 0;
ll expected = -1;
vec<ll> hist(9);
for (ss line; std::getline(stream, line);) {
if (auto m = matc... | ALGO | 0.982246 | 4.76734 | {
"github_metadata": {
"branch": "main",
"commit_count": 49,
"repo_created_at": "2021-12-03T18:15: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": "50e5c2be942... |
6c679a04-b557-44b3-b9d7-fec1efa7e0e8 | dbd2h/bakjoon-solving | 03-boj-middle1/611/004-14502.cpp | #include <iostream>
#include <queue>
using namespace std;
int lab[8][8]={0};
int wallMake[3][2]={0};
int maxSpace=0;
void bfs(int n, int m)
{
int check[8][8]={0};
int copyLab[8][8]={0};
for(int i=0;i<n;i++)
{
for(int j=0;j<m;j++)
{
copyLab[i][j]=lab[i][j];
}
}
... | ALGO | 0.999905 | 3.456089 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2022-07-30T04:20: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": "684e1fd6cf5... |
76def654-5471-4ff8-a551-57b64d4c254b | h3902340/leetcode | 2818.cpp | #include <vector>
#include <iostream>
using namespace std;
bool done = false;
const int PRIME_SCORE_SIZE = 100001;
vector<int> primeScore(PRIME_SCORE_SIZE, 0);
struct NumInfo
{
int value;
long left;
long right;
};
class Solution
{
private:
int powModulo(int a, int b, int m)
{
if (b == 0)
... | ALGO | 0.999982 | 5.408247 | {
"github_metadata": {
"branch": "main",
"commit_count": 478,
"repo_created_at": "2025-02-25T15:17:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f7276ec1fc... |
8045e61a-eefa-4d27-9f98-734e83eb0029 | leafspace/Learn.Study | Leetcode/#0837.新21点【UNFINISH】.cpp | /*
爱丽丝参与一个大致基于纸牌游戏 “21点” 规则的游戏,描述如下:
爱丽丝以 0 分开始,并在她的得分少于 K 分时抽取数字。 抽取时,她从 [1, W] 的范围中随机获得一个整数作为分数进行累计,其中 W 是整数。 每次抽取都是独立的,其结果具有相同的概率。
当爱丽丝获得不少于 K 分时,她就停止抽取数字。 爱丽丝的分数不超过 N 的概率是多少?
示例 1:
输入:N = 10, K = 1, W = 10
输出:1.00000
说明:爱丽丝得到一张卡,然后停止。
示例 2:
输入:N = 6, K = 1, W = 10
输出:0.60000
说明:爱丽丝得到一张卡,然后停止。
在 W = 10 的 6 种可能下... | ALGO | 0.999836 | 5.267837 | {
"github_metadata": {
"branch": "master",
"commit_count": 197,
"repo_created_at": "2018-07-30T06:28:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 5
},
"file_meta": {
"content_id": "cc77e24f... |
6ee9acfd-c807-471d-b712-caabd7a4d0bd | leag37/SumEngine | SumEngine/SumMath/include/SumVector3.inl | //*************************************************************************************************
// Title: SumVector3.inl
// Author: <NAME>
// Description: Vector3 mathematics
//*************************************************************************************************
//**************************************... | TOOL | 0.988313 | 6.914414 | {
"github_metadata": {
"branch": "master",
"commit_count": 81,
"repo_created_at": "2012-10-08T04:26:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 19,
"pull_requests": 0
},
"file_meta": {
"content_id": "cb413d95... |
3402dfec-4577-419a-a77c-f5e3e4402772 | thcy/CSES-Solutions | Graph Algorithms/Mail Delivery (1691)/rainboy_2.cpp | /*
https://cses.fi/problemset/task/1691
Mail Delivery
practice with Dukkha
*/
#include <stdio.h>
#define N 100000
#define M 200000
struct L {
struct L *next;
int h;
} *aa[N + 1];
int ii[M + 1], jj[M + 1];
char removed[M + 1];
struct L *new_L(int h) {
static struct L l91[M * 2 + 1 + M], *l = l9... | ALGO | 0.999975 | 3.727118 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2019-08-15T05:56:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 115,
"forks": 50,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "0c92cc... |
94840261-076c-4408-9e74-11d929c5274f | lilyanagb/Introduction-to-programming | UP_20-21_fn62599_d2/fn62599_d2_1_VC.cpp | /**
*
* Solution to homework assignment 2
* Introduction to programming course
* Faculty of Mathematics and Informatics of Sofia University
* Winter semester 2020/2021
*
* @author <NAME>
* @idnumber 62599
* @task 1
* @compiler VC
*
*/
#include <iostream>
#include <cmath>
using namespace std;
int main() {
int countOf... | ALGO | 0.999918 | 4.246024 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-07-14T15:33: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": "ed730c853b2d... |
fe28c9a3-46c9-49ea-b9ec-09ac600b7ad5 | Goodnameisfordoggy/College-assignment | numericalComputationMethod/上机实验/2.方程求根/牛顿迭代法.cpp | /***
* @Author: HDJ
* @StartDate: please fill in
* @LastEditTime: 2024-05-10 15:19:31
* @FilePath: \c++\algorithmsAnalysisAndDesign\上机实验\2.方程求根\牛顿迭代法.cpp
* @Description:
* @
* @ * 写字楼里写字间,写字间里程序员;
* @ * 程序人员写程序,又拿程序换酒钱。
* @ * 酒醒只在网上坐,酒醉还来网下眠;
* @ * 酒醉酒醒日复日,网上网下年复年。
* @ * 但愿老死电脑间,不愿鞠躬老板前... | ALGO | 0.999978 | 4.430366 | {
"github_metadata": {
"branch": "main",
"commit_count": 122,
"repo_created_at": "2023-09-26T05:35:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c0c446d802... |
b4f1e3ff-d0f2-4422-a8e4-080dde919812 | lbv/pc-code | solved/l-n/light-more-light/light.cpp | #include <cmath>
#include <cstdio>
#include <vector>
using namespace std;
#define cFor(t,v,c) for(t::const_iterator v=c.begin(); v != c.end(); ++v)
typedef unsigned int u32;
typedef vector<int> IV;
// Number Theory
#define IsComp(n) (_c[n>>6]&(1<<((n>>1)&31)))
#define SetComp(n) _c[n>>6]|=(1<<((n>>1)&31))
namespa... | ALGO | 0.999918 | 4.164348 | {
"github_metadata": {
"branch": "master",
"commit_count": 1269,
"repo_created_at": "2012-06-17T09:14:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 15,
"forks": 16,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b2bb0... |
0f5b0f01-b40b-49f3-b8b5-41b4a5796691 | mdruhulkuddus/Code-Library | Problem Solving/URI Online Judge/beginner/Salary-Increase.cpp | #include<bits/stdc++.h>
using namespace std;
int main()
{
double salry,newSalry,earn;
int percen;
cin>>salry;
if(salry>=0 && salry<=400.00)
{
percen=15;
newSalry=((salry*percen)/100)+salry;
earn=newSalry-salry;
cout<<"Novo salario: "<<setprecision(2) <<fixed<<newSalry <<endl;
cout<<"Reajuste ganho:... | ALGO | 0.998364 | 3.4746 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2023-02-04T05:19:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d8a4243efe... |
b4c3afa9-fea0-4509-9773-beab5fa74207 | ufz/ogs | NumLib/Fem/ShapeFunction/ShapeTri3.h | /**
* \file
* \author <NAME>
* \date 2013-08-13
*
* \copyright
* Copyright (c) 2012-2025, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/... | TOOL | 0.964733 | 7.551941 | {
"github_metadata": {
"branch": "master",
"commit_count": 27875,
"repo_created_at": "2011-05-04T14:09:57.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 117,
"forks": 239,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "992... |
645837b3-071a-482a-8f60-44bcb3fea9c7 | yosupo06/library-checker-problems | data_structure/double_ended_priority_queue/verifier.cpp | // https://github.com/MikeMirzayanov/testlib/blob/master/checkers/wcmp.cpp
// The MIT License (MIT)
// Copyright (c) 2015 <NAME>
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without ... | ALGO | 0.991935 | 4.723382 | {
"github_metadata": {
"branch": "master",
"commit_count": 3115,
"repo_created_at": "2019-05-30T20:49:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 589,
"forks": 137,
"issues": 98,
"pull_requests": 3
},
"file_meta": {
"content_id": "92... |
4e63881d-9f44-4aea-9d07-fe1e651c15c8 | IntelSDM/RustDMACheat | RustDMA/Misc/Vector.h | #pragma once
class Vector2
{
public:
Vector2();
Vector2(float _x, float _y);
~Vector2();
float x, y;
Vector2 operator *(Vector2 a);
Vector2 operator /(Vector2 a);
Vector2 operator +(Vector2 a);
Vector2 operator -(Vector2 a);
bool operator ==(Vector2 a);
bool operator !=(Vector2 a);
bool IsZero() const;
... | TOOL | 0.919405 | 5.736439 | {
"github_metadata": {
"branch": "master",
"commit_count": 103,
"repo_created_at": "2023-12-11T16:36:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 271,
"forks": 64,
"issues": 11,
"pull_requests": 0
},
"file_meta": {
"content_id": "d184... |
d7577add-9543-40fa-9dea-dbea45200903 | Navarnova/1semester-Homework | 2021.11.15 - 1Test/Task7.cpp | #include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
int x1 = 0;
int y1 = 0;
int x2 = 0;
int y2 = 0;
int p1 = 0;
int p2 = 0;
cin >> x1 >> y1 >> x2 >> y2;
if ((x1 % 2 == 1 && y1 % 2 == 1) || (x1 % 2 == 0 && y1 % 2 == 0))
{
p1 = 1;
}
else
{
p1 = 0;
}
if ((x2 % 2 == 1 && y2 % ... | ALGO | 0.999907 | 3.413965 | {
"github_metadata": {
"branch": "main",
"commit_count": 29,
"repo_created_at": "2021-09-20T19:00: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": "fd3cf3898e5... |
1d8f5ac0-9530-4ad7-9164-1beee5fc7888 | kartik-1799/interviewbit_problems | Trees and maps/Invert the Binary Tree/solution.cpp | /**
* Definition for binary tree
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
/*void swap(TreeNode* x, TreeNode* y){
//if(!x & !y) {cout<<1<<endl; return;}
//if(x && y){
TreeNode* temp = x;... | ALGO | 0.999997 | 5.672209 | {
"github_metadata": {
"branch": "master",
"commit_count": 43,
"repo_created_at": "2020-06-25T13:00: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": "0d0588dd6... |
b1b35b6d-8aa6-4259-a8b2-8f3a53d90c57 | JayTheferret/GIP_Praktikums-Aufgaben | GIP_03/INF-03/Quelle.cpp | #include <iostream>
using namespace std;
int main()
{
int tag1 = 0;
int monat1 = 0;
int jahr1 = 0;
cout << "Bitte geben Sie den Tag des ersten Datums ein: ";
cin >> tag1 ;
cout << "Bitte geben Sie den Monat des ersten Datums ein: ";
cin >> monat1;
cout << "Bitte geben Sie das Jahr des ersten Datums ein: ";
c... | ALGO | 0.999743 | 3.711747 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2019-12-11T10:47: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": "16dbee1e8... |
c2d8c1b6-8938-4320-ac0b-9bd86d1cb606 | RezowanTalukder/Combinatorial-Optimization | cruscal.cpp | #include<bits/stdc++.h>
using namespace std ;
typedef pair<int,int>pii ;
int parent[100] ;
vector< pair<int,pii> > V ;
vector< pair<int,pii> > T ;
int findSet(int i)
{
if(i==parent[i]) return i ;
else return findSet(parent[i]) ;
}
void union_set(int u , int v)
{
parent[v] = u ;
}
void cruskal()
{
... | ALGO | 0.999994 | 4.74049 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2018-01-18T09:21:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0ffe4dae1... |
696c8145-3371-467f-87f8-c23667756f34 | GitHub-Traveler/codeforces | 2110/b.cpp | #include <bits/stdc++.h>
#include <stack>
using namespace std;
using i64 = long long;
using u64 = unsigned long long;
using u32 = unsigned;
int main() {
int t;
cin >> t;
while (t--) {
string s = "";
cin >> s;
stack<int> stk;
int depth = 0;
int first_right_brk = -1;
... | ALGO | 0.999943 | 4.625679 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2025-06-08T13:28: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": "3d463d6d3ffe... |
e1eab90f-70bc-428c-afcd-6516ba5a2e21 | peng-yq/the-way-to-find-a-job | leetcode/c++/419_battleships_in_a_board.cpp | // https://leetcode.cn/problems/battleships-in-a-board
#include <bits/stdc++.h>
using namespace std;
class Solution {
public:
int countBattleships(vector<vector<char>>& board) {
int row = board.size(), col = board[0].size(), res = 0;
function<void(int, int)> dfs = [&](int i, int j) {
i... | ALGO | 0.999744 | 6.002379 | {
"github_metadata": {
"branch": "main",
"commit_count": 561,
"repo_created_at": "2023-10-03T08:36:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 62,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "38886b9fc... |
9042ab7d-e193-4c47-b461-4c892fd7c0e6 | sohardforaname/ACM_ICPC_practice | codeforces/711/711D.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 2e5 + 5;
const ll mod = 1e9 + 7;
typedef long long ll;
ll pow(ll a, ll b, ll p)
{
ll res = 1;
while (b)
{
if (b & 1)
res = res * a % p;
a = a * a % p;
b >>= 1;
}
return res;
}
vector... | ALGO | 0.999898 | 4.146782 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2020-03-31T08:19:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "55e598de0... |
e76b1c2f-b5b2-451c-bef9-b02e527bf076 | ishandutta2007/codeforces-s | spy20051623/normal/1493/C.cpp | #include <bits/stdc++.h>
using namespace std;
#define INF 0x3f3f3f3f
int main() {
// freopen("in.txt", "r", stdin);
int t, k, n, mk, cnt[26], i, j, minm, r, sum, num;
string s1, s2;
cin >> t;
while (t--) {
cin >> n >> k;
cin >> s1;
s2 = s1;
if (n % k)
cout << -1 << endl;
else {
memset(cnt, 0, sizeo... | ALGO | 0.999576 | 3.20845 | {
"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": "a57f19c5b035... |
37da2d52-7377-49f3-ae56-4dae16aab441 | neverlee/acm | tyvj/accepted/P1009.cpp | #include<cstdio>
char cube[6][8]={ "..+---+",
"./ /|",
"+---+ |",
"| | +",
"| |/.",
"+---+.." };
int row, col, map[50][50];
int height=0, width;
int imax( int a, int b ) { return a>b?a:b; }
void GetWidth() {
width = 2*row+4*col+1;
}
void GetHeight( int x, int y ) {
height = ima... | ALGO | 0.999871 | 3.190327 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2017-07-16T07: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": "2b67cca3d7... |
dec2265a-240a-4059-aef0-d48dff7a6f7a | Pradip-Karmakar/MCA | MCA SEM 3/DS/Inorder.cpp | #include<iostream>
using namespace std;
struct Tree {
struct Tree *left;
int data;
struct Tree *right;
};
class Stack {
int top;
struct Prev {
struct Tree *node;
struct Prev *next;
};
public:
struct Prev *stack,*head = NULL,*temp_Prev = NULL;
Stack()
{
... | ALGO | 0.99997 | 4.05031 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2020-09-01T09:47:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f8ac36ffbd... |
2e0a8f6a-cc46-44ef-b36f-266e2d5cc58c | dotnet/wpf | src/Microsoft.DotNet.Wpf/src/WpfGfx/core/geometry/BezierFlattener.h | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
//+-----------------------------------------------------------------------------
//
//
// $TAG ENGR
// $Mod... | TOOL | 0.968461 | 6.903789 | {
"github_metadata": {
"branch": "main",
"commit_count": 6436,
"repo_created_at": "2018-10-19T01:55:23.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 7391,
"forks": 1216,
"issues": 1307,
"pull_requests": 190
},
"file_meta": {
"content_id": ... |
2b90144e-4fa9-4513-b9b6-b4da2ea4083c | JakeFRCSE/Cpp-Programming-Assignment | exercise_11.cpp | #include <iostream>
#include <vector>
#define PI 3.14
using namespace std;
class Geom {
protected:
int type;
public:
enum {RECT, CIRCLE, SQUARE, POINT};
Geom(int t): type(t) {}
Geom() {}
virtual float area()=0;
};
class Point: public Geom {
float x, y;
public:
Point(float a, float b): ... | TOOL | 0.989256 | 3.467382 | {
"github_metadata": {
"branch": "main",
"commit_count": 49,
"repo_created_at": "2024-03-11T10:31: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": "82ec19b92bc... |
8dcf17d8-ebd0-43a9-8599-b21802edcd26 | InsightSoftwareConsortium/ITKTubeTK | src/Segmentation/itktubeRidgeExtractor.hxx | /*=========================================================================
Library: TubeTK/VTree3D
Authors: <NAME>, <NAME>, and <NAME>
Original implementation:
Copyright University of North Carolina, Chapel Hill, NC, USA.
Revised implementation:
Copyright Kitware Inc., Carrboro, NC, USA.
All rights reserved.
L... | ALGO | 0.994663 | 6.716826 | {
"github_metadata": {
"branch": "main",
"commit_count": 6677,
"repo_created_at": "2012-11-08T22:19:44.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 54,
"forks": 58,
"issues": 5,
"pull_requests": 0
},
"file_meta": {
"content_id": "737ba0a6... |
680a55f7-f895-4dee-ba45-3f3959b55835 | Jolly-Walker/COMP4128_competitive_programming | ps6/andCities.cpp | #include <bits/stdc++.h>
using namespace std;
#define maxn 100010
typedef long long LL;
typedef pair<int, int> edge; //(distance, vertex )
vector<edge> g[maxn];
priority_queue<edge, vector<edge>,greater<edge>> pq;
edge train[maxn];
int dist[maxn];
bool seen[maxn];
void dikstras() {
pq.push(edge(0,1));
... | ALGO | 0.999886 | 3.595601 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2021-05-21T07:58: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": "3a22675066... |
de6c089f-2109-43ec-9d31-1dc425176e01 | hma40/Cpp-Competitive-Programming | USACO/2015_16_USACO/Gold/RadioContact.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll dist(pair<int, int> f, pair<int, int> b) {
return (f.first-b.first)*(f.first-b.first)+(f.second-b.second)*(f.second-b.second);
}
int main() {
ios_base::sync_with_stdio(false);
std::cin.tie(0);
freopen("radio.in", "r", stdin);
fr... | ALGO | 0.999996 | 4.365177 | {
"github_metadata": {
"branch": "main",
"commit_count": 52,
"repo_created_at": "2024-05-17T06:28: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": "a014c7cd585... |
629bf897-8d51-47ce-b9c8-a37405dfc490 | folkertvanheusden/MyIP | main.cpp | // (C) 2020-2024 by <NAME> <<EMAIL>>, released under Apache License v2.0
#include <errno.h>
#include <getopt.h>
#include <libconfig.h++>
#include <signal.h>
#include <stdio.h>
#include <string>
#include <string.h>
#include <unistd.h>
#include <vector>
#include <sys/types.h>
#include "any_addr.h"
#include "ax25.h"
#inc... | TOOL | 0.95137 | 4.29319 | {
"github_metadata": {
"branch": "master",
"commit_count": 1277,
"repo_created_at": "2021-07-29T18:05:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 14,
"forks": 2,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "59f13d... |
2526b7bf-c203-4c18-ab9c-141661a3025f | sohardforaname/ACM_ICPC_practice | luogu/1972(Mo's Algo, TLE).cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5, M = 1e3 + 5;
typedef long long ll;
int num[N], c[N];
int bg[M], ed[M];
int cnt[N];
namespace reader
{
const int MAXBUF = 1 << 20;
char buf[1 << 20], *fh = NULL, *ft = NULL;
inline char gc()
{
if (fh == ft)
{
... | ALGO | 0.999937 | 4.318666 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2020-03-31T08:19:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "83a67483f... |
408cdbf2-6b74-41a1-bcb4-f0b3b6dc6aa8 | idefix-code/idefix | src/fluid/RiemannSolver/MHDsolvers/storeFlux.hpp | // ***********************************************************************************
// Idefix MHD astrophysical code
// Copyright(C) <NAME> <<EMAIL>>
// and other code contributors
// Licensed under CeCILL 2.1 License, see COPYING for more information
// **************************************************************... | ALGO | 0.979154 | 6.225512 | {
"github_metadata": {
"branch": "master",
"commit_count": 1733,
"repo_created_at": "2023-01-22T08:31:28.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 31,
"forks": 21,
"issues": 4,
"pull_requests": 6
},
"file_meta": {
"content_id": "81e3c9... |
67dcbe8b-0a35-4289-bcb3-0f9e64e2071a | DiantaoTu/Camera_LiDAR_calibration | main.cpp | /*
* @Author: <NAME>
* @Date: 2022-02-09 16:10:41
*/
#include <vector>
#include <string>
#include <iostream>
#include "common.h"
#include "Velodyne.h"
#include "Frame.h"
#include "Calibrate.h"
using namespace std;
// 设置log所在的路径
void SetLog(string log_path);
// 计算两个标定结果之间的差异
void CalibrationError(const Eigen::Matr... | DATA | 0.936732 | 3.872454 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2022-02-09T07:05:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 32,
"forks": 7,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "30bd9ed621... |
59291d32-833e-4747-90ff-c879cffc0bb6 | weolar/miniblink49 | third_party/skia/src/pathops/SkPathOpsSimplify.cpp | /*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkAddIntersections.h"
#include "SkOpCoincidence.h"
#include "SkOpEdgeBuilder.h"
#include "SkPathOpsCommon.h"
#include "SkPathWriter.h"
static bool bridgeWinding(SkOp... | ALGO | 0.999292 | 3.891236 | {
"github_metadata": {
"branch": "master",
"commit_count": 1788,
"repo_created_at": "2016-09-27T03:41:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7578,
"forks": 1142,
"issues": 340,
"pull_requests": 6
},
"file_meta": {
"content_id": ... |
c67ab0d4-6fb6-47ad-8f7c-92124698151e | buckeye-cn/ACM_ICPC_Materials | solutions/kattis/naq15/allaboutthatbase_laurence.cpp | #include <iostream>
#include <string>
#include <utility>
using namespace std;
const char RADIX[] = {'!', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0'};
inline long parse_digit(char c,... | ALGO | 0.99983 | 4.379731 | {
"github_metadata": {
"branch": "master",
"commit_count": 1094,
"repo_created_at": "2017-09-09T18:26:27.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 40,
"forks": 6,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bd84b5a... |
90855961-4e78-43b7-be1c-cf79fd3f31ac | YMahajan26/LP-3 | DAA/DAA/0-1 Knapsack/0-1_knapsack.cpp | #include <iostream>
#include <algorithm>
using namespace std;
// Function to solve 0/1 Knapsack problem
int knapSack(int W, int wt[], int val[], int n) {
// Base Case
if (n == 0 || W == 0)
return 0;
// If weight of the nth item is more than capacity W, skip this item
if (wt[n - 1] > W)
... | ALGO | 0.999994 | 5.424087 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2024-11-06T12:27: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": "20116f552977... |
3f4cec62-2151-47a4-bb1b-5b2ce06892e3 | tiankonguse/ACM | contest/codeforces/round/383/383D.cpp | #include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
using namespace std;
#define rep(i,n) for (int i = 0; i < (int)(n); i++)
#define foreach(it,v) for (__typeof((v).end()) it = (v).begin(); it != (v).end(); it++)
typedef long long ll;
typedef pai... | ALGO | 0.999969 | 3.705675 | {
"github_metadata": {
"branch": "master",
"commit_count": 185,
"repo_created_at": "2013-03-25T04:04:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 69,
"forks": 40,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3e9142... |
425627b5-8e03-4bf0-9e30-f59c09ff721e | wbttt/Self-propelled-car | autoCar.ino | #include <Boards.h>
#include <Firmata.h>
#include <Servo.h>
Servo leftright;
Servo updown;
int i=0;
int posX=90;
int posY=55;
int a=0;
int on=0;
int c=0;
float F_distance=0;
float R_distance=0;
float L_distance=0;
int pinLF=14;
int pinLB=15;
int pinRF=16;
int pinRB=17;
int MotorRPWM=3;
int MotorLPWM=5;
int inputP... | TOOL | 0.922554 | 3.533558 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2018-06-17T23:19:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4c43a076cf... |
3bcb905a-072d-4f0e-8590-9171ce760430 | sahadat-11/Codeforces | 1547/B.cpp | //In The Name of ALLAH
#include<bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
#define int long long
void solve() {
string s; cin >> s;
int n = s.size(), x = -1;
//s = '@' + s;
for(int i = 0; i < (int)s.size(); i++) {
if(s[i] == 'a') x = i;
}
bool flag = true;
if(x == -1) {
co... | ALGO | 0.99972 | 3.881121 | {
"github_metadata": {
"branch": "main",
"commit_count": 67,
"repo_created_at": "2023-07-26T17:20:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "225c916e7b9... |
5b2ded9f-e32d-45dd-bdc5-89b615390eb8 | algoridam61/Competitive-Programming | Problems/max_segment_tree.cpp | #include <bits/stdc++.h>
using namespace std;
long long N = 1000000;
vector<long long> segment_tree(4*N);
// function to build the segment tree
void build_tree(long long ind, long long low, long long high, vector<long long> &a)
{
if (low == high)
{
segment_tree[ind] = a[high];
return;
}
... | ALGO | 0.999251 | 4.104526 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2025-07-11T11:14: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": "dbf88ae01b9b... |
6f866835-b6eb-4b51-b2d3-5fd3eb8237aa | sunpinyin/sunpinyin | src/pinyin/datrie.h | // -*- mode: c++ -*-
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2007 Sun Microsystems, Inc. All Rights Reserved.
*
* The contents of this file are subject to the terms of either the GNU Lesser
* General Public License Version 2.1 only ("LGPL") or the Common Development and
* ... | ALGO | 0.963886 | 5.692664 | {
"github_metadata": {
"branch": "master",
"commit_count": 777,
"repo_created_at": "2010-03-13T16:49:30.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 515,
"forks": 126,
"issues": 27,
"pull_requests": 3
},
"file_meta": {
"content_id": "3600... |
17d4043a-f2e3-4f78-9491-6b58832870b1 | iamarghamallick/GeeksforGeeks-Solutions | Difficulty: Medium/Find the number of islands/find-the-number-of-islands.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
int dirs[8][2] = {{-1, 0}, {0, 1}, {1, 0}, {0, -1}, {-1, -1}, {-1, 1}, {1, 1}, {1, -1}};
bool range(int i, int j, int n, int m) {
return 0 <= i && i < n && 0 <= j && j < m;
}... | ALGO | 0.99983 | 6.365394 | {
"github_metadata": {
"branch": "main",
"commit_count": 1308,
"repo_created_at": "2023-10-23T10:31:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e127f8f65... |
e6d611fb-e1d1-49f4-a2e9-aabd42b9290e | ArtemVergazov/ap_in_multiplex_networks | GraphEngine/run.h | #pragma once
#include "RNG_MT.h"
#include "graph.h"
#include <string>
class MonoplexPercolationRunBase {
public:
MonoplexPercolationRunBase(
int N,
double cMin,
double cMax,
int cNum,
int nRuns,
std::string outputFileName
) : N_(N), cMin_(cMin), cMax_(cMax), cNum... | ALGO | 0.921815 | 5.175872 | {
"github_metadata": {
"branch": "master",
"commit_count": 98,
"repo_created_at": "2022-02-01T23:51:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "18f747ecc... |
bef51760-0c72-4f1c-a810-166e806a43ee | shahadat-osman/Problem-Solving | Codeforces/2024/800/B_Seating_in_a_Bus.cpp | // <NAME>
// Date: 31-10-2024
#include <bits/stdc++.h>
using namespace std;
void solve()
{
int n;
cin >> n;
vector<int> arr(n + 1);
for (int i = 1; i <= n; i++)
cin >> arr[i];
int maxx = *(max_element(arr.begin(), arr.end()));
vector<int> frq(maxx + 1);
frq[arr[1]] = 1;
... | ALGO | 0.999946 | 5.059349 | {
"github_metadata": {
"branch": "master",
"commit_count": 207,
"repo_created_at": "2022-11-06T19:14:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "34ce3df8... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.