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
5190e49f-7960-4500-a370-1fe3a4527715
Iamshankhadeep/100DaysOfCP
Day8/lcs.cpp
#include "bits/stdc++.h" using namespace std; #define sim template < class c #define ris return * this #define dor > debug & operator << #define eni(x) sim > typename \ enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) { sim > struct rge { c b, e; }; sim > rge<c> range(c i, c j) { return rge<c>{i, j}; } s...
ALGO
0.999995
4.58988
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2019-10-26T05:40:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0673a8d57...
e927949e-cf6a-4e05-a56a-7d35c21e4b1b
Otober/Algorithm_problem
백준/Platinum/11376. 열혈강호 2/열혈강호 2.cc
#include <iostream> #include <vector> using namespace std; const int N = 1005; vector < int > v[N]; bool visit[N] = {}; int work[N] = {}; bool f_dfs(int now) { if(visit[now]) return false; visit[now] = true; for(int i = 0; i < v[now].size(); i++) { int next = v[now][i]; if(!work[next] |...
ALGO
0.999828
3.235873
{ "github_metadata": { "branch": "main", "commit_count": 321, "repo_created_at": "2022-09-08T10:15:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1a4434e610...
26e158d1-1b12-4da9-98ea-2ac6d014c385
codingman/antivirus-112
Mail/Filters/Spamtest/kisaspam/KIS/profile_compiler/parse.cpp
/* Copyright (C) 2005 Ashmanov and Partners * * PROJECT: Kaspersky Personal Anti-Spam *//*! * \file parse.cpp * \author <NAME> * \brief Filtration Profiles Compiler *//* * COMPILER: MS VC++ 6.0 TARGET: Win32 * LIB: none * XREF: none *==============================================================...
TOOL
0.966349
3.986348
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-07-18T10:55:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5d07a3db5d...
7dc627d7-625a-4597-bc34-3b215c1ffd97
Samyc2002/CP
Codeforces/Problemset/Pleasant_Pairs.cpp
#include <algorithm> #include <bits/stdc++.h> using namespace std; #define all(cont) cont.begin(), cont.end() #define rall(cont) cont.rend(), cont.rbegin() #define PB push_back #define PI 3.1415926535897932384626433832795 #define endl "\n" typedef long int l; typedef unsigned long int ul; typedef long long int ll; ty...
ALGO
0.99959
4.050029
{ "github_metadata": { "branch": "main", "commit_count": 94, "repo_created_at": "2021-10-25T04:19:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "68d6d7ad3a0...
48d6720c-a698-4684-8077-cca5855aac64
aldrin112602/vowel-counter
main/vowelCounter.cpp
#include <iostream> #include <cstring> #include <cctype> using namespace std; int vowelCount(char * s) { int count = 0; while (( * s) != '\0') { if ( * s == 'a' || * s == 'A' || * s == 'e' || * s == 'E' || * s == 'i' || * s == 'I' || * s == 'o' || * s == 'O' || * s == 'u' || * s == 'U') { count++; ...
ALGO
0.999049
4.769828
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-12-11T16:45:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cc5b8a616728...
9f60c14e-094d-48d7-a554-e822ea2047ce
Ot2501783/TorresOmar_CSC5_40718
Assignments/Assignment 4/Savitch_9thEd_Chap4_Prob7/main.cpp
/* * File: main.cpp * Author: <NAME> * Created on January 22, 2015, 8:25 PM * Purpose: Savitch_9thEd_Chap4_Prob7_v1 */ //System Libraries #include <iostream> using namespace std; //User Libraries //Global Constants //Function Prototypes //Execution Begins Here! int main(int argc, char** argv) { //Declar...
ALGO
0.988282
3.792361
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2015-01-07T03:42: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": "d6dfff00f...
ada0cb13-f28e-4d28-871a-8007281ece64
Cantera/cantera
src/transport/GasTransport.cpp
//! @file GasTransport.cpp // This file is part of Cantera. See License.txt in the top-level directory or // at https://cantera.org/license.txt for license and copyright information. #include "cantera/transport/GasTransport.h" #include "MMCollisionInt.h" #include "cantera/base/stringUtils.h" #include "cantera/numeric...
ALGO
0.99336
6.353449
{ "github_metadata": { "branch": "main", "commit_count": 12093, "repo_created_at": "2015-03-26T16:54:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 689, "forks": 381, "issues": 68, "pull_requests": 21 }, "file_meta": { "content_id": "73c...
a9ed767f-e721-4d13-bd92-e0b2c85acba1
ishandutta2007/codeforces-f
fsouza/normal/1017/B.cpp
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <map> #include <memory> #include <numeric> #include <queue> #include <random> #incl...
ALGO
0.999976
3.760136
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:43:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "754ab1946645...
cad3b4c4-eb42-4372-977e-3d7bb52e5a03
Wild-Donkey/Code
Luogu/P5500-P5999/P5658 括号树.cpp
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <map> #include <queue> #include <vector> #include <windows.h> using namespace std; int t, n, a[10005], ans = 0; bool flg; char ch; string s; struct Node { char val; Node *fa, *fs...
ALGO
0.999912
3.025796
{ "github_metadata": { "branch": "main", "commit_count": 182, "repo_created_at": "2021-02-23T08:38:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "60ccd9d5b3...
086c59f4-4a61-4e68-8a9a-bc3ebe42c7d6
dizvyagintsev/MAI_2018_practice
Dichotomy/dichotomy_2.cpp
#include <iostream> #include <cmath> #include <iomanip> using namespace std; const double eps = 0.001, delta = 0.001 * 0.25; //константы double f(double x) {return pow(x, 3) / ((x + 2) * (x + 3));} //функция возращает f(x) double find_minimun(int i, double begin, double end){ //функция ищет минимум до тех пор по...
ALGO
0.99993
4.467051
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-08-06T10:55:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4384f4ae49...
9656e804-1ea0-47d8-a746-66bb49198465
Paulo-D2000/PopoSDR
include/Window.h
#include <Types.h> #include <Constants.h> /** * Window Functions * * Based on https://en.wikipedia.org/wiki/Window_function */ /** * Sinc [sin(pi*x)/pi*x] Function * @param x time, any `float` in range -infinite to infinite. * @return `F32` representing the function [sin(pi*x)/pi*x] at point x. * @note at poi...
ALGO
0.959893
7.202184
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2023-10-25T15:59:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5b624ac303...
0aada496-a706-4a05-8535-108072ca861e
cocoisarobo/14DaysCppChallenge
palindrome.cpp
//day 6 #include <iostream> #include <string> using namespace std; bool isPalindrome(string s, int left, int right) { while (left < right) { if (s[left] != s[right]) return false; left++; right--; } return true; } // you need to implement this function only bool canBePalindrome(st...
ALGO
0.999985
5.720846
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2025-01-05T15:45:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e311ba69c41...
d8c0a9c7-edc1-4705-80b5-a7ff80e4305a
JDMansion/Supreme_2.0
Sorting/searchInNearlySortedArray.cpp
#include<iostream> #include<vector> #include<algorithm> using namespace std; //Binary Search in a nearly Sorted Array int searchNearlySorted(int arr[], int n, int target) { int s = 0; int e = n - 1; int mid = s + (e - s)/2; while(s <= e) { if(mid-1 >=0 && arr[mid - 1] == target) { return mid - 1; ...
ALGO
0.999941
5.336737
{ "github_metadata": { "branch": "main", "commit_count": 118, "repo_created_at": "2023-09-14T09:10: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": "e42be16efe...
8c27fe12-5abd-40f5-808d-18a338bf942c
lklacar/openjk-emscripten
src/code/qcommon/cm_polylib.cpp
/* =========================================================================== Copyright (C) 1999 - 2005, Id Software, Inc. Copyright (C) 2000 - 2013, Raven Software, Inc. Copyright (C) 2001 - 2013, Activision, Inc. Copyright (C) 2013 - 2015, OpenJK contributors This file is part of the OpenJK source code. OpenJK is ...
ALGO
0.979657
4.671262
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2021-01-04T17:53:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 2, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "e9e2dfbe...
a451cdc3-08b4-41e7-bdf7-8b3b3a3bba5e
mym-br/eitannealing
src/solver.h
/* * solver.h * * Created on: Jun 27, 2010 * Author: thiago */ #ifndef SOLVER_H_ #define SOLVER_H_ #include "basematrix.h" #include "incomplete_cholesky.h" #include "circularbuff.h" //#include "nodecoefficients.h" class CG_Solver { protected: unsigned int it; double totalItTime, totalTriangularTime, ...
ALGO
0.998199
4.889947
{ "github_metadata": { "branch": "master", "commit_count": 760, "repo_created_at": "2024-07-23T00: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": "aad28b79...
ab24fdc7-c7be-4ae8-8247-72d288272fa7
orgTestCodacy11KRepos110MB/repo-8852-ginkgo
include/ginkgo/core/solver/direct.hpp
/*******************************<GINKGO LICENSE>****************************** Copyright (c) 2017-2022, the Ginkgo authors 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 co...
ALGO
0.989789
7.216585
{ "github_metadata": { "branch": "master", "commit_count": 5390, "repo_created_at": "2023-01-31T07:06:21.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e8d4a1d3...
de2e03c0-621f-4554-8241-f1aeced4943f
vinay030901/Algorithms
queue/queueImplentationLinkedList.cpp
#include<bits/stdc++.h> using namespace std; typedef struct nodetype { int data; struct nodetype *next; }node; node *push(node *front,node *rear,int ele) { node *ptr; ptr=(node*)malloc(sizeof(node*)); ptr->data=ele; if(rear==NULL) { cout<<"front value changed\n"; front=ptr; ...
ALGO
0.997654
3.288041
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2021-07-12T04:12: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": "da713575d...
111f8561-768e-486e-8d25-8178510fe354
n7arti/MIET.Bakalavriat
1 курс/2 семестр/C++/Project13/Project13/Source.cpp
#include <iostream> #include <stdio.h> #include <time.h> #include <windows.h> #include <clocale> using namespace std; #define N1 5 #define N2 10 int f1(int mass[], int size) // функция вычисляет положение последнего положительного элемента { int k = 0; for (int i = 0; i < size; i++) if (mass[i] > 0) k = i+1; ...
ALGO
0.999648
3.39466
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-01-08T13:05: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": "f09f6a78f628...
58ccbc9f-0338-4273-9875-9c8e92539026
Hardik-Sonawane/midtermdsa
adjacencymatrix.cpp
#include <iostream> using namespace std; int main() { int n; cout << "Enter number of cities: "; cin >> n; string cities[20]; for(int i = 0; i < n; i++) { cout << "Enter city " << i+1 << ": "; cin >> cities[i]; } int matrix[20][20] = {0}; char choice; do { ...
ALGO
0.998596
4.6061
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2025-04-03T16: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": "c921e745a147...
dc0e1d85-e5c2-4014-b803-409e10c76e10
sway-am/Submissions
C_Disappearing_Permutation.cpp
// DNB // C++ #pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") #include <bits/stdc++.h> #define nl "\n" #define F first #define S second #define vin(v,n) for(int i = 0; i<n; i++){cin>>v[i];} #define all(v) v.begin(), v.end() #define space " " #define int long long int #define INF...
ALGO
0.999984
4.498926
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2025-03-04T14:36:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "633fef44e...
1f8c9583-1430-4cf5-8e47-edd04e41e6d3
robinrst/HackerBlocks
classAssignment.cpp
#include "bits/stdc++.h" using namespace std; #define f first #define lgn 25 #define endl '\n' #define sc second #define N (int)2e5+5 #define sz(x) x.size() #define int long long int #define ld long double #define vi vector<int> #define vs vector<string> #define vc vector<char> #define mii map<int,int> #d...
ALGO
0.999787
3.809002
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2019-09-19T23:17:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 7, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "b4cdb0db7...
e5fab89b-dccf-41e8-ba82-b3bc657bb600
OpenMD/OpenMD
src/hydrodynamics/Ellipsoid.cpp
/* * Copyright (c) 2004-present, The University of Notre Dame. 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, ...
ALGO
0.994057
6.427453
{ "github_metadata": { "branch": "main", "commit_count": 3424, "repo_created_at": "2015-03-23T18:22:26.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 82, "forks": 33, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ba027cff...
24980910-ae1d-461d-84fb-934572c8ba39
npanuhin/ITMO-Algo
Segment tree/K.cpp
// ┌───────────────────────────────────────────┐ // │ Copyright (c) 2019-2022 <NAME> │ // │ Licensed under the MIT license │ // └───────────────────────────────────────────┘ // // ...
ALGO
0.999629
4.840491
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2021-12-18T22:43:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5cf9dc923...
7f61f151-4c34-4cb4-ad26-36115584b2bc
jms90h5/s2t_toolkit
toolkits/com.teracloud.streams.s2t/impl/include/ZipformerRNNT.cpp
#include "ZipformerRNNT.hpp" #include <fstream> #include <sstream> #include <algorithm> #include <iostream> #include <numeric> #include <functional> #include <thread> namespace onnx_stt { ZipformerRNNT::ZipformerRNNT(const Config& config) : config_(config) , env_(ORT_LOGGING_LEVEL_WARNING, "ZipformerRNNT") ...
DATA
0.949947
6.765033
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2025-05-20T19:33: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": "e8eda50dbf1...
2198b939-a056-48c6-a748-60f2da9e294f
keineahnung2345/leetcode-cpp-practices
216. Combination Sum III.cpp
//backtracking //Runtime: 0 ms, faster than 100.00% of C++ online submissions for Combination Sum III. //Memory Usage: 6.3 MB, less than 89.73% of C++ online submissions for Combination Sum III. //time: O((9!/(9-K)!)*K), there are P(9,K) combinations and the last recursion takes O(n) time //space: O(K) class Solution {...
ALGO
0.99997
6.228425
{ "github_metadata": { "branch": "master", "commit_count": 2080, "repo_created_at": "2018-11-25T06:48:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 284, "forks": 120, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "19e...
d92f514a-a631-49d4-abd1-206f991c2dd0
free3nvy/CodePractice
leetcode_c++/203.移除链表元素.cpp
/* * @lc app=leetcode.cn id=203 lang=cpp * * [203] 移除链表元素 */ // @lc code=start /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) ...
ALGO
0.999928
5.803477
{ "github_metadata": { "branch": "main", "commit_count": 42, "repo_created_at": "2023-02-15T08:24: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": "373038d8f08...
c7709551-ccb1-4b11-a074-6a2f5766b82c
task4233/contest
AtCoder/ABC/115/d.cpp
#include <bits/stdc++.h> // statics using namespace std; using int64 = int_fast64_t; using PAIR = pair<int64, int64>; constexpr int INF = 1 << 30; constexpr int64 LINF = 1LL << 60; constexpr int MOD = 1e9 + 7; constexpr int MAX_N = 1e5 + 1; // init/input #define int int64 #define INIT ios::sync_with_stdio(false);cin.t...
ALGO
0.999971
3.788283
{ "github_metadata": { "branch": "master", "commit_count": 143, "repo_created_at": "2018-03-08T13:28:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "1621dbf4...
059147e5-25d9-4fb8-bfd9-66cefed49b00
hianantk/Competitive-Programming
CodeForces/Codeforces Round 648/B.cpp
/*coderanant*/ #include <bits/stdc++.h> using namespace std; #define int long long #define ll long long #define f1(i,a,b) for(int i=a;i<b;i++) #define f2(i,a,b) for(int i=a;i>=b;i--) #define endl '\n' #define pb push_back #define gp " " #define ff first #define ss second #define mp make_pair #define ld long double co...
ALGO
0.999993
3.650831
{ "github_metadata": { "branch": "master", "commit_count": 523, "repo_created_at": "2019-06-04T09:58:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1ccbb544...
370b29e1-21b8-4a76-8eec-9c192f5a0b1e
calfcamel/BEF314
POJ刷题/1905.cpp
#include <cstring> #include <cstdio> #include <cmath> #include <cstdlib> #include <ctime> #include <iostream> #include <algorithm> //#include <unordered_map> #include <vector> #include <map> #include <set> #include <queue> #include <stack> #include <string> #include <bitset> #include <assert.h> #include <iomanip> using...
ALGO
0.999333
3.687327
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-03-13T17:47: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": "050653b741...
2a130c87-4ecb-4e2a-ada5-f1b37c061ce2
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/Mixtral/top0-100/sum-of-floored-pairs-Solution.sumOfFlooredPairs/177879_DoS_Exec_Code_Overflow.cpp
static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; int pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; if (!(fdctrl->msr & FD_MSR_RQM) || !(fdctrl->msr & FD_MSR_DIO)) { FLOPPY_DPRINTF("error: controller not ready for readin...
ALGO
0.98071
5.510095
{ "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": "d58624cdcbe6...
9a426d3f-898e-4169-b494-93ac589b2045
contact-aleksei/1_year_Tampere_programming_2
04/split/main.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; vector<string> split(string getstring, char separator, bool k=false){ vector<string> parts;vector<string> parts_no_empty ; size_t position = 0; string part; while ((pos...
TOOL
0.990603
4.755464
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2020-04-08T23:02: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": "f8c66d9180...
3529abec-b3b1-4c49-aad9-1c005e7763fa
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/MixtralExpert/top0-100/maximum-number-of-moves-to-kill-all-pawns-Solution.maxMoves/177816_Bypass.cpp
void get_checksum2(char *buf, int32 len, char *sum) { md_context m; switch (xfersum_type) { case CSUM_MD5: { uchar seedbuf[4]; md5_begin(&m); if (proper_seed_order) { if (checksum_seed) { SIVALu(seedbuf, 0, checksum_seed); md5_update(&m, seedbuf, 4); } md5_update(&m, (uchar *)buf, len); }...
ALGO
0.999469
4.506836
{ "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": "3bc27df8d35b...
f56b66db-4587-4199-86d8-35e7f71f895e
xcszbdnl/TrainingCode
AcmCode/hdu2841.cpp
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int maxn = 100011; int mobius[maxn]; int vis[maxn]; void getMobius() { memset(mobius, 0, sizeof(mobius)); memset(vis, 0, sizeof(vis)); mobius[1] = 1; for (int i = 2; i < maxn ; i++) { if (!vis[i]) { ...
ALGO
0.999955
4.597322
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2014-12-15T08:24: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": "9ab2695b4...
db8d44cd-957f-45e2-aa25-cd9f42f57b01
ArjunParajuli/DSA
Dynamic Programming/0_1_knapsack.cpp
#include<iostream> #include<vector> using namespace std; /* 2D DP: Knapsack Problem: codehelp: dp class 4 algo: - ek baar curr elm ko include karke recursion call karo - ek baar curr ko bina liye recursion call karo */ void printDPArray(vector<vector<int>> &dp){ for(int i=0;i<dp.size();i++){ for(int j=...
ALGO
0.999998
5.426516
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-08-09T13:50: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": "7f74ab9d6387...
6fc273f6-adb6-47e2-b7a7-7b044cdf19b7
blender/blender
extern/ceres/internal/ceres/line_search_direction.cc
// Ceres Solver - A fast non-linear least squares minimizer // Copyright 2023 Google Inc. All rights reserved. // http://ceres-solver.org/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of so...
ALGO
0.99974
5.313253
{ "github_metadata": { "branch": "main", "commit_count": 152123, "repo_created_at": "2019-10-09T12:47:28.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 15670, "forks": 2395, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1...
a9eacd16-f89d-41a7-9c57-ea2bcfe3351b
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/10/1029/personal_submission/cf358d_xylu.cpp
#include <bits/stdc++.h> using namespace std; void solveD() { int n; cin >> n; vector<int> a(n), b(n), c(n); for (int i = 0; i < n; i++) cin >> a[i]; for (int i = 0; i < n; i++) cin >> b[i]; for (int i = 0; i < n; i++) cin >> c[i]; vector<array<int, 4>> dp(n); // (middle first), 123, 32...
ALGO
0.999793
4.251495
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "bdd5...
178752f2-a18a-49f7-8abb-9b4bbe5b7a7a
ttzztztz/leetcodeAlgorithms
图论/943. Find the Shortest Superstring.cpp
class Solution { public: string shortestSuperstring(vector<string>& A) { const int N = A.size(), mask = (1 << N) - 1; vector<vector<int>> f(1 << N, vector<int>(N, 999999)), h(1 << N, vector<int>(N, -1)); vector<vector<int>> g(N, vector<int>(N, 0)); for (int i = 0; i < N; i++...
ALGO
0.999995
5.741873
{ "github_metadata": { "branch": "master", "commit_count": 872, "repo_created_at": "2019-09-03T06:57:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bd75ec2...
c71466fb-39f3-47a3-a619-e8b2d4ebf723
PatelManav/Codeforces_Backup
1279A.cpp
/*May The Force Be With Me*/ #include <bits/stdc++.h> #include <stdio.h> #include <ctype.h> #define ll long long #define MOD 1000000007 #define endl "\n" #define vll vector<long long> #define pll pair<long long, long long> #define all(c) c.begin(),c.end() #define pb push_back #define f first #define s second #define in...
ALGO
0.999956
4.234708
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2020-10-01T14:54:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cae2a22e2...
beda1f09-b9e5-4a87-ae62-533fb7912934
ghts2110/competitive_programing
uva/Mirror, Mirror/Mirror_Mirror.cpp
#include <iostream> #include <vector> #include <cmath> using namespace std; int n, test = 0; vector<vector<char> > deg(vector<vector<char> > &v){ vector<vector<char> > save(n, vector<char>(n)); for(int i = 0; i != n; i++){ for(int j = 0; j != n; j++){ save[j][n-1-i] = v[i][j]; } ...
ALGO
0.999919
4.438749
{ "github_metadata": { "branch": "main", "commit_count": 824, "repo_created_at": "2023-07-11T20:52:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "18ea37a9fe...
c8b022c0-a5a5-4065-be98-ac4d8376c1d6
cuteStarrr/SJTU_Courses
Problem_Solving_and_Practice/Ex6/test.cpp
#include <iostream> #include <vector> #include <cmath> #include <numeric> #include <string> #include <algorithm> #include <time.h> #include <sstream> #include <map> using namespace std; string SortChildren(string oldtree, int start, int end) { if((oldtree[start] != '1') || (oldtree[end] != '0')) {cout << '@' << '...
ALGO
0.999882
4.151912
{ "github_metadata": { "branch": "main", "commit_count": 64, "repo_created_at": "2022-03-28T07:10:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f9e74b547a9...
439fc4b8-a889-4698-a55b-4e48cb837425
TejaswiniNimbalkar14/DSA_practice
Basic DSA/Stacks/stack_using_queues.cpp
//Implement a stack using queues //Leetcode Problem: 225 //GFG Problem: https://practice.geeksforgeeks.org/problems/stack-using-two-queues/1# #include<iostream> #include<queue> using namespace std; //Approach 1: Using two stacks //TC: O(N) for push and O(1) for others. AS: O() class MyStack { public: queue<int> q...
ALGO
0.999224
5.555693
{ "github_metadata": { "branch": "main", "commit_count": 75, "repo_created_at": "2021-12-03T10: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": "086513b4ce9...
029ac815-c279-4cfd-8b5d-9312cd74edf5
dmehrab06/Time_wasters
codeforces/417/B.cpp
/*-------property of the half blood prince-----*/ #include <bits/stdc++.h> #include <dirent.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/detail/standard_policies.hpp> #define MIN(X,Y) X<Y?X:Y #define MAX(X,Y) X>Y?X:Y #define ISNUM(a) ('0'<=(a) && (a)<='9') #defin...
ALGO
0.999981
3.296677
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2017-09-26T07:24:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c5474d22a6...
ddddebbb-adee-44b3-947b-2f0d6ca8a4f1
ayushtamra/Problem-Solving-With-DSA
CP-Contests/Codechef/Starters-37/LaptopRecommendation.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define fast ios::sync_with_stdio(0); cin.tie(0); void solve(int n) { vector<int> arr; vector<int> count(11, 0); int x; for(int i=0;i<n;i++) { cin>>x; arr.push_back(x); } for(auto it:arr) { cou...
ALGO
0.999779
4.205209
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2022-04-05T09:55: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": "7f513f84c...
845e3bcb-07c5-4b34-a2d8-58d41ba99dc3
Vessalia/NN
NN/src/NeuralNet.cpp
/* Credit for the development of this code is attributed to <NAME> url: https://www.millermattson.com/dave/?p=54 */ #include "NeuralNet.h" #include <assert.h> double NeuralNet::m_recentAverageSmoothingFactor = 100.0; NeuralNet::NeuralNet(const std::vector<size_t>& topology, bool doLeaky) : m_error(0.0) , m_recentA...
ALGO
0.989239
5.800919
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2022-07-04T17:47:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "51c850cf586...
2313086d-8d09-4ae1-b92e-bd4f82de3fc8
PSPritish/Code_Backup
MixedPractice/MaximumArea.cpp
#include <bits/stdc++.h> using namespace std; #define int long long int #define ld long double #define endl "\n" void solve() { int w, h, n; cin >> h >> w >> n; set<int> a, b; multiset<int> c, d; a.insert(0); a.insert(h); b.insert(0); b.insert(w); c.insert(h); d.insert(w); ...
ALGO
0.999755
3.763853
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-10-29T18:05: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": "97d38638585...
122349d8-b795-43f0-8e4d-15913e44e82d
monadegmailcom/minimax
tic_tac_toe.h
#pragma once #include "rule.h" #include <array> namespace tic_tac_toe { typedef u_int8_t Move; constexpr u_int8_t n = 3; struct Rule : public GenericRule< Move > { Rule(Player*); virtual ~Rule() {} virtual GenericRule< Move >* clone() const; virtual void copy_from( GenericRule< Move > const& ); ...
ALGO
0.936752
6.291024
{ "github_metadata": { "branch": "main", "commit_count": 39, "repo_created_at": "2024-04-19T14:38: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": "bebdbc87c2c...
3bccaaa2-c12e-4ac7-a79b-dcbdd428c7b3
kejpmdt/backpack
Static/Workspace/CODES/Problems/Luogu/done/P1179/P1179.cpp
#include <cstdio> template <class T> inline T over_templatefunction_read(void) { T ans; static bool f; static char us = getchar(); ans = 0; f = false; while (us < 48 || us > 57) { f |= (us == 45); us = getchar(); } while (us > 47 && us < 58) { ans = (ans << 1) + (ans << 3...
ALGO
0.999673
3.730047
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-11-06T05:30: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": "4c1470256902...
46a56292-6a42-4e06-9651-8ac531ede7a4
luckydipper/data_structure_algirithm
programers/ 길 찾기 게임.cpp
// 1. STL custom sort // 2. stack frame을 이용한 BST 구현에는 double pointer 혹은 pointer Reference가 쓰인다. #include <string> #include <vector> #include <bits/stdc++.h> using namespace std; struct Node{ int x,y, idx; Node(int x, int y, int idx):x(x),y(y),idx(idx){;}; Node(const Node& n) = default; Node* l=nullpt...
ALGO
0.999973
4.879012
{ "github_metadata": { "branch": "main", "commit_count": 248, "repo_created_at": "2021-01-01T02:24: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": "30383a0276...
7996fdff-bd1c-472d-bc70-0dd025801cc7
Shikhar-S/Analysis-of-Competitive-Codebase
Data/Contest1245/all/29618236_64020182.cpp
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define ll long long ll calc_poss(ll n){ vector<ll> leer(2); vector<vector<ll> > dp(n, leer); dp[0] = {1, 0}; dp[1] = {1, 1}; for(int i = 2; i < n; i++){ dp[i][0] = (dp[i-1][0] + dp[i-1][1]) % MOD; dp[i][1] = dp[...
ALGO
0.999955
4.046574
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2019-11-22T14:40: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": "4b4a0deda...
c5b48245-fc0d-42ca-bff2-4dfbd36817ce
yoichiozaki/cpp-practice
aoj/itp17a.cpp
#include <bits/stdc++.h> using namespace std; int main(){ while (1) { int m, f, r; cin >> m >> f >> r; if (m == -1 && f == -1 && r == -1) { break; } if (m == -1 || f == -1) { cout << "F" << endl; continue; } else if (80 <= m + f) { ...
ALGO
0.998779
3.39458
{ "github_metadata": { "branch": "master", "commit_count": 1171, "repo_created_at": "2020-02-26T13:08: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": "f537137...
a4f1df8c-3a73-4f32-ad6b-4b2b9f77c3e9
gefeng/cp
codeforces/r630div2/C.cpp
#include <iostream> #include <utility> #include <cassert> #include <algorithm> #include <cmath> #include <array> #include <string> #include <vector> void run_case() { int N, K; std::cin >> N >> K; std::string S; std::cin >> S; int ans = 0; for(int i = 0; i < (K + 1) / 2; i++) { std::a...
ALGO
0.999935
4.71375
{ "github_metadata": { "branch": "main", "commit_count": 980, "repo_created_at": "2022-07-19T19:38: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": "9899a2e71f...
393765e6-ebc6-416d-bf3c-62d3f0061e42
yi-ge/cpp-practice
test/array/number_of_times_binary_string_is_prefix_aligned_test.cpp
#include <array/number_of_times_binary_string_is_prefix_aligned.cpp> TEST(二进制字符串前缀一致的次数, numTimesAllBlue) { Solution solution; // 示例 1: // 输入:flips = [3,2,4,1,5] // 输出:2 // 解释:二进制字符串最开始是 "00000" 。 // 执行第 1 步:字符串变为 "00100" ,不属于前缀一致的情况。 // 执行第 2 步:字符串变为 "01100" ,不属于前缀一致的情况。 // 执行第 3 步:字符串变为 "01110" ,不属于前...
TEST
0.974515
5.987163
{ "github_metadata": { "branch": "main", "commit_count": 402, "repo_created_at": "2022-07-04T11:52:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 2, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "6cabf2521...
b1a635bb-6ff6-4b63-8f24-2418358380b1
sachuverma/DataStructures-Algorithms
Leetcode Daily Challenge/October-2021/16. Best Time to Buy and Sell Stock III.cpp
/*You are given an array prices where prices[i] is the price of a given stock on the ith day. Find the maximum profit you can achieve. You may complete at most two transactions. Note: You may not engage in multiple transactions simultaneously (i.e., you must sell the stock before you buy again). Example 1: Input: pr...
ALGO
0.999967
5.983687
{ "github_metadata": { "branch": "master", "commit_count": 1430, "repo_created_at": "2020-10-07T10:08:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2049, "forks": 541, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "9a...
3806b376-9a27-4c55-a77c-9098a1f76ed1
Infinempty/uestcacm
模板/Template/DLX.cpp
//n行m列的01矩阵,挑选出若干行,使得对于矩阵的每一列j,在你挑选的这些行中,有且仅有一行的第j个元素为1 #pragma GCC optimize (3) #include<bits/stdc++.h> #define ll long long #define rgi register int #define rgl register ll #define il inline const int N=510; int n,m,idx,ans; int first[N],siz[N],stk[N]; struct DLXNODE { int lc,rc,up,dn,r,c; }; inline int read() { ...
ALGO
0.999998
3.392086
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2020-05-22T13:21:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "92e4396b0...
f260b9a4-4d64-460b-b86c-29aec60fcec6
mohitxsh/DSA-Problems
DP/0-1_Knapsack.cpp
#include<bits/stdc++.h> using namespace std; int solve(vector<int>& weights, vector<int>& prices, vector<vector<int>>& dp, int n, int w){ if(n==0 or w==0){ return 0; } if(dp[n][w]!=-1){ return dp[n][w]; } if(weights[n]>w){ dp[n][w] = solve(weights,prices,dp,n+1,w); } ...
ALGO
0.999998
4.445664
{ "github_metadata": { "branch": "main", "commit_count": 52, "repo_created_at": "2021-10-17T16:43: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": "33e00ff86cd...
f2dcf9ab-b50d-40c7-9b7b-c86a8db429b4
leekensei/PS_SWEA
1976_시각덧셈.cpp
//1976. 시각 덧셈 #include <iostream> #include <vector> using namespace std; class calcTime { int h1,m1; int h2,m2; int overflow = 0; public: calcTime(){}; calcTime(int h1,int m1,int h2,int m2){ this->h1 = h1; this->m1 = m1; this->h2 = h2; this->m2 = m2; } ...
ALGO
0.999674
3.4952
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2020-03-16T11:21: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": "4109885b1...
e194ab8c-1a12-4de0-8709-68b6e579c076
CodeToExpress/dailycodebase
day31/C++/bubbleSort.cpp
/* * @author : imkaka * @date : 1/2/2019 * */ #include<iostream> #include<vector> using namespace std; void bubblesort(vector<int>& arr){ int N = arr.size(); bool swapped; for(int i = 0; i < N-1; ++i){ swapped = false; // Optimizing part for(int j = 0; j < N-i-1; ++j) // (j, j+1) A...
ALGO
0.999786
5.69269
{ "github_metadata": { "branch": "master", "commit_count": 373, "repo_created_at": "2018-12-17T12:59:49.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 224, "forks": 152, "issues": 46, "pull_requests": 42 }, "file_meta": { "content_id": "0c6...
4a2ba46a-a69e-4097-bd6b-df0d97bba266
hung1605/DSA_PTIT
DSA02035.cpp
#include <bits/stdc++.h> using namespace std; int n,k; string a[10]; int x[10]; bool chuaxet[10]; int ans; void cal(){ string tmp[10]; for(int i = 1; i <= n; i++){ tmp[i] = ""; for(int j = 0; j < k; j++){ tmp[i] += a[i][x[j]]; } } int top = 0, bot = 1e9; for(int i = 1; i <= n; i++){ top = max(top, sto...
ALGO
0.999941
3.989428
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-04-16T15:52:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a62e323489bd...
752fde33-455d-4721-b59e-680bfde1cf04
JotaroS/Atcoder-Jotaro-Solutions
arc099/A/main.cpp
#include<stdio.h> #include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cs...
ALGO
0.999941
3.51833
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2019-12-02T13:36: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": "559607ba8...
ab9332ca-83c2-4e2e-b0c6-428ab64ab06b
lee-shun/fixed_wing_group_2019
thrower_mission.cpp
/*************************************************************************************************************************** 无人蜂群 2019 @file:/home/ubuntu/ws_dji/src/Onboard-SDK-ROS/dji_sdk_demo/src/mission_thrower.cpp @author: Zzy @date:2019.04.07 @date:2019.04.19 *******************************************************...
TOOL
0.946491
3.241392
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2019-11-13T09:10:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "59cddcfc18...
96d74571-3754-4fd1-8d77-07741d7b2245
ishandutta2007/codeforces-d
deemo/normal/414/D.cpp
#include<iostream> #include<algorithm> #include<vector> using namespace std; typedef long long ll; const int MAXN = 1e5 + 10; int n, k, money, cnt[MAXN], p[MAXN], mx; ll pp[MAXN]; vector<int> adj[MAXN]; void dfs(int v, int p = -1, int de = 0){ cnt[de]++; for (int u:adj[v]) if (u^p) dfs(u, v, de + 1); mx = ...
ALGO
0.999896
3.780658
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:31: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": "c85689e5ecf6...
26442783-22c5-490b-84bc-3caa9b717432
beingcrazyy/Leetcode
MergeLL.cpp
#include <iostream> using namespace std; class ListNode{ public: int val; ListNode *next; }; class LinkedList{ public: ListNode CreateLL(int Array[] , int size); }; ListNode LinkedList :: CreateLL(int Array[] , int size){ ListNode *head; head = new ListNode; head->val = NU...
ALGO
0.999994
5.497667
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2022-11-23T06:43: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": "342a62df068...
022fb805-29a2-4411-b597-3f226c1d094d
Akashkarmokar/CP
Codeforces/CFR_757/b.cpp
/* Author : UntilOver Topic: Prerequisite: Algorithm: TimeComplexity: */ #include "bits/stdc++.h" using namespace std; #define ll long long #define ull unsigned long long #define debug(x) { cerr << #x << " = " << x << endl; } #define fastread ios_base::sync_with_stdio(false);cin.tie(N...
ALGO
0.999923
3.840453
{ "github_metadata": { "branch": "master", "commit_count": 160, "repo_created_at": "2020-06-29T20:29: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": "1c340142...
8e8d69de-06b5-4a7f-940d-5613c6d1cd37
NephrenCake/Algorithm
AcWing/蓝桥杯C++AB组/第六讲 双指针、BFS与图论/1240. 完全二叉树的权值.cpp
#include <cstring> #include <cstdio> #include <iostream> #include <algorithm> #include <queue> using namespace std; // https://www.acwing.com/problem/content/1242/ const int N = 1e5 + 10; int n, ans = 1; long long max_; int a[N]; int main() { cin >> n; for (int i = 1; i <= n; i++) cin >> a[i]; ...
ALGO
0.999875
3.632171
{ "github_metadata": { "branch": "master", "commit_count": 91, "repo_created_at": "2022-03-05T10:21: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": "0f92e14d8...
8dce53e6-8615-4f61-aefb-f6171de71fcb
yuanmingyi/LeetCode-OJ
100.Spiral Matrix II.cpp
#include <iostream> #include <vector> #include <string> #include <list> #include <set> #include <sstream> #include <algorithm> #include <cstdio> #include <cstdlib> #include <cstring> #include <cassert> #include <cmath> using namespace std; class Solution { public: vector<vector<int> > generateMatrix(int n) { ...
ALGO
0.999878
4.189298
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2013-02-24T23:00:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "33a7886df...
dcfe8bbc-7f94-4515-9244-7bfd1b4b23ec
Aryan5744/DSA_Programs
11.Amazon_Archives/2/Left_View_Of_Binary_Tree.cpp
#include<bits/stdc++.h> using namespace std; #define gc getchar_unlocked #define fo(i,n) for(long long int i=0;i<n;i++) #define fr(i,n) for(i = n-1 ; i>0 ; i--) #define Pa(i,n,a) for(long long int i=0;i<n;i++){cout << a[i] << " ";} #define Ia(i,n,a) for(long long int i=0;i<n;i++){cin >> a[i];} #define Fo(i,k,n) for(i=k...
ALGO
0.99999
3.92406
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2021-01-02T04:45:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "091cecf688...
c7f1d043-ba11-42e1-a3fc-2918e3562794
MijaelTola/icpc
coursera/Graphs/clustering.cpp
#include <iostream> #include <algorithm> #include <queue> #include <stack> #include <vector> #include <climits> #include <map> #include <set> #include <cassert> #include <cstdio> #include <cstring> #include <cmath> #include <deque> #include <string> #include <sstream> #include <cstdlib> using namespace std; typedef ...
ALGO
0.9998
3.866562
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-08-28T22:47: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": "02c15acf17...
a761eda2-3eda-4e07-8672-612abc639fe6
krucios/advent_of_code_2022
10.cpp
#include <algorithm> #include <iostream> #include <fstream> #include <cstdint> #include <sstream> #include <utility> #include <vector> #include <stack> #include <array> #include <map> using namespace std; int x = 1; array<array<char, 40>, 6> matrix; void advance_cycle(size_t& cycle) { int crt_col = (cycle - 1) %...
ALGO
0.999936
5.339324
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-12-27T21:30: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": "05e6baa88f83...
60be3427-ca92-477e-a822-766183fff0b4
Suimei-University-of-the-Arts/Summer2017
round5/dsu/files/checker.cpp
#include "testlib.h" #include <vector> #include <string> #include <algorithm> struct DSU { std::vector<int> parent, rank; DSU(int size) { parent.resize(size); rank.resize(size); for (int i = 0; i < size; ++i) { parent[i] = i; rank[i] = 0; } } void merge(int a, int b) { if (rank[...
ALGO
0.99933
4.581703
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2017-06-18T11:47:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "67739165de3...
5063490b-2e51-4faf-9e75-5af794719de6
ishandutta2007/codeforces-s
sky3141/normal/1760/G.cpp
#include <bits/stdc++.h> using namespace std; using LL = long long; constexpr int N = 200000 + 9; void solve() { int n, a, b; cin >> n >> a >> b; --a; --b; vector<vector<pair<int, int>>> e(n); vector<int> w1(n), w2(n); for (int i = 1; i < n; ++i) { int u, v, w; cin >> u...
ALGO
0.99975
5.242279
{ "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": "0106765b8c85...
09bd0a96-6b63-4cd1-a876-c35a9b63d628
GABOBB/TANK_ATTACK
Graph.h
// // Created by gbb on 28/09/24. // #ifndef GRAFO_H #define GRAFO_H #include <iostream> // Para imprimir en consola con std::cout #include <vector> // Para utilizar std::vector en la representación de la matriz de adyacencia #include <queue> // Para usar std::priority_queue en los algoritmos de A* y ...
ALGO
0.981496
3.807086
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2024-09-28T23:43: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": "b566a5e7bf2...
02fb279c-5b22-42dc-a4de-6ab4012af362
yili3366/algorithms_in_cpp
chap1/1.2.cpp
#include <iostream> static const int N = 20; static const int TRUE = 0; static const int FALSE = 1; int main() { int i, j, p, q, id[N]; for (i = 0; i < N; i++) id[i] = i; while (std::cin >> p >> q) { if (!(p < N) || !(q < N)) { std::cout << " file " << __FILE__ ...
ALGO
0.999572
3.849428
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2014-12-25T15:43:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5326e220d...
45834452-701c-4851-a635-31071972670b
ituacm/ITU-ACM-AlgoTeam
Regular-Question-Answers/get-maximum-in-generated-array.cpp
// Author: <NAME> // Question Link: https://leetcode.com/problems/get-maximum-in-generated-array/ // Reviewers: <NAME>, <NAME>, <NAME> // Time Complexity : O(n) // Space Complexity : O(n) class Solution { public: /* In the question, we are given an integer n and we are asked to create an array of size n+1 as writ...
ALGO
0.999977
6.801243
{ "github_metadata": { "branch": "main", "commit_count": 764, "repo_created_at": "2022-06-11T06:58:43.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 23, "forks": 40, "issues": 0, "pull_requests": 11 }, "file_meta": { "content_id": "679814fc...
35184afc-98d7-41b5-8f27-b8c76148510a
c3-competitiveprogramming/cp-template-isadoravrx
spoj/senha.cpp
#include <iostream> #include <vector> using namespace std; vector<vector<int>>letras(5); vector<vector<int>>senhas(6); void busca(int letra_senha, int pos_senha,int i){ if(i == 0){ senhas[pos_senha][0] = letras[letra_senha][0]; senhas[pos_senha][1] = letras[letra_senha][1]; }else{ for...
ALGO
0.997809
3.435928
{ "github_metadata": { "branch": "master", "commit_count": 220, "repo_created_at": "2023-04-01T13:52:06.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "1cac64c5c...
ea77296d-a315-4979-bd80-49a10c78481c
zexuanc2/cs225git
MPs_labs/mp_mazes/maze.cpp
/* Your code here! */ #include "maze.h" #include <sys/time.h> #include <vector> #include <queue> #include <iostream> using namespace std; //a default constructor creating an empty maze SquareMaze::SquareMaze(){ } /* Makes a new SquareMaze of the given height and width. If this object already represents a maze it will...
ALGO
0.999533
4.510606
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-01-03T17:46:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4f2a944fdc1e...
e7c4715e-656a-40e2-a085-79b38524c38d
rabbanidev/XPSC
contest/codechef/START159/Elections.cpp
#include <bits/stdc++.h> #define el "\n" using namespace std; void solve() { int n, x; cin >> n >> x; vector<int> arrA(n), arrB(n); for (int i = 0; i < n; i++) cin >> arrA[i]; for (int i = 0; i < n; i++) cin >> arrB[i]; int countA = 0, countB = 0; vector<int> needVotes; ...
ALGO
0.999995
4.20015
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2024-10-27T08: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": "2a5eec94bd2...
ca6abee6-9655-4e21-9052-98bf8fa45470
star-bnl/star-mcgen
StRoot/StarGenerator/Pythia8_1_62/src/SigmaTotal.cc
// SigmaTotal.cc is a part of the PYTHIA event generator. // Copyright (C) 2012 <NAME>. // PYTHIA is licenced under the GNU GPL version 2, see COPYING for details. // Please respect the MCnet Guidelines, see GUIDELINES for details. // Function definitions (not found in the header) for the SigmaTotal class. #include "...
ALGO
0.998225
6.153858
{ "github_metadata": { "branch": "main", "commit_count": 388, "repo_created_at": "2020-11-09T19:27:38.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 6, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "5c47027b6d9...
f69554ef-d1b1-4b4b-8e89-12fe2eab5d33
dart-mih/Uncontrolled-mosaic
CombinePhotosAlgs.h
#include <iostream> #include <ctime> #include <opencv2/opencv.hpp> #include "Shots_normalization/PhotoAndCameraInf.h" using namespace std; using namespace cv; /* A function that combines all images into one canvas at the coordinates specified in find_positions_images. num_photos - number of photos. num_first_broken_...
DATA
0.978033
4.677692
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2022-04-20T14:29:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "92455ee8276...
3e3f622d-9a5a-4b7c-a981-5efe8318c08c
qiforan/CSNOTE
interview/leetcode/editor/cn/221_maximal-square.cpp
#include <bits/stdc++.h> using namespace std; //leetcode submit region begin(Prohibit modification and deletion) class Solution { public: int maximalSquare(vector<vector<char>>& matrix) { if(matrix.size() == 0 || matrix[0].size() == 0) return 0; const int r = matrix.size(); cons...
ALGO
0.999956
6.050829
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2020-12-29T06:02:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8eaf30a39...
c7c16d1e-b53d-4a9f-9829-d2fbee64db7d
edisonhello/competitive_programming
Codeforces/contests/Hello 2015 Div.2 virtual 100571/C.cpp
// #pragma GCC optimize("no-stack-protector") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") // #pragma vector temporal // #pragma simd // #pragma GCC diagnostic ignored "-W" #include<cassert> #include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<ctime> #include<a...
ALGO
0.999581
3.690943
{ "github_metadata": { "branch": "master", "commit_count": 843, "repo_created_at": "2016-03-15T14:58:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "016187fe...
a768b83f-8345-4f77-8912-ea9102465999
Sourav9063/Cpp-All-codes
programmes codeforces/LittleElephantandBits.cpp
// Name: <NAME> and Bits #include<bits/stdc++.h> using namespace std; #define lli long long int //lld #define ulli unsigned long long int //llu #define db double //lf #define Ld long double //Lf #define pt cout<<"*"<<endl; #define nl cout<<endl; #define pb(a) emplace_back(a) #define all(x) ...
ALGO
0.999949
3.19005
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2020-02-28T05:22:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "18cdbee3d...
df44081a-c3e0-4e6b-981c-6aabf39537b4
ashahrior/UVA-mysolutions
vol-11400/11448 Who Said Crisis.cpp
#include<bits/stdc++.h> using namespace std; #define read() freopen("in.txt", "r", stdin) #define write() freopen("out.txt", "w", stdout) #define mclr(a) memset(a,0,sizeof(a)) #define mset(a) memset(a,-1,sizeof(a)) #define pb(a) push_back(a) #define pf printf #define sf scanf #define LL unsigned long long #define lolo ...
ALGO
0.999923
4.0722
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-10-04T11:50: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": "d28c0a744f...
44fdccd9-4702-46a2-90cc-74d7c3d442ec
ishandutta2007/codeforces-k
kirill22/normal/1559/D1.cpp
#include<bits/stdc++.h> using namespace std; template <typename A, typename B> string to_string(pair<A, B> p); template <typename A, typename B, typename C> string to_string(tuple<A, B, C> p); template <typename A, typename B, typename C, typename D> string to_string(tuple<A, B, C, D> p); string to_string(const st...
ALGO
0.99996
4.044377
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:06:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cbf5431476c3...
7d7de58f-37cc-4b98-90d8-74595301178f
felixchenfy/Monocular-Visual-Odometry
src/geometry/epipolar_geometry.cpp
#include "my_slam/geometry/epipolar_geometry.h" #include "my_slam/basics/config.h" #define PRINT_DEBUG_RESULT true namespace my_slam { namespace geometry { // ------------------------------------------------------------------------------------------- // ---------------- Main: Motion from Essential and Homography; ...
ALGO
0.997964
5.804295
{ "github_metadata": { "branch": "master", "commit_count": 100, "repo_created_at": "2019-01-03T02:54:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 446, "forks": 94, "issues": 5, "pull_requests": 1 }, "file_meta": { "content_id": "0faa5...
3568271a-0a17-4be7-89a0-d9947f6d593a
sudhirpatel2024/DSA_with_C_C-dsa
array/array adt1/main.cpp
#include <iostream> using namespace std; struct array { int a[20]; int size; int length; }; void display(struct array arr){ int i; for(i=0;i<arr.length;i++){ cout <<arr.a[i]<<" "; } } void swap(int *x,int *y){ int temp; temp=*x; *x=*y; *y=temp; } // append a value in array ...
ALGO
0.999481
3.495226
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-03-13T16:06: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": "7b0e85102873...
181cc325-6684-412a-a251-f8f30812e69f
ThereWillBeOneDaypyf/Summer_SolveSet
poj/poj_1837.cpp
#include<iostream> #include<algorithm> #include<vector> #include<queue> #include<vector> #include<cmath> #include<cstdio> #include<cstring> #include<string> #include<stack> #include<map> #include<set> using namespace std; //thanks to pyf ... //thanks to qhl ... #define INF 0x3f3f3f3f #define CLR(x,y) memset(x,y,sizeo...
ALGO
0.999971
3.370535
{ "github_metadata": { "branch": "master", "commit_count": 310, "repo_created_at": "2017-06-13T13:45:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "ec93005b...
2c46b5e3-9a98-4ee6-bb20-dbe16735c1ce
didw/coding
algospot/algosrc/src/boggle/boggle.cpp
#include<iostream> #include<cstring> #include<algorithm> #include<sstream> #include<string> #include<vector> #include<cmath> #include<cstdio> #include<cstdlib> #include<fstream> #include<cassert> #include<numeric> #include<set> #include<map> #include<queue> #include<list> #include<deque> using namespace std; #define F...
ALGO
0.992266
4.376956
{ "github_metadata": { "branch": "master", "commit_count": 96, "repo_created_at": "2015-12-01T04:53:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "253881a0b...
c1aded41-6d98-4ba4-b41c-4e0b8b8666cd
love2d/love
src/libraries/lz4/lz4.h
/* * LZ4 - Fast LZ compression algorithm * Header File * Copyright (C) 2011-2017, <NAME>. BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are ...
TOOL
0.912821
6.957256
{ "github_metadata": { "branch": "main", "commit_count": 5566, "repo_created_at": "2019-05-25T18:43:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 6881, "forks": 486, "issues": 88, "pull_requests": 6 }, "file_meta": { "content_id": "c9bc...
a1ffa490-39e9-4ba7-aa37-77dd0e91f83b
chenhui-bupt/leetcode
621.任务调度器.cpp
/** * 算法:贪心算法-优先最近的大任务 */ class Solution { public: int leastInterval(vector<char>& tasks, int n) { unordered_map<char, int> mp; for (char task : tasks) { mp[task]++; } // 1.初始化:记录任务下次执行时间和剩余任务数 vector<int> nextTime; vector<int> restTasks; for (auto [k, v] : mp) { nextTime.push_back(1); ...
ALGO
0.999982
6.603913
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2020-01-29T08:26: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": "8bf946010...
cd599fae-036c-42fb-92d3-82cabfae71cd
ToraSpencer/cppStudy
CppStudy/DSAtest/triMesh.cpp
#include "triMesh.h" #include <iostream> #include <fstream> #include <string> #include <unordered_set> #include <unordered_map> #ifndef NOMINMAX #define NOMINMAX #endif #include <windows.h> namespace TRIANGLE_MESH { unsigned readNextData(char*& pszBuf, unsigned& nCount, char* validData, const unsigned nMaxSize) ...
TOOL
0.93686
3.187503
{ "github_metadata": { "branch": "master", "commit_count": 147, "repo_created_at": "2020-12-23T09:31:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "93b004b3...
090d752a-f110-4584-ac5e-afc5fedaca9a
soroush-tabesh/Competitive-Programming
SPOJ/NAJPF.cpp
//In The Name of Allah //Fri 6/11/96 #include <bits/stdc++.h> #define Init ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0) #define forar(i,n) for(long long int i = 0; i < n;i++) #define fori(i,a,b) for(long long int i = a; i < b;i++) #define WFile freopen("test.in","r",stdin),freopen("test.out","w",stdout) #define...
ALGO
0.99995
3.607451
{ "github_metadata": { "branch": "master", "commit_count": 71, "repo_created_at": "2017-10-13T16:34: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": "617fb1930...
d0a9ff49-63aa-445c-8b1c-a160ba6f4f7f
ElianMelo/urionlinejudge-cpp
problemas/1179 - Preenchimento de Vetor IV.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int v_impar[5], v_par[5], pos_impar = 0, pos_par = 0, num; for(int i = 0; i < 15; i++){ cin >> num; if(num % 2 == 0){ v_par[pos_par] = num; pos_par += 1; if(pos_par == 5){ for(int i = 0; i <...
ALGO
0.999707
3.597741
{ "github_metadata": { "branch": "master", "commit_count": 117, "repo_created_at": "2018-10-30T20:50: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": "08ae1ff8...
0d2af750-a101-4ac5-a772-19092303d7d1
Tpanyasr/Systems-Program
assignments/Assignment 2/PANYASRIVINIT_THOMAS.cpp
#include <stdio.h> #include <iostream> #include <string.h> #include <string> #include <unistd.h> #include <sys/mman.h> #include <vector> #include <sys/wait.h> using namespace std; #define PAGESIZE 4096 typedef unsigned char BYTE; typedef struct chunkhead{ unsigned int size = size; unsigned int info = 0; u...
ALGO
0.910689
3.083849
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2022-01-29T21:22: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": "79be2570e...
9c18671c-e9ba-4657-a118-4c36b0140bbe
1vanyk1/Awimul
app/src/main/cpp/mesa/compiler/glsl/opt_if_simplification.cpp
#include "ir.h" namespace { class ir_if_simplification_visitor : public ir_hierarchical_visitor { public: ir_if_simplification_visitor() { this->made_progress = false; } ir_visitor_status visit_leave(ir_if *); ir_visitor_status visit_enter(ir_assignment *);...
ALGO
0.978642
7.070615
{ "github_metadata": { "branch": "master", "commit_count": 66, "repo_created_at": "2020-11-30T16:14:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 6, "pull_requests": 0 }, "file_meta": { "content_id": "a66a3fc30...
0ea406d0-30b8-4ee7-8878-f8164d51ef42
shayo/Planner
MEX_CODE/FastInterp3/FastInterp3.cpp
#include <stdio.h> #include <math.h> #include "mex.h" #define TRI(x,y,z,V000,V010,V100,V110,V001,V011,V101,V111) (( (V000) * (1-z)+(V001) * (z))*(1-y)+( (V010) * (1-z)+(V011) * (z))*(y)) * (1-x) + (( (V100) * (1-z)+(V101) * (z))*(1-y)+( (V110) * (1-z)+(V111) * (z))*(y))*(x) #define MAX(x,y)(x>y)?(x):(y) #define NAN 0 ...
ALGO
0.997993
6.267187
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2015-04-21T13:09:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 16, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "8e6a687...
64f093cd-6810-4c19-9616-757f0681c36b
YttriumWillow/OI
ContestData/NOIP-20-8/Bp.cpp
#include <bits/stdc++.h> using namespace std; long double eps = 1e-15; const int N = 2e5 + 5; int n; long double sum; long double a[N]; inline long double get(long double qwq) { if (qwq > sum / n) return 1e18; int l = 1, r = n; long double L = qwq, R = sum / n, now = sum, len = n - 1; while (len) { ...
ALGO
0.999957
4.25145
{ "github_metadata": { "branch": "main", "commit_count": 58, "repo_created_at": "2023-08-30T03:08:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a0afa9c6de0...
40e8061a-b3b0-4cec-ae76-243400adb8e9
enkerewpo/OI-Public-Library
比赛 CONTEST/2021“MINIEYE杯”中国大学生算法设计超级联赛/2021“MINIEYE杯”中国大学生算法设计超级联赛(8)/std/1003.cpp
#include <bits/stdc++.h> using namespace std; int read() { int tot = 0, fh = 1; char c = getchar(); while ((c < '0') || (c > '9')) { if (c == '-') fh = -1; c = getchar(); } while ((c >= '0') && (c <= '9')) { tot = tot * 10 + c - '0'; c = getchar(); ...
ALGO
0.99986
4.18059
{ "github_metadata": { "branch": "master", "commit_count": 117, "repo_created_at": "2018-01-21T08:50:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1527, "forks": 380, "issues": 2, "pull_requests": 1 }, "file_meta": { "content_id": "c27...
6b10686e-0cd3-42fe-b941-57d94823a404
ROHIT318/Cpp-programming
C++/11/11.cpp
/* Write a program to create a class DLList to implement doubly linked list of template type. The program should have support for ordered inseron and deleon of a node. Provide a method revlist() that will contain the nodes of the doubly linked list but in reverse order. */ #include <iostream> using namespace std; /...
ALGO
0.998783
5.728024
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2020-01-23T06: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": "25199ec5a...
2403c88d-bf31-4ac9-992b-cf7551dc857e
n22dcdk069/LeMinhQuan_Mon-C
Chapter7/Challenges/bai8.cpp
#include <iostream> const int SIZE = 3; bool isLoShuMagicSquare(int square[][SIZE]) { // Calculate the sum of the first row to use as a reference int sumReference = 0; for (int j = 0; j < SIZE; ++j) { sumReference += square[0][j]; } // Check the sum of each row for (int i = 1; i < SIZ...
ALGO
0.999175
6.249047
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-11-17T11:04: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": "49946fb07b6b...
5fd7c5bf-21d8-4089-82b4-667edbdd3f1d
priyavrat-misra/dsa-dump
problems/misc/ABCDEF.cpp
// https://www.spoj.com/problems/ABCDEF/ #include <iostream> #include <algorithm> #include <vector> using namespace std; int main() { int n; cin >> n; vector<int> v(n); for (int i = 0; i < n; ++i) cin >> v[i]; vector<int> lhs, rhs; for (int a = 0; a < n; ++a) for (int b = 0; b < n; ++b) for (int c = 0; ...
ALGO
0.999954
3.596705
{ "github_metadata": { "branch": "master", "commit_count": 93, "repo_created_at": "2022-06-10T07:59: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": "f17ca7a4a...