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
f0356028-8513-4aca-b502-2439dd2cae38
amalgupta27/DSA-C-
Binary Search/smallestPosNum.cpp
#include <iostream> #include <bits/stdc++.h> // Unnecessary header, can be removed using namespace std; int main() { int arr[] = {0, 1, 2, 3, 4, 8, 9, 12}; // Sorted input array int n = sizeof(arr) / sizeof(arr[0]); // Finding the size of the array int x; cin >> x; // Taking input for the target value...
ALGO
0.999894
5.230454
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-05-22T09:08: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": "cc0f9be6befc...
7e84ebb5-516c-4282-a8b5-b7177ef4354f
maxLundin/Laba
f.cpp
// // Created by max on 14.10.2018. // #include <iostream> #include <vector> using namespace std; vector<uint32_t> mas[100000]; vector<uint32_t> mas1[100000]; int used[100000]; int used1[100000]; vector<uint32_t> ans; uint32_t res[100000]; int k; bool massiv[10001][10001]; void dfs(uint32_t n) { if (used[n] ==...
ALGO
0.999855
3.771103
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2018-10-11T17:07:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "479c98485...
1444b472-dc71-488b-a7d3-4650cea9c2db
gnsendhil/Programming_practice
coding_test_techgig2021/djiktra_optimized.cpp
#include <bits/stdc++.h> using namespace std; void shortest_path(int num, vector<pair<int,int>> Graph[]) { int inf = (int)1e8; vector<int> Distance(num+1, inf); Distance[1] = 0; set<pair<int, int>> Queue; Queue.insert({0,1}); while(!Queue.empty()) { auto top = Queue.begin(); ...
ALGO
0.999808
3.40015
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2021-07-01T11:16: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": "cd3c51299e9...
52c753ae-07d7-44a5-ba60-2e39d923df01
Pinto05Juan/Punteros-paso-referencia
ejem3.cpp
// El programa devuelve los numeros ingresados por el usuario de forma horizontal y vertical #include <stdio.h> void carga (int n, int Vector[]); //declaracion de la funcion carga void imprimir (int n, int Vector[]); //declaracion de la funcion imprimir int main() { int n=5; // Define la variable n int V[n]; // Defin...
ALGO
0.979989
3.32767
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-07-06T03:19: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": "92ac925d9281...
74f8959b-ce78-40aa-a46d-ee018d63b5d8
sandeul2/programmers-problems
프로그래머스/lv1/17682. [1차] 다트 게임/[1차] 다트 게임.cpp
#include <string> #include <vector> #include <cmath> using namespace std; int solution(string dartResult) { int answer = 0; int index = 0; vector <int> scores; for (int i = 0; i < dartResult.length(); i++) { if (dartResult[i] == 'S') { scores[index - 1] = pow(scores[index - 1], 1); } ...
ALGO
0.999755
4.711282
{ "github_metadata": { "branch": "main", "commit_count": 597, "repo_created_at": "2022-10-28T05:40:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f64c8971c8...
d853f741-f1c8-4215-9af9-256f395eaddf
ishandutta2007/codeforces-a
atreus/normal/715/A.cpp
#include <cstring> #include <algorithm> #include <map> #include <stack> #include <iomanip> #include <cassert> #include <cmath> #include <vector> #include <unordered_set> #include <unordered_map> #include <queue> #include <vector> #include <iostream> #include <set> #define MP make_pair #define F first #define PB push_ba...
ALGO
0.998631
3.415427
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51: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": "835e1ff1875e...
e3f3ef65-10b7-49bd-9962-00c05b583e5a
keatoncscheible/cpp_101
src/11__stl_algorithms/std_transform_inclusive_scan.cpp
// File: std_transform_inclusive_scan.cpp // Description: This C++ program demonstrates the usage of the std::transform_inclusive_scan algorithm from the C++ Standard Library. // The std::transform_inclusive_scan algorithm computes the inclusive prefix sum of a range of elements in a vector // ...
ALGO
0.999682
7.328547
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-07-27T10:51:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fcf6561b64...
69060447-7abc-41f5-93f7-8201bcbb92d9
afewvowels/CPP-PRG-06-06-Kinetic-Energy
PRG-6-6-Kinetic-Energy/main.cpp
// // main.cpp // PRG-6-6-Kinetic-Energy // // Created by <NAME> on 10/7/17. // Copyright © 2017 <NAME>. All rights reserved. // // // In physics, an object that is in motion is said to have kinetic energy. The following // formula can be used to determine a moving object's kinetic energy: // // KE = 1/2 * m * v...
TOOL
0.96381
6.504213
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-10-07T23:03: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": "1a5e11e97e...
925bffdb-ee9b-43aa-9f4a-69d28369bc32
YafaRay/libYafaRay-Old-Structure
include/common/console.h
#pragma once /**************************************************************************** * console_utils.h: General command line parsing and other utilities (soon) * This is part of the libYafaRay package * Copyright (C) 2010 <NAME> * * This library is free software; you can redistribute it ...
TOOL
0.943906
7.349535
{ "github_metadata": { "branch": "master", "commit_count": 1317, "repo_created_at": "2021-05-06T16:45:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e7b9c400...
61549ce4-4815-46f0-8275-95958bb2009e
rahulnagurtha/Mycode
codeforces/263-3.cpp
#include <bits/stdc++.h> using namespace std; #define mp make_pair #define FF first #define SS second #define pb push_back #define fill(a,v) memset(a,v,sizeof a) #define box(a,b) ((a*b>=0)?((a/b)):((a%b==0)?(a/b...
ALGO
0.999894
3.426327
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2015-10-06T14:14: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": "bdc764aad...
adb10f14-b0da-4301-a4e8-a6e42757be10
aanchal298/linked_list
swap_0_1_2.cpp
#include<bits/stdc++.h> using namespace std; struct ll{ int data; struct ll *next; }; void insertbeginning(struct ll **head,int n) { struct ll *node; node=(ll*)malloc(sizeof(ll)); node-> data=n; node->next=NULL; if((*head)==NULL) (*head)=node; else { struct ll *p...
ALGO
0.999984
3.206409
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2015-09-22T19: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": "00413e01e6...
292c9b18-d34d-4c67-b990-a89d1a1a33d1
Amisha328/SDE_Sheet_Challenge
Binary Search/Single_Element_in_SortedArray.cpp
// Single Element in a Sorted Array #include <bits/stdc++.h> int uniqueElement(vector<int> arr, int n) { int l = 0, h = n-1; int ans = -1; while(l <= h){ int m = (l+h) >> 1; // if mid is even then all the numbers before is to be paired if(m%2 == 0){ if(arr[m] == arr[m+1]) ...
ALGO
0.999941
4.913224
{ "github_metadata": { "branch": "master", "commit_count": 112, "repo_created_at": "2022-06-05T06:38:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a8c4b7aa...
e2f83b46-6e04-4131-bafa-24b6f31b6243
Cleparedes/HackerRank
diagonal_difference.cpp
#include <bits/stdc++.h> #include "input.h" using namespace std; int diagonalDifference(vector<vector<int>> arr) { size_t n = arr.size(); long l = 0, r = 0; for (size_t i = 0; i < n; i++) { l += arr[i][i]; r += arr[i][n-1-i]; } return abs(l -r); } int main() { string n_temp; ...
ALGO
0.999973
5.730084
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-12-02T22:24: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": "39a4bf1c093...
5093784e-792d-4631-8446-d49f8c640714
Xilinx/Vitis_Libraries
quantitative_finance/L2/tests/MCEuropeanDowJonesEngine/kernel/kernel_mceuropeanengine.hpp
/* * 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.975566
5.009342
{ "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": "985cd6...
4531e3da-4e20-46ca-9624-8ea90628c89c
txchycxrdia/MCS3
binomial/binomial.cpp
#include <iostream> #include <cmath> #include <iomanip> using namespace std; long long factorial(int n) { long long result = 1; for (int i = 1; i <= n; ++i) { result *= i; } return result; } long long combination(int n, int k) { if (k > n) return 0; return factorial(n) / (factorial(k)...
ALGO
0.999817
4.789558
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-06-23T05: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": "a0145eddf9ac...
0f65606e-0519-4563-b214-afb01e72e0a7
kwkevinlin/Algorithms-Practice
Islands_Count_in_2D_Array.cpp
#include <iostream> using namespace std; const int numWidth = 4; const int numHeight = 4; void discover(int[][numWidth], int, int); int countIslands(int[][numWidth]); int main() { /* * Given a 2D array of 1s and 0s, identify * the number of distinct islands in the array. * Island = 1s * * For exa...
ALGO
0.999707
5.975701
{ "github_metadata": { "branch": "master", "commit_count": 218, "repo_created_at": "2016-02-09T02:20:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 11, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "3cb303...
cb5dc305-e77f-407c-b22c-feeeede96333
ishandutta2007/codeforces-r
rafi22/normal/1426/F.cpp
#include <bits/stdc++.h> #define int long long #define double long double #define endl '\n' #define st first #define nd second #define pb push_back #define sz(x) (int)(x).size() using namespace std; double PI=3.14159265359; int inf=1000000000000000007; int mod=1000000007; int mod1=998244353; const bool multi=0; int ...
ALGO
0.999923
3.959986
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:58: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": "da7ade1a9ae1...
2498c1b8-f134-4f2a-8e92-e1e2b4f973ac
abuterin/BIOINF_OLC
BioInf/BioInf/StringGraphWalk.cpp
#include "StringGraphWalk.hpp" StringGraphWalk::StringGraphWalk(Vertex* start) :start_(start) { } void StringGraphWalk::addEdge(Edge* edge) { edges_.emplace_back(edge); visitedVertices_.insert(edge->getDst()->getId()); visitedEdges_.insert(edge->edgeId); } void StringGraphWalk::extractSequence(std::string& dst) ...
ALGO
0.989478
5.921817
{ "github_metadata": { "branch": "master", "commit_count": 164, "repo_created_at": "2016-11-11T14:37:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "595ca2b3...
adba45b4-ea38-49ef-8a8d-8939e4d595ce
Rabinkhulimuli/dataStructureAndAlgorithm
singlyLinkList.cpp
#include <iostream> using namespace std; struct node { int data; node *next; }; void addelement(node** head){ node* current=*head; int num; cout<<"enter the data number"<<endl; cin>>num; node* temp=new node; temp->data=num; temp->next=nullptr; if (*head==nullptr){ *head=t...
ALGO
0.993659
4.144077
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-03-02T09:03: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": "cd02db20de4...
8a27992e-c9a4-48dc-83db-638e4afc499d
tucagg/Object_Oriented
Projects/Mastermind_Game_W_CPP/tugce_polat_PA1.cpp
#include <iostream> #include <ctime> using namespace std; void isContainsValidCharacters(const char arr[], const int n) // it checks if the given array has valid characters { for (int i = 0; i < n; i++) { if (arr[i] < '0' || (arr[i] > '9' && arr[i] < 'a') || arr[i] > 'e') { cout <<...
ALGO
0.938354
4.703911
{ "github_metadata": { "branch": "tuc", "commit_count": 1, "repo_created_at": "2024-09-30T06:52: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": "9a4b69d15ee12...
ffe8946f-77d8-4cb6-8e28-e85f402d972e
AbuJubair7/CP
Contests/Archive/Codforces/Codeforces Round #796/directionChange.cpp
/* Author: Jubair_7 Date: 7 June 2022 */ #include <bits/stdc++.h> using namespace std; #define BOOST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define FOR(i,n) for(ll i = 0 ; i<n ; i++) #define endl "\n" typedef long long ll; ll mod = 1e9+7; ll gcd(ll a, ll b){ if(b == 0) return a; return ...
ALGO
0.999952
4.626173
{ "github_metadata": { "branch": "main", "commit_count": 120, "repo_created_at": "2023-11-07T12:39: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": "73b36a395d...
0a0e5690-63f1-4dc0-8d38-52b6a2e6ebdd
nduonggg/C-basic-Homework
Homework/gk/dslk don.cpp
#include<stdio.h> #include<stdlib.h> struct _node{ int data; _node*next; }; typedef struct _node*node; node createNode(int x){ node temp; temp=(node)malloc(sizeof(struct _node)); if(temp==NULL) { printf("No Memory available Error\n"); exit(0); } temp->data=x; temp->...
ALGO
0.999752
3.547594
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-02-08T01:40: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": "c75d1a5f72b0...
9630576c-5607-4fa4-b6ff-fde75c1b8729
chirag-borawake/bca
SEM=4/C++/34_volume_34.cpp
/* Name :-<NAME> Class :-SY BCA Roll No:-2012 34. Write a C++ program to find volume of cube, cylinder and rectangle using function overloading */ #include<conio.h> #include<iostream.h> const PI = 3.14; int getVolume(int l) { return (l*l*l); } int getVolume(int r,int l) { return ( 2*PI*r*r*l); } int getVolume(int l,i...
ALGO
0.984574
4.561015
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2014-08-02T13:40: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": "c0cb1c2835...
a85908f1-a852-4ecf-93fa-f8561761d0f1
Syed007Hassan/Fast-Material-CS-SE
3RD SEMESTER/DS LAB/LAB8/Q3 AND Q4.cpp
#include<iostream> using namespace std; class Node{ public: int data; Node *left; Node *right; Node(int val){ data = val; left = right = 0; } }; class BT{ Node *root; public: BT(){ root = 0; } //Inserting in BST void insert(int x) { root = insert(x, root)...
ALGO
0.999938
3.565112
{ "github_metadata": { "branch": "main", "commit_count": 66, "repo_created_at": "2023-01-08T11:19:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 74, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "59a72d224a...
342d160a-807e-4c46-9377-4ed66351a421
rachit2905/Leetcode-solutions
Distinct Difference - GFG/distinct-difference.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; class Array { public: template <class T> static void input(vector<T> &A,int n) { for (int i = 0; i < n; i++) { scanf("%d ",&A[i]); } } template <class T> static void print(vector<T> &A) ...
ALGO
0.999658
5.680969
{ "github_metadata": { "branch": "main", "commit_count": 2462, "repo_created_at": "2022-10-22T07:12: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": "13d79a738...
5d3b6002-dc24-46da-8aca-7a9083c8d7e8
CherryGS/ACM
_cf/contest/1706/d2.cpp
#include <bits/stdc++.h> using namespace std; std::mt19937 rng(std::random_device{}()); typedef long double ld; typedef long long ll; typedef unsigned long long ull; typedef const int& cint; typedef const ll& cll; typedef pair<int, int> pii; typedef pair<int, ll> pil; #define ls (loc<<1) #define rs ((loc<<1)|1) cons...
ALGO
0.999941
3.946959
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2021-10-29T11:11: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": "14f1698fb...
77cce50d-09a7-4f4b-9b6d-77873fdd93ed
Kawchar-Ahammed/who-i-am
3 Basic Data Structure/Module 19/node_push_in_vector.cpp
#include<bits/stdc++.h> using namespace std ; class Node { public: int val ; Node * left ; Node * right ; Node(int val) { this->val = val ; this->left = NULL ; this->right = NULL ; } } ; Node * input_tree() { int val ; cin >> val ; Node * root ;...
ALGO
0.999601
3.981318
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-01-21T16:56: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": "86ede72e2864...
439d63d6-7f4b-491c-bad4-ec801ed636d4
FernandoChan/LeetCodeSolving
LinkedList.cpp
#include<iostream> #include<vector> using namespace std; // ADT of List //template <class Elem>class List //{ //public: // virtual void clear() = 0; // virtual bool insert(const Elem&) = 0; // virtual bool append(const Elem&) = 0; // virtual bool remove(Elem&) = 0; // virtual bool setPos(int pos) = 0; //}; template<...
TOOL
0.992322
4.085424
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2017-10-31T12:32:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cd81bc1d1...
51e1cc78-1722-4e75-be87-cf2986e75e0f
IIIVIRUSlll/CPP-Practicals
practical6.cpp
#include <iostream> using namespace std; int StringLength(char str[50]) { int length = 0; while(str[length] != '\0') { length++; } return length; } int ReverseString(char str[100]) { int length = StringLength(str); for(int i = 0; i<length/2; i++) { char temp = str[i]; ...
ALGO
0.997677
3.567637
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-11-21T09:36: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": "c3e29c2dffab...
a856e73d-433a-4a69-a52b-f0b33b2ed133
JitenWhatever/LeetCode-Solutions
May LeetCoding Challenge/Week 1 May 1st - May 7th/Majority Element.cpp
/* Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the array is non-empty and the majority element always exist in the array. Example 1: Input: [3,2,3] Output: 3 Example 2: Input: [2,2,1,1,1,2,2] Output: 2 */ class Sol...
ALGO
0.999992
6.101713
{ "github_metadata": { "branch": "master", "commit_count": 870, "repo_created_at": "2017-11-02T18:14:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f00888df...
544219a1-2892-497b-a85c-258bd00971cc
kavinda-accelr/resnet_50_final_layer_armpl
samples/sample_7/main.cpp
#include <iostream> #include <array> #include <vector> #include <random> #include <chrono> #include <algorithm> #include <thread> #include <armpl.h> #include <cblas.h> #include <omp.h> #include "Timer.h" double get_max_diff_vecs(const std::vector<float> &vec_1, const std::vector<float> &vec_2) { double delta = 0...
ALGO
0.992095
5.51952
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-06-12T06:24:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5b0176c63a31...
efac575e-645a-480c-9055-1f185092b9b0
539077vinay/CSA5168-cruptography
exp22.cpp
#include <stdio.h> #include <stdint.h> #include <string.h> #define BLOCK_SIZE 8 #define KEY_SIZE 10 // S-DES key size #define IV_SIZE 8 // Initialization Vector (IV) size // S-DES encryption/decryption functions void sdes_encrypt(uint8_t *plaintext, uint8_t *key, uint8_t *ciphertext); void sdes_decrypt(uint8_t *c...
ALGO
0.96881
6.587414
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-09-18T04:58: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": "aaf1fde3d257...
9b9ecf52-e1b2-4674-8551-6a8556aac073
deeplearning4j/deeplearning4j
libnd4j/include/helpers/EigenValsAndVecs.h
/* ****************************************************************************** * * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. * * See the NOTICE file distributed wit...
ALGO
0.999099
6.835589
{ "github_metadata": { "branch": "master", "commit_count": 2834, "repo_created_at": "2013-11-27T02:03:28.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 14049, "forks": 3855, "issues": 636, "pull_requests": 0 }, "file_meta": { "content_id": ...
ba2305c5-9e0d-4db7-9aa9-7c8f0bf3f47f
manwar/perlweeklychallenge-club
challenge-133/ulrich-rieke/cpp/ch-2.cpp
#include <iostream> #include <vector> #include <cmath> #include <map> #include <iterator> #include <algorithm> bool isPrime( int n ) { const int stop = std::sqrt( static_cast<double>( n ) ) ; for ( int i = 2 ; i <= stop ; i++ ) { if ( n % i == 0 ) return false ; } return true ; } bool isComposite( i...
ALGO
0.999525
5.548968
{ "github_metadata": { "branch": "master", "commit_count": 44412, "repo_created_at": "2019-03-30T01:15:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 194, "forks": 332, "issues": 5, "pull_requests": 4 }, "file_meta": { "content_id": "68...
faf9e24a-f403-4b19-b33b-31db08e1caa0
niessner/VoxelHashing
DepthSensing/Source/DX11VoxelGridOperations.h
#pragma once #include <D3D11.h> #include "DXUT.h" #include "DX11VoxelGrid.h" #include "TimingLog.h" #include "GlobalAppState.h" #include "matrix4x4.h" class DX11VoxelGridOperations { public: //--------------------------------------------------- // Voxel Grid Operations //--------------------------------------...
TOOL
0.921073
6.902613
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2014-06-08T23:29:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 694, "forks": 203, "issues": 12, "pull_requests": 1 }, "file_meta": { "content_id": "25dd...
eb2145c9-9416-4b0a-902e-aa38a85dbe46
Borislavsvilenov/CPPsims
v2/objects/Particle.cpp
#include <iostream> #include <vector> #include <SFML/Graphics.hpp> #include <SFML/System.hpp> #include <SFML/Window.hpp> class Particle { private: public: sf::Vector2f pos; sf::Vector2f posL; sf::Vector2f vel; sf::Vector2f accel; sf::CircleShape sprite; int radius; Particle(float x, f...
ALGO
0.978903
4.942129
{ "github_metadata": { "branch": "main", "commit_count": 68, "repo_created_at": "2024-01-31T17:15:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0397da655ee...
907154ca-babb-44d9-b8c2-a0c0d959e3b5
kanak22/CP-DSA-Questions
450 DSA/Search & Sort/Triplets with sum smaller than a given value/triplets-smaller-than-the-given-value.cpp
long long countTriplets(long long arr[], int n, long long k) { /// First we sort the array in increasing order sort(arr,arr+n); long long count = 0; /// initialised counter to 0 /// Three Pointer Approach for(int i=0;i<n;i++){ /// We fixed our first pointer at ith position ...
ALGO
0.999955
6.121975
{ "github_metadata": { "branch": "main", "commit_count": 806, "repo_created_at": "2021-06-27T11:36:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 78, "forks": 129, "issues": 198, "pull_requests": 30 }, "file_meta": { "content_id": "e288...
683098e4-ba87-477d-b508-c00c862a8d7c
flowjiyun/PS
tree/dfs/111_min_depth.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.99996
6.478883
{ "github_metadata": { "branch": "main", "commit_count": 205, "repo_created_at": "2022-06-14T12:18: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": "819e813753...
46bb6feb-6445-43d6-ac84-84f48a10564b
nNbSzxx/ACM
18南京夏令营/8.10 day1水题场/D.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <map> #include <vector> using namespace std; const int MAX = 110; unsigned long long a[MAX]; unsigned long long ans[MAX]; map<unsigned long long, int> cnt; bool finda; int n; void dfs(int id) { if (finda) return ; if (id == n + 1) { finda = true; ...
ALGO
0.9999
3.030249
{ "github_metadata": { "branch": "master", "commit_count": 75, "repo_created_at": "2018-07-24T12:29:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "89b261e3c...
395a6f9a-aedb-41e3-9bbb-e883c2510de1
zcxxxxxxx/ky_review
data_struct/code/basic_struct/src/tree.cpp
#include "../include/tree.h" #include <iostream> #include <queue> using namespace std; template <class T> tree<T>::tree() { left = NULL; right = NULL; } template <class T> tree<T>::tree(T elem) { data = elem; left = NULL; right = NULL; } /** * @brief 插入元素 * * @tparam T * @param elem */ template <clas...
ALGO
0.999299
4.360105
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-03-29T10:28: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": "ace71f3feb8...
14be4b1c-f9d3-41bb-b2cf-0ddadd16a9fa
xnhp0320/SmartSplit
analyzer/rtrie.cc
#include "rtrie.h" #include "hypc.h" void rt_insert(rnode *n, rg r, pc_rule* index) { if(r.high >= n->b.high && r.low <= n->b.low) { n->rlist.push_back(index); return; } uint32_t m = (n->b.high - n->b.low + 1ULL)/2 + n->b.low - 1; if(r.low <= m) { if(!n->left) { ...
ALGO
0.998371
4.399592
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-01-14T07:29:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9224afbd31...
42c5a27e-958b-4cc0-9b70-dd2fd4003e0d
PJK/comm-avoiding-cuts-cc
src/karger-stein/co_mincut.cpp
// // CO-MinCut.cpp // // // Created by <NAME> on 13.03.15. // // #ifndef ____CO_MinCut_implementation__ #define ____CO_MinCut_implementation__ #include "lazy_adjacency_matrix.hpp" #include "indexed_adjacency_matrix.hpp" #include "co_mincut.h" namespace comincut { int target_number_of_vertices_for_contracti...
ALGO
0.998958
4.815928
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2017-12-12T23:43:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f7c62a10e...
6b7ff680-25fb-4aa3-a099-740eb2b32785
Cyber-Naimo/3rd-Semester
DS THEORY/DSA/HEAPS/HEAP EASY IMPLEMENTATIONS.cpp
#include<iostream> using namespace std; void MaxHeapify(int arr[],int i, int n) { int largest = i; int left = 2*i+1; int right = 2*i+2; if(left < n && arr[left] > arr[largest]) { largest = left; } if(right<n && arr[right] > arr[largest]) { largest = right; } if(lar...
ALGO
0.999657
3.597414
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-01-17T06:45:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2a4795106b4b...
debe48e8-7fa8-4860-a551-46b22dee90a4
jfan04/Leetcode-C--solution
leet130_surroundedRegion.cpp
// Runtime error class Solution{ public: void dfs(vector<vector<char>> &board,int i,int j,int m,int n){ board[i][j]='*'; if(i>0&&board[i-1][j]=='O'){ dfs(board,i-1,j,m,n); } if(i<m-1&&board[i+1][j]=='O'){ dfs(board,i+1,j,m,n); } if(j>0&&board[...
ALGO
0.999933
4.84145
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-04-16T22:29: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": "db15e7139b...
f66af8bb-4f39-429f-b7e7-6029afb49e70
Tusharscamer/Tech-Work
OOAD/In C++/Application/Calculator.cpp
#include <iostream> using namespace std; template <typename C> class Cal { private: C num1; public: // Constructors Cal() {} Cal(C num1) { setnum1(num1); } // Getters and Setters C getnum1() { return num1; } void setnum1(C num1) { this->num1 = num1; } ...
TOOL
0.955794
4.588494
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2024-09-01T14:27: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": "e2556c2aade...
c832e502-9e15-40d6-81af-7983c42da028
ProgramYourFace/Voxulkan
Voxulkan-Native/APIs/VMA/vk_mem_alloc.h
// // Copyright (c) 2017-2018 Advanced Micro Devices, Inc. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rig...
TOOL
0.911355
6.480411
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2019-06-23T21:01: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": "bb77b401a...
5e91b37e-50b2-41a9-a010-66875e5995a9
Resorie/My-Code
luogu/Code/P1331.cpp
#include <bits/stdc++.h> using namespace std; int r,c,i,j,s; int dx[4] = {- 1,1,0,0},dy[4] = {0,0,-1,1}; char place[1005][1005]; bool used[1005][1005]; bool forbid(char a,char b,char c,char d) { if(a == '.' && b == '#' && c == '#' && d == '#') return 1; if(a == '#' && b == '.' && c == '#' && d == '#') return 1; if(a...
ALGO
0.999877
4.54499
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2019-11-23T08:17:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c24a670fd2...
1051e1c4-0dc9-4c13-9afd-d6389d12e323
pp2110/My-Leetcode-Submissions
Minimum Multiplications to reach End - GFG/minimum-multiplications-to-reach-end.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution { public: int minimumMultiplications(vector<int>& arr, int start, int end) { // code here int n = arr.size(); ...
ALGO
0.999787
5.454409
{ "github_metadata": { "branch": "main", "commit_count": 621, "repo_created_at": "2022-08-04T10:21:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c696ce6355...
b7a3248f-8220-40e2-8492-1fb566eb8aac
manasakani/arrayKMC
dist_iterative_test/main_test.cpp
#include <iostream> #include <string> #include "utils.h" #include <mpi.h> #include <hip/hip_runtime.h> #include <hip/hip_runtime.h> #include <hip/hip_runtime.h> #include "utils_gpu.h" #include <hipblas.h> #include "../dist_iterative/dist_conjugate_gradient.h" #include "../dist_iterative/dist_spmv.h" #include <pthread....
ALGO
0.998871
4.409989
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-04-15T07:15:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "30c83982e1b2...
a8c25645-0861-4993-9a0f-3130249daf14
Seungcode/Algorithm
프로그래머스/2/17686. [3차] 파일명 정렬/[3차] 파일명 정렬.cpp
#include <string> #include <vector> #include <queue> using namespace std; //우선순위큐를 사용하기 위한 구조체 struct file{ string head; int number; int index; string name; /*두개가 같을 경우 -> 인덱스 헤드가 같을 경우 -> 넘버*/ bool operator<(const file& other) const{ if(head == other.head && number == other.n...
ALGO
0.999326
4.862231
{ "github_metadata": { "branch": "main", "commit_count": 425, "repo_created_at": "2024-03-23T04:23: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": "0b5a52a124...
2aca0b8f-0b66-49a3-b531-8df9c54878d1
Mason-Wmx/ViewFramework
3p/VTK/ThirdParty/vtkm/vtk-m/vtkm/rendering/raytracing/QuadIntersector.h
//============================================================================ // Copyright (c) Kitware, Inc. // All rights reserved. // See LICENSE.txt for details. // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURPOSE...
ALGO
0.999011
6.679918
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2021-06-06T04:31:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e1f3192b1ac1...
0fe74a3c-b989-495a-a16c-ec7bfc8731d1
Shreya1805-web/Phonebook_Management_System
main.cpp
#include <iostream> #include<cstring> #include "Driver Class.h" using namespace std; int main() { string n; string name; char number[10]; char gmail[20]; string query; dlist d1; char ans; int ch,a; cout<<"* **PHONE BOOK** *"; ...
TOOL
0.984406
3.349336
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-03-21T11:22: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": "a5b12494f085...
1faf6d3c-1f93-420a-af32-20511718f48b
LSH3333/PS
baekjoon/1189.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int R, C, K; char board[6][6]; int dr[] = {-1,0,1,0}; int dc[] = {0,1,0,-1}; bool visited[6][6]; int answer; void dfs(int r, int c, int depth) { if(r == 0 && c == C - 1) { if(depth == K) answer++; return; } f...
ALGO
0.999619
4.829043
{ "github_metadata": { "branch": "master", "commit_count": 1357, "repo_created_at": "2021-07-07T06:42: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": "7003df5...
c4c4d249-5327-4583-a7c0-676b9774ae59
clbb/datastruct
Sort/Sort.h
#pragma once #include<assert.h> #include<iostream> using namespace std; void Print(int a[],size_t size) { for(size_t i = 0; i<size; ++i) { cout<<a[i]<<" "; } cout<<endl; } template <class T> struct Less { bool operator()(const T& l,const T& r) { return l<r; } }; template <class T> struct Greater { bool op...
ALGO
0.999158
4.421926
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2016-10-27T14:15: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": "da52a2a30...
fd178cd9-0e34-4f0f-b866-0acbfea7f112
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/Gemma/top0-100/coin-path-Solution.cheapestJump/177870_nan.cpp
ztype(i_ctx_t *i_ctx_p) { os_ptr op = osp; ref tnref; int code = array_get(imemory, op, (long)r_btype(op - 1), &tnref); if (code < 0) return code; if (!r_has_type(&tnref, t_name)) { /* Must be either a stack underflow or a t_[a]struct. */ check_op(2); { ...
ALGO
0.94329
3.961671
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-03-22T14:39:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1d15475baef6...
137cd29f-d3a1-4b6a-a8b8-64c552c96112
Kangbaejin/Algorithms
beakjoon/samsung_sw/13460.cpp
/* * baekjoon 13460 * * 구슬 탈출2 * * https://www.acmicpc.net/problem/13460 * * * '.', '#', 'O', 'R', 'B' * 빈칸, 벽, 구멍, red, blue * * */ #include <iostream> #include <vector> #include <queue> #include <algorithm> using namespace std; struct bead{ int rx, ry; //빨간 구슬 좌표 int bx, by; //파란 구슬 좌표 int...
ALGO
0.999944
3.921266
{ "github_metadata": { "branch": "main", "commit_count": 224, "repo_created_at": "2022-01-05T04:28:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6acc83ae09...
3d3d47da-5f98-4d75-bed1-173d6d0adcbb
huanhuanonly/Codeforces
Divide and conquer/CF2093D. Skibidi Table.cpp
/** * Codeforces Round 1016 (Div. 3) * * => <NAME> ( @c 1400 ) * * -> https://codeforces.com/contest/2093/problem/D * * Submissions ~> https://codeforces.com/contest/2093/submission/314953915 By huanhuanonly * * @b Dfs and @b divide-and-conquer * * ----April 11, 2025 [13h:46m:04s]---- */ #include <bits...
ALGO
0.99987
4.581722
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-10-21T08:53:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2d65f58f26e6...
cb4cdc2e-2ae2-46ea-94b0-b3b848ab7f97
shreyshah173/DSA
linked lists/linkedlist2.cpp
#include <iostream> using namespace std; class node { public: int data; node* next; node(int val){ data = val; next = NULL; } }; int length(node* &head){ node* temp = head; int counter = 0; while(temp!=NULL){ temp=temp->next; counter++; } return ...
ALGO
0.999826
4.781844
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-02-14T11:03: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": "5f2b101cacb8...
57162f91-5ab8-4ff0-8db3-b6321cad7870
lopez-alejandro/programming_practice
arrays/6_3/p6_3.cpp
/* * Goal: * write a function that takes in two strings * representing integers and returns an integer * prepresenting their product */ #include <iostream> using namespace std; int multiply(string, string); int strToInt(string); int main(void){ string firstNum, secondNum; cin >> firstNum; cin >> sec...
ALGO
0.999529
4.94581
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2014-07-27T22:45: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": "8ce82dab0b...
66e02962-a473-4dcf-adc7-f9da87cd9e38
seiyakuramochi/donuts
main.cpp
#include <cmath> #include <iostream> #include <unordered_map> #include <cassert> #include <random> #include <stdlib.h> #include <chrono> #include "torus.hpp" #include <boost/numeric/ublas/matrix_sparse.hpp> #include <boost/numeric/ublas/io.hpp> #define N 1000 #define DELIVERY_FAIL (-1) int main(int argc, char* arg...
ALGO
0.999319
4.326495
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2019-02-11T14:09:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6b0c2391c...
db61ab53-6639-453e-8c70-00f917f6e67a
gourab21/DS-SEM-III
pathlength.cpp
#include <iostream> using namespace std; #define V 4 int check(int g[][V], int u, int v, int k) { if (k == 0 && u == v) return 1; if (k == 1 && g[u][v]) return 1; if (k <= 0) return 0; int count = 0; for (int i = 0; i < V; i++) if (g[u][i] == 1) count += check(g, i, v, k - 1); return count; } ...
ALGO
0.999902
4.484532
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2021-04-04T08:19: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": "5f9c49c5f4e...
3581e84f-4192-4770-9798-12565caa8b50
LeiShi1313/leetcode
leetcode_cpp/715_range_module.cpp
#include <iostream> #include <vector> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #include <algorithm> #include <numeric> #include <string> #include <ctime> #include "utils.h" using namespace std; class RangeModule { public: set<pair<int, int>> ranges; RangeModule() { }...
ALGO
0.999014
4.344154
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2017-06-17T19:17: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": "6c39b1f50...
6cab82b4-a09f-438c-88cf-aed7360b7768
Presentation12/SETR
Aulas Praticas/Aula_Pratica_6/Código Fonte/Exercicio_Segmentos/display_7_sements.ino
/* Showing numbers, chars and phrases A (seg[0] in this project) --- F (seg[5] in this project) | | B (seg[1] in this project) | | --- G (seg[6] in this project) E (seg[4] in this project) | | | | C (seg[2] in this project) --- . dot or dicimal (seg[7] in this project) D (seg[3] in this project) */ #define A 8 #define ...
TOOL
0.997251
3.85627
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2022-11-16T20:10: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": "bb141d96cf...
13d74d9c-2d3c-4cf8-a103-adef390bbf74
ziyeshanwai/METAHUMAN51
Source/MetaHumanMeshTracker/Private/nrr/include/nrr/DMTNormalizationConstraint.h
// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include <nls/DiffDataMatrix.h> namespace epic { namespace nls { template <class T> class DMTNormalizationConstraint { public: DiffData<T> EvaluateRegionsSumEquals(DiffData<T> vec, int numRegions) { const int numValues = vec.Size(); ...
ALGO
0.992465
6.484532
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-06-20T06:18:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 6, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "89d261f19f6b...
3630a14d-9ef1-4a6c-aa79-814fff72373c
Alberto-SC/Competitive-Programming-solutions
Atcoder/codefestival_2016_final_d.cpp
#include <bits/stdc++.h> using namespace std; #define __ ios_base::sync_with_stdio(false),cin.tie(NULL); #define endl '\n' #define int long long signed main(){__ int n,m; cin>>n>>m; vector<int> nums(n); set<int> mp[m]; map<int,int> mp2; for(auto &c:nums)cin>>c,mp2[c]++; int ans = 0; for(int i = 0;i<n;i...
ALGO
0.99996
3.507442
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2020-07-20T03:18: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": "ff105e550d4e...
4f9cf7d3-7595-4a4c-a32f-780432a04a40
scylladb/scylladb
cql3/statements/update_statement.cc
/* * Copyright (C) 2015-present ScyllaDB * * Modified by ScyllaDB */ /* * SPDX-License-Identifier: (LicenseRef-ScyllaDB-Source-Available-1.0 and Apache-2.0) */ #include "utils/assert.hh" #include "update_statement.hh" #include "cql3/expr/expression.hh" #include "cql3/expr/evaluate.hh" #include "cql3/expr/expr-u...
TOOL
0.95188
4.642163
{ "github_metadata": { "branch": "master", "commit_count": 48526, "repo_created_at": "2014-12-24T13:16:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 14677, "forks": 1388, "issues": 3257, "pull_requests": 335 }, "file_meta": { "content_i...
30134a59-2427-4456-b5e2-da18303a4cb1
DionysiosB/CodeForces
1100-1199/1157C1-IncreasingSubsequenceEasyVersion.cpp
#include <cstdio> #include <vector> int main(){ long n; scanf("%ld", &n); std::vector<long> a(n); for(long p = 0; p < n; p++){scanf("%ld", &a[p]);} long left(0), right(n - 1), cur(0); std::vector<char> res; if(a[0] < a.back()){res.push_back('L'); cur = a[0]; left = 1;} else{res.push_back('R')...
ALGO
0.999996
3.227648
{ "github_metadata": { "branch": "master", "commit_count": 4487, "repo_created_at": "2013-06-27T18:15:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 690, "forks": 163, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "104...
1a86072f-ce04-4ee8-a657-cb813ad34951
StanleyAnyas/Imparare_C-
matrice.c++
#include <iostream> #include <string> using namespace std; #define N 4 #define V 10 int matrice[N][N]; void riempiMatrice(){ srand(time(NULL)); for(int r=0;r<N;r++){ for(int c=0;c<N;c++){ matrice[r][c] = rand() % V + 1; } } } void riempiMatriceTastiera(){ for(int r=0;r<N;r++){ cout << "INSERIMENTO RI...
ALGO
0.997536
4.146463
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-02-10T21:20: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": "84fda2558efb...
dfe5adb9-8717-476a-b693-dda295e9c24c
YeongjinOh/Algorithm-practice
LeetCode/Medium/375.Guess_Number_Higher_or_Lower_II/main.cpp
class Solution { public: ////////////////////////////////////////////////////////////// // Solution 1) Bottom-up DP ////////////////////////////////////////////////////////////// int getMoneyAmount(int n) { vector<vector<int> > a(n+1, vector<int>(n+1, INT_MAX/2)); ...
ALGO
0.999986
4.96438
{ "github_metadata": { "branch": "master", "commit_count": 317, "repo_created_at": "2016-03-24T12:56: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": "32aae205...
896625ca-43af-4179-9d65-6452a5609407
icwyash/YashShekharWWC2024
Documentary WCC2024/Day 7/Program 3.cpp
/* QUE.3: Postorder Binary search tree on (LEET CODE). */ CODE : #include <iostream> using namespace std; // Definition for a binary tree node struct TreeNode { int val; TreeNode* left; TreeNode* right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; // Recursive Postorder Traversal void ...
ALGO
0.999995
6.018186
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2024-12-19T04:41: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": "40377f71b3e...
06275200-c470-49ac-9cb0-f82b08ea541d
wangkendy/grids
3713.cpp
/* * Source: http://poj.grids.cn/practice/3713/ * Description: English word to number * tag: recursion * */ #include <iostream> #include <string> #include <map> #include <stack> #include <deque> using namespace std; struct StringInt { const char *str; int num; }; StringInt si[] = { {"negative", -1},...
ALGO
0.999653
4.167622
{ "github_metadata": { "branch": "master", "commit_count": 63, "repo_created_at": "2012-05-23T02:40:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1874f96b0...
96f6e8b1-f4aa-409c-8ea3-b1c11009839c
Sparsh913/24783-Adv_Eng_Comp
course_files/polygonalMesh/qemmain.cpp
// target_link_libraries(your_executable_target ysclass fssimplewindow ...) #include <iostream> #include <fstream> #include <vector> #include <algorithm> #include <unordered_set> #include "fssimplewindow.h" #include "ysclass.h" #include "mesh.h" #include "glutil.h" #include "collapse.h" #include "qem.h" const double ...
ALGO
0.971217
4.001228
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-01-14T16:26: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": "06089cfbfc70...
84db7e19-2b84-4072-91fc-4648dfa12eaa
MatveevDmtr/Mandelbrot
mandelbrot.cpp
#include "mandelbrot.hpp" #include <SFML/Graphics.hpp> #include <SFML/Audio.hpp> #include <math.h> //#define MEASURING const int W_HEIGHT = 1000; const int W_WIDTH = 1000; const int MAX_ITERATION = 255; const float MAX_DISTANCE = 100.0; const __m256 MAX_DIST_ARR = _mm256_set1_ps (MAX_DISTANCE); con...
ALGO
0.942529
4.91137
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2023-03-31T16:40: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": "54203d2a92e...
cb4b5e0a-ca22-4fac-91c4-f75d5f1f67bd
goodspeed24e/Programming
Effective STL/estl-examples/21-2.cpp
// // Examples from ESTL Item 21, continued // #include <set> #include <iostream> #include "ESTLUtil.h" using namespace std; struct StringPtrGreater: // highlights show how public binary_function<const string*, // this code was changed const string*, // from page 89. Beware, bool> { // this code...
TEST
0.900254
5.830508
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-03-16T15:08:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "d07645681d...
74c7dc0f-2f2e-4a22-a88e-85b347b1450d
Lokesh7729/DSA-SUPREME-3.0
Daily Coding Problem/Day 4/leapYear.cpp
// Problem 2: // Leap year - Program to find the year is leap year or not #include<iostream> using namespace std; int main() { int year; // Step 1: Input cout << "Please enter the year: "; cin >> year; // Step 2: Leap Year Check // A year is a leap year if: // 1. It is divisible by 4, an...
ALGO
0.999238
4.388331
{ "github_metadata": { "branch": "main", "commit_count": 158, "repo_created_at": "2024-04-30T10:30:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cc89040c82...
6032ff5a-dad0-423a-a9c1-56dffa4af994
ishandutta2007/codeforces-y
yokozuna57/normal/1280/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MOD = 1000000007; int main(){ int t; scanf("%d",&t); for(;t>0;t--){ int n,m; char a[62][62]; scanf("%d%d",&n,&m); for(int i = 0 ; i < n ; i ++){ scanf("\n"); for(int j = 0 ; j < m ; j ++){ scanf("%c",&a[i][j]); } } ...
ALGO
0.999846
4.009535
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:40:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "80ecdb15c525...
3aff0721-639f-4958-83af-200684a1de66
andrewqt/Competitive-Programming
CodeForces/_0203_E_Transportation/_0203_E_Transportation.cpp
#include <bits/stdc++.h> using namespace std; int N, D, C; int cap[100005], fuel[100005], len[100005]; priority_queue<int> pq; int main(){ cin.sync_with_stdio(0); cin.tie(0); cin >> N >> D >> C; long long opt1 = 0, opt2 = 0; for(int i = 1; i<=N; i++){ cin >> cap[i] >> fuel[i] >> len[i]; ...
ALGO
0.999945
3.716012
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2018-09-08T12:27:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dda281df6...
dd09e22d-23e9-418c-8c1c-70f1cb97cefd
liviaceciliags/projetos-algoritmos
pedra papel tesoura.cpp
#include <iostream> #include <cstring> using namespace std; int main () { char definicao1 [50]; char definicao2 [50]; int i; //contador int N; //numero de rodadas cin >> N; cin.ignore(); for (i = 0; i < N; i++) { cin.getline(definicao1, 50); cin.getline(definicao2, 50); if (strcmp(definicao1, "papel") ...
ALGO
0.999959
3.731902
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-10-27T14:58: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": "1ee71dd7d9a7...
11207b26-08a0-4f23-890d-603603b31997
timi-liuliang/echo
thirdparty/mlpack/methods/mvu/mvu.hpp
/** * @file mvu.hpp * @author <NAME> * * An implementation of Maximum Variance Unfolding. This file defines an MVU * class as well as a class representing the objective function (a semidefinite * program) which MVU seeks to minimize. Minimization is performed by the * Augmented Lagrangian optimizer (which in t...
ALGO
0.962453
6.359382
{ "github_metadata": { "branch": "master", "commit_count": 3016, "repo_created_at": "2018-03-10T04:07:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 971, "forks": 116, "issues": 254, "pull_requests": 0 }, "file_meta": { "content_id": "5...
b5c08588-1760-4a12-b376-de6b0ab21fba
DavidBuzatu-Marian/Cpp-Java-Interviews-Competitions
CrackingTheCodingInterview/8_10PaintFill.cpp
#include <iostream> #include <queue> #include <vector> #include <stdlib.h> #include <time.h> bool isSameColor(char currentC, char initC) { return currentC == initC; } bool isInMatrix(int rows, int cols, int i, int j) { return (i < rows && j < cols && i >= 0 && j >= 0); } void BFS(std::vector<std::vector<char...
ALGO
0.99837
4.232263
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2020-07-16T18:50: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": "eaf303ee8...
5a3c39bd-ff87-4a8d-bb13-850257c7ffda
StrawHatWess/Competitive-Programming-Solutions
Codeforces/Rated/640/D.cpp
#pragma GCC optimize("O3") #include <bits/stdc++.h> using namespace std; #define boost ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0) typedef string str; typedef long long ll; #define int ll typedef double db; typedef long double ld; typedef pair<int,int> pi; #define fi first #define se second typedef vec...
ALGO
0.999674
4.256536
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-04-18T12:51: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": "600edc72b5d5...
b56d7f45-1024-4510-989a-76938edfedd0
kshprenger/algorithms
Itmo/codeforces/edu/graphs/2/B.cpp
#include<iostream> #include <algorithm> #include <cmath> #include <set> #include <vector> using namespace std; int main(){ int64_t n,k,t; ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin>>t; for (int64_t i = 0; i < t; i++) { cin>>n>>k; if(n*k%2==1||k>n-1){ ...
ALGO
0.999866
3.824516
{ "github_metadata": { "branch": "master", "commit_count": 114, "repo_created_at": "2022-09-27T14:36: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": "12db95ff...
dcee7d7f-62e9-4e04-9ad5-0cf8e46f4245
Vaibhav-Chitransh/DSA-problem-solutions
Recursion and Backtracking/N-queens.cpp
#include<iostream> #include<vector> using namespace std; bool isSafe(int i, int j, vector<vector<char>>& board, int n) { // Checking for column int row = i; int col = j; while(row >=0 ) { if(board[row][col] == 'Q') { return false; } row--; } // checking for ...
ALGO
0.99996
5.367729
{ "github_metadata": { "branch": "main", "commit_count": 106, "repo_created_at": "2023-10-09T16:30: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": "539ff0bef8...
e395f7dd-232b-418b-aa7f-d7de41175362
DrZhang818/my-first-project
Problems/Atcoder/ABC415/C.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef double db; typedef pair<int,int> PII; typedef unsigned long long ull; const int inf = 1000000000; void solve() { int n; cin >> n; string t; cin >> t; t = '#' + t; vector<int> dp(1 << n); dp[0] = 1; for(int s = 0...
ALGO
0.99994
4.014764
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2025-07-05T09:35:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "26253fc4dfd...
abcfca87-7a65-425f-a8af-9d316726d507
Seymour-Lee/leetcode-solutions
binary_search/069. Sqrt(x).cpp
class Solution { public: int mySqrt(int x) { int left = 1, right = x, mid = left + (right - left) / 2; while (left <= right) { if (mid == x / mid) return mid; else { if (mid > x / mid) right = mid - 1; else left = mid + 1; mid =...
ALGO
0.99995
5.037475
{ "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": "9f3456e7...
d989fc46-9371-4ace-91b7-2126437b9fd3
ropufu/aftermath
src/ropufu/sequential/window_limited_cusum.hpp
#ifndef ROPUFU_AFTERMATH_SEQUENTIAL_WINDOW_LIMITED_CUSUM_HPP_INCLUDED #define ROPUFU_AFTERMATH_SEQUENTIAL_WINDOW_LIMITED_CUSUM_HPP_INCLUDED #ifndef ROPUFU_NO_JSON #include <nlohmann/json.hpp> #include "../noexcept_json.hpp" #endif #include "timed_transform.hpp" #include "window_limited_statistic.hpp" #include <conc...
TOOL
0.946586
7.739004
{ "github_metadata": { "branch": "main", "commit_count": 107, "repo_created_at": "2017-09-24T01:42: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": "36cd61ceea...
c5e372f7-f2bf-468b-abf5-56eb52d51139
zcoderz/cppAlgorithms
recursion/GenerateAllExpressions.h
// // Created by usman on 10/29/21. // #ifndef CPPALGORITHMS_GENERATEALLEXPRESSIONS_H #define CPPALGORITHMS_GENERATEALLEXPRESSIONS_H #include <vector> #include <set> #include <sstream> using namespace std; class GenerateAllExpressions { public: vector <string> generate_all_expressions(string s, long long int tar...
ALGO
0.987907
5.352689
{ "github_metadata": { "branch": "master", "commit_count": 185, "repo_created_at": "2021-10-20T00:44: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": "c1d85c5f...
c1425226-4e0b-45c0-84c6-85ed9b259326
SakshamSahgal/Competitive-Programming
Codeforces + Codechef/C. Division by Two and Permutation.cpp
#include<iostream> #include<cstring> #include<vector> #include<set> #include<map> #include<algorithm> #include<cmath> #include<climits> #define lli long long int #define GO_FAST ios_base::sync_with_stdio(0);ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); using namespace std; vector<lli> can_make(lli n) { vector<ll...
ALGO
0.999975
4.080566
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2021-12-26T10:02: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": "eb4fed638be...
871eb32f-5ff1-4ec0-b4c6-89e3ae67c9a9
Patrick-Louden/2.2
src/applications/staticProps/Hxy.cpp
/* * Copyright (c) 2005 The University of Notre Dame. All Rights Reserved. * * The University of Notre Dame grants you ("Licensee") a * non-exclusive, royalty free, license to use, modify and * redistribute this software in source and binary code form, provided * that the following conditions are met: * * 1. Re...
ALGO
0.992814
3.941388
{ "github_metadata": { "branch": "master", "commit_count": 1942, "repo_created_at": "2014-06-27T13: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": "f6d3285...
d2ef48c1-d782-4d1c-b14c-3657d87f8536
epsilon-0/codechef-solutions
medium/solved/stablemp.cpp
#include<cstdio> #include<iostream> #include<vector> #include<cstring> #include<algorithm> #include<numeric> #include<stack> #include<set> #include<map> #include<queue> #include<deque> #include<list> #include<climits> #include<cstdlib> #include<string> #include<cmath> using namespace std; #define inf 1000000007 #defi...
ALGO
0.999983
3.751052
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2016-11-27T21:57: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": "8c69414fba...
f01b6132-2e2d-4cad-b8b9-612fa72011b4
EazyReal/CompetitveProgramming
before2024/20191125CF602div2/pB.cpp
#include <bits/stdc++.h> using namespace std; int T, n; const int maxn = 100000+5; bool vis[maxn]; int minv; int maxv; int q[maxn]; //no need int a[maxn]; bool flag; int main() { cin >> T; while(T--) { cin >> n; memset(vis, 0, sizeof(vis)); minv = 1; flag = 0; for(int i = 0; i < n; i++) ci...
ALGO
0.999897
3.837426
{ "github_metadata": { "branch": "master", "commit_count": 243, "repo_created_at": "2019-09-29T05:33: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": "dd63b666...
c5c0546f-e839-4ca4-a9a0-99ba57d1181c
OpenDigitalTwin-Dev/FENGSim
toolkit/Geometry/vtk/ThirdParty/vtkm/vtk-m/vtkm/rendering/raytracing/MortonCodes.h
//============================================================================ // Copyright (c) Kitware, Inc. // All rights reserved. // See LICENSE.txt for details. // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURPOSE...
ALGO
0.999821
7.345634
{ "github_metadata": { "branch": "main", "commit_count": 1345, "repo_created_at": "2021-12-22T12:15:26.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 54, "forks": 15, "issues": 4, "pull_requests": 2 }, "file_meta": { "content_id": "ba057486...
bc2fd18f-15ea-4cbe-ac99-c4426fa4a110
changwoolab/Algorithm
Baekjoon/21736.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <math.h> #include <queue> #include <set> #include <unordered_map> #include <map> #include <list> #include <stack> #define pi pair<int, int> #define NOT_DEFINED 987654321 using namespace std; int n, m; char campus[601][601]; bool vis...
ALGO
0.999837
4.264088
{ "github_metadata": { "branch": "main", "commit_count": 217, "repo_created_at": "2022-01-06T02:26:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db02b63860...
7adc59ae-c0b1-4a7e-a3cc-8664b62246ce
laurentkneip/opengv
include/opengv/sac/MultiRansac.hpp
/****************************************************************************** * Authors: <NAME> & <NAME> * * Contact: <EMAIL> * * License: Copyright (c) 2013 <NAME>, ANU. All rights reserved. * * ...
ALGO
0.994919
7.541776
{ "github_metadata": { "branch": "master", "commit_count": 146, "repo_created_at": "2013-08-10T03:56:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1069, "forks": 355, "issues": 43, "pull_requests": 14 }, "file_meta": { "content_id": "2...
e988f22e-5d46-4c98-a3e3-ee079ff78f15
ki-opt/AtCoder-ABC
ABC101-ABC200/ABC148/E/src/src.cpp
#include <iostream> #include <vector> #include <algorithm> #include <map> #include <unordered_map> #include <cmath> #include <climits> #include <string> #include <queue> #include <stack> #include "atcoder/all" using ull=unsigned long long; using ll=long long; using namespace std; #define rep(iter, limit) for (int ite...
ALGO
0.999616
3.843953
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2023-02-05T05:00: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": "847313fe9...
05227b80-8a3c-4b22-aadc-05d1d297b37c
alexandraback/datacollection
solutions_5634947029139456_1/C++/arthurpd/a.cpp
#include <stdio.h> #include <set> #include <string.h> #include <stdlib.h> using namespace std; int n, l; long long a[160]; long long b[160]; long long count(long long x) { long long retv = 0; while(x != 0) { retv += x&1LL; x >>= 1LL; } return retv; } int main(void) { int T, t = 0; scanf("%d", &T); while(...
ALGO
0.99996
3.951129
{ "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": "978bb9cad...
04d96a79-247e-476d-bb98-15519b509469
Atiq31951/Light-OJ-Solutuins
LOJ_1019 - Brush (V).cpp
#include<cstdio> #include<cctype> #include<cstring> #include<cmath> #include<cstdlib> #include<climits> #include<cassert> #include<iostream> #include<sstream> #include<algorithm> #include<functional> #include<numeric> #include<utility> #include<vector> #include<string> #include<bitset> #include<list> #include<deque> #i...
ALGO
0.999819
3.575127
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-02-24T01:42:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1521f9ea96...
6f23a3f7-ec71-4105-bae0-6cb9d09cdad8
aayambhatt/DSA
04-BinarySearch-1D-Arrays/SearchInRotatedSortedArray2.cpp
#include<iostream> #include <vector> using namespace std; class Solution { public: bool search(vector<int>& nums, int target) { int n = nums.size(); int low = 0; int high = n - 1; while (low <= high) { int mid = (low+high)/2; if (nu...
ALGO
0.999988
5.707622
{ "github_metadata": { "branch": "main", "commit_count": 76, "repo_created_at": "2024-09-21T19:34:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9070772ab54...
bd570b41-66d0-44d8-aa97-6d324869fbdb
fanYichun/leetcode_nowcoder
lc1208.cpp
#include <string.h> #include <math.h> #include <stdlib.h> int equalSubstring(char* s, char* t, int maxCost) { int str_len = strlen(s); int max_len = 0; int index_p = 0; int sum_p = 0; for (int i = 0; i < str_len; i++) { // front pointer int diff = abs(s[i] - t[i]); int sum = sum_p...
ALGO
0.999955
4.914716
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-08-01T01:44:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "01a1d3984410...
8bb58f25-c0af-4488-8102-75ef215d9b04
IVLDen/skillbox_practic_14.6
z4.cpp
#include <iostream> int main () { float matrix_a [4][4]; float matrix_b [4]; float matrix_c [4]; std::cout << "Введите значения для матрицы А: \n"; for(int i = 0; i < 4; ++i) { for (int j = 0; j < 4; ++j) std::cin >> matrix_a[i][j]; } std::cout << "Введите з...
ALGO
0.999761
4.056734
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-02-06T20:36:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d81707c792e8...