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
06057ec2-95cf-43f8-9eed-f68e7c5b5b4c
ivanfortunesky/AYED_K1001
EJ1.2.1.10.cpp
/* EJ1.2.1.10.cpp * * Created on: 10/04/2022 * Author: 895 #include <iostream> #include <string> #include <locale.h> using namespace std; int dias_de_los_meses(int mes_anterior){ switch (mes_anterior){ case 1: return 31; break; case 2: return 28+31; //59 break; case 3...
ALGO
0.996679
3.743048
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2022-04-19T23:12: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": "151c05c4a20...
cbc14f51-5c56-469e-a691-c5cbd40794e6
KAI-LXII/LearnCybersecurity
Problem10/RegularExpressionMatching.cpp
// Implement pattern matching for . and *, // Where . matches any single character. // * Matches zero ormore of the preceeding element. #include <string> #include <iostream> using namespace std; class Solution { // A kind of hacky solution I wrote. Should be O(n). public: bool isMatch(string s, string p) ...
ALGO
0.96421
5.439259
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2024-10-07T02:20: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": "c40104e65a...
ecf34fad-05f5-4b40-a512-b938a97ba64b
sdinulescu/MAT201B
assignment/final/final-project-sketch5.cpp
/* final.cpp * Written by <NAME> * This is my final project for MAT201B, taught by <NAME>. * This program is a simulated environment of flocking agents. * Incorporating an evolutionary algorithm, as time progresses, we see changes in flocking shape. */ //allolib includes #include "al/app/al_DistributedApp.hpp"...
ALGO
0.999169
5.12347
{ "github_metadata": { "branch": "master", "commit_count": 115, "repo_created_at": "2020-01-07T20:54: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": "09fcc678...
58cd641c-ed84-4bd3-af87-ea49d63d8703
ashutoshdas1212/DSA-Questions
knapsack.cpp
#include <bits/stdc++.h> int helper(int *weights, int *values, int n, int w, int int **output) { if (n == 0 || w == 0) { return 0; } if (output[n][w] != -1) { return output[n][w]; } if (weights[0] > w) { int ans = helper(weights + 1, values + 1, n - 1, w, outpu...
ALGO
0.999996
4.533205
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-03-11T12:09: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": "b1ff0b4b12...
ab0d1563-28ae-4e5a-a8ff-5cc41f7378e0
priyallsinghall/labmanualsem2
a2q8.cpp
/*Find the length of the longest subsequence of consecutive integers in an unsorted array. Example: Input: [1, 9, 3, 10, 2, 20] Output: 3 (The longest consecutive subsequence is [1, 2, 3]).*/ #include <iostream> using namespace std; int main() { int n; cout << "Enter the number of elements in the array: "; ...
ALGO
0.99976
4.708858
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2025-01-29T17:45: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": "ca76ed31870...
5a971dee-5160-4c9c-8aa6-603855dcfac1
doitcodingtest/C
정렬/1517_버블소트2.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; void merget_sort(int s, int e); static vector<int> A; static vector<int> tmp; static long result; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int N; cin >> N; A = vector<int>(N + 1, 0)...
ALGO
0.999926
4.639751
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2022-07-13T03:02:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 27, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c037e206...
9c61e6b3-46b9-4cfb-a37a-e5e98a21a5e0
huzefazaheer/craftmine
raycaster.h
#include "config.h" #include "block.h" #include "vector" // Helper function to check ray-AABB intersection bool rayIntersectsBlock(const glm::vec3& rayOrigin, const glm::vec3& rayDirection, const Block& block, float& intersectionDistance) { glm::vec3 blockMin = block.getMin(); glm::vec3 blockMax = block.getMax();...
ALGO
0.999363
7.02085
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2025-04-22T12:21: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": "0f649f8fb14...
ca0c7b63-6ef0-436a-b50f-60880e06b387
gsaket/impl
Gregandfriends.cpp
// My first problem after a long time, dp, nice state transition using bfs!! // http://codeforces.com/problemset/problem/295/C #include<bits/stdc++.h> using namespace std; #define ll long long #define pii pair<int,int> #define pll pair<ll,ll> #define pdd pair<double,double> #define X first #define Y second #define rep(...
ALGO
0.999863
3.295795
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2017-08-07T12:57:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "07f6c69a81...
1e7b1cfd-ee3a-4385-9306-81a36d774efa
HariAakash646/CompetitiveProgramming
CSES/sum_of_divisors.cpp
#include <bits/stdc++.h> using namespace std; #define scd(t) scanf("%d", &t) #define sclld(t) scanf("%lld", &t) #define forr(i, j, k) for (int i = j; i < k; i++) #define frange(i, j) forr(i, 0, j) #define all(cont) cont.begin(), cont.end() #define mp make_pair #define pb push_back #define f first #define s second t...
ALGO
0.999931
4.169309
{ "github_metadata": { "branch": "main", "commit_count": 123, "repo_created_at": "2022-09-08T07:58:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7479f40785...
7f1c7b95-cb6a-4f5c-84b3-33dba8373f7a
lwtdzh/wentanLogServer
tools/bpsearch.cpp
/** * Program for searching by B+ tree. * Only used for the logs by WT log system. * Date: 2019/8/8. * Author: LiWentan. * How to use: * You need to have the parameters: * 1. path: The path to storaging logs. * 2. stime: Start time. * 3. etime: End time. * 4. key: The key. * 5. conten...
ALGO
0.996105
5.013528
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-08-15T08:26: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": "57392f92d1...
988e8e45-13d0-4995-820d-8f26e584d06d
Arkade7/matriks
main.cpp
#include <iostream> #include <conio.h> using namespace std; struct a { int arr[10][10]; }; struct a matriks [2]; int input(int &baris, int &kolom,int nomor) { cout << "masukkan kolom matriks "<<nomor<<" = "; cin>>kolom; cout << "masukkan baris matriks "<<nomor<<" = "; cin>>baris; for (int i ...
ALGO
0.988383
3.506813
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-12-19T04:19: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": "f0d82e05a75a...
b60586f6-acbe-4cca-9081-f9f11eaf8078
vfolunin/archives-solutions
LeetCode/1102.cpp
class Solution { void dfs(vector<vector<int>> &a, int y, int x, vector<vector<int>> &visited, int threshold) { visited[y][x] = 1; static vector<int> dy = { -1, 0, 1, 0 }; static vector<int> dx = { 0, 1, 0, -1 }; for (int d = 0; d < dy.size(); d++) { int ...
ALGO
0.999938
6.099086
{ "github_metadata": { "branch": "master", "commit_count": 2367, "repo_created_at": "2017-11-27T10:19:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 1, "pull_requests": 5 }, "file_meta": { "content_id": "3642b10...
2a2434fa-f3f7-4672-9256-6e38e7ed44fa
LMY/aoc2020
aoc04.cpp
#include <algorithm> #include <fstream> #include <iostream> #include <vector> // "aocXY.extension" -> "aocXY.txt" #define PUZZLE_INPUT_FILENAME (std::string(__FILE__).substr(0, std::string(__FILE__).find('.') + 1) + "txt") static auto readFileLines(const std::string filename) { std::ifstream infile(filename); std...
ALGO
0.961256
5.631766
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2020-12-01T08:51:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b47b17125...
2b3bf35b-3d4f-4e7b-9433-51c6bd9643aa
elmaxxo/LeetCode
Data-Structure-I/Day-1/maximum_subarray.cpp
/* * Given an integer array nums, find the contiguous subarray * (containing at least one number) which has the largest sum and return its sum. * * A subarray is a contiguous part of an array. * * Example 1: * * Input: nums = [-2,1,-3,4,-1,2,1,-5,4] * Output: 6 * Explanation: [4,-1,2,1] has the largest su...
ALGO
0.999944
6.486007
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2022-06-05T20:04: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": "73a863807...
5689b422-1408-4de7-a660-2ded13f80e54
JaspreetSAujla/Slot_Machine_Simulator
CPP/SlotMachine.cpp
#include <iostream> #include <cstdlib> #include <ctime> // Use instead of built in arrays. #include <vector> using namespace std; class SlotMachine { /* A simple class which performs the operation of a slot machien. Methods: SlotMachine = Initialises the variables. run = Runs the code...
ALGO
0.954467
4.431615
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2020-08-18T12:22:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "94bd1e344...
6f57213d-3a6c-40a5-b873-62bd912e3fcb
ShivPatel031/DSA
Graph/Alien_Dictionary.cpp
// Alien Dictionary GFG // Given a sorted dictionary of an alien language having N words and k starting alphabets of standard dictionary. Find the order of characters in the alien language. // Note: Many orders may be possible for a particular test case, thus you may return any valid order and output will be 1 if the ...
ALGO
0.999984
5.190571
{ "github_metadata": { "branch": "main", "commit_count": 400, "repo_created_at": "2024-06-17T09:52:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f2951472b5...
5e9e0c50-63ae-4204-ac0f-617be8775880
gaitanOS/cplusplus
Mutex_Example/main.cpp
#include <iostream> #include <cstdlib> #include <pthread.h> using namespace std; #define thread_num 15 int mutex = 0; void *printmsg(void *t_id){ while(1){ if(mutex){ cout << "thread " << long(t_id) << " locked...waiting for mutex unlock...\n" << endl; } else{ mutex = 1; //lock cout ...
ALGO
0.923697
4.544259
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2018-10-29T00:13: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": "3e74b724f...
4ffb9e8d-a2ab-4561-87c8-d5fd0e566e12
arangodb/arangodb
3rdParty/boost/1.78.0/boost/geometry/srs/projections/proj/nell.hpp
// Boost.Geometry - gis-projections (based on PROJ4) // Copyright (c) 2008-2015 <NAME>, Amsterdam, the Netherlands. // This file was modified by Oracle on 2017, 2018, 2019. // Modifications copyright (c) 2017-2019, Oracle and/or its affiliates. // Contributed and/or modified by <NAME>, on behalf of Oracle. // Use, m...
TOOL
0.972755
6.579088
{ "github_metadata": { "branch": "devel", "commit_count": 51986, "repo_created_at": "2011-10-26T06:42:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13878, "forks": 857, "issues": 743, "pull_requests": 38 }, "file_meta": { "content_id": ...
02e38330-a954-44a5-8671-4d5dc15a1fef
thirtiseven/ACM
NTUPC2018/H.cc
#include <iostream> #include <cstring> const int maxn = 55; int minecraft[maxn][maxn]; int main(int argc, char *argv[]) { int T; std::cin >> T; while(T--) { memset(minecraft, 0, sizeof(minecraft)); int n, m; std::cin >> n >> m; for (int i = 1; i <= n; i++) { for (int j = 1; j <= m; j++) { std::cin...
ALGO
0.999789
3.569367
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2017-06-03T05:27: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": "33f31f9d2...
92fac66d-f025-4ee1-a753-0e5edbd0c432
Techlead-ANKAN/C-Language
DOUBLE LINKED LIST/2_INSERT AFTER A NODE.cpp
# include <stdio.h> # include <stdlib.h> struct node { int data; struct node *next; struct node *prev; }; int main() { struct node *head, *one, *two, *three, *temp, *newnode; head = NULL; one = (struct node*)malloc(sizeof(struct node)); two = (struct node*)malloc(sizeof(struct node)); three = (struct node*)m...
ALGO
0.998689
4.345757
{ "github_metadata": { "branch": "MASTER", "commit_count": 2, "repo_created_at": "2023-10-07T15:34: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": "e18afbd9a4...
a1d12447-9b8a-4653-afdb-9c0143275b8b
wslee/euphony
thirdparty/z3/src/opt/opt_solver.h
/*++ Copyright (c) 2013 Microsoft Corporation Module Name: opt_solver.h Abstract: Wraps smt::kernel as a solver for optimization Author: <NAME> (t-anphan) 2013-10-16 Notes: Based directly on smt_solver. --*/ #ifndef OPT_SOLVER_H_ #define OPT_SOLVER_H_ #include "util/inf_rational.h" #include...
ALGO
0.992213
6.800109
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2018-02-24T16:34:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 25, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3933bc52...
3bf79bfa-8450-4498-ab9a-7f721d32f04f
piyush1146115/Competitive-Programming
Light oj/1338 - Hidden Secret.cpp
#include<bits/stdc++.h> using namespace std; int main() { int fq[30], fq2[30]; int test; scanf("%d", &test); getchar(); for(int tc = 1; tc <= test; tc++){ string s1, s2; getline(cin, s1); getline(cin, s2); memset(fq, 0, sizeof(fq)); memset(fq2, 0, sizeof(...
ALGO
0.999887
3.626523
{ "github_metadata": { "branch": "master", "commit_count": 68, "repo_created_at": "2019-09-30T18:09:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f020dfb92...
fb5a86b2-a84c-4a18-a903-794fe5e89cfb
praneetha2005/CRYPTO
program 38.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #define MATRIX_SIZE 2 #define ALPHABET_SIZE 26 // Function to find the multiplicative inverse of a number modulo 26 int mod_inverse(int a, int m) { for (int x = 1; x < m; x++) { if ((a * x) % m == 1) { return x; } } ret...
ALGO
0.999999
4.446755
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-06-22T05:02: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": "d61c9af131e1...
65fdcbb6-b86f-4494-9ef1-49a991ef773b
humanoid-path-planner/hpp-constraints
tests/convex-shape-contact-function.hh
// Copyright (c) 2014, LAAS-CNRS // Authors: <NAME> (<EMAIL>) // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // 1. Redistributions of source code must retain the above copyright // notice, this list of con...
ALGO
0.971931
6.389684
{ "github_metadata": { "branch": "devel", "commit_count": 1251, "repo_created_at": "2014-03-26T13:00:12.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 15, "issues": 3, "pull_requests": 1 }, "file_meta": { "content_id": "6f0c08c5...
f6550683-2bdb-44b8-b4a7-e869be2b6094
justicezyx/puzzles
match_wild_card.cc
#include "common/common.h" using namespace std; ass Solution { public: bool isMatch(const char *s, const char *p) { int s_len = strlen(s); if (strlen(s) == 0) { while (*p != '\0') { if (*p != '*') { return false; } ...
ALGO
0.999819
4.784455
{ "github_metadata": { "branch": "main", "commit_count": 97, "repo_created_at": "2013-05-18T01:49:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "137e081300a...
d377c8fd-e264-4f62-8305-1b14eaecb993
MichalNowicki/PUT_AndroidOrientation
OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Sparse/TriangularSolver.h
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2008 <NAME> <<EMAIL>> // // Eigen is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either //...
ALGO
0.992984
6.707307
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2014-05-05T19:22:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 15, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cfce5ad1f...
87d5d8a9-e31a-471d-ad78-3d5717a20ad7
mohamedrayyan/Mastermind
main.cpp
/* * File: main.cpp * Author: <NAME> * Created on September 13, 2019, 19:33 */ //System Libraries #include <cstdlib> #include "Iris.h" using namespace std; //Function Prototypes void aboutIris(); void check(Iris *&); int main(int argc, char** argv) { aboutIris(); //Declare variables && initial...
ALGO
0.994701
3.934739
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-09-28T16:41: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": "88fb60049b...
b5477903-e285-4cd9-97dd-b53db3264d86
wcordova/EjerciciosAlgormitmos
InventarioError.cpp
#include <iostream> #include <string> using namespace std; // Definición de una estructura para un Producto struct Producto { int codigo; string nombre; int cantidad; }; // Definir un tamaño máximo para el inventario const int MAX_PRODUCTOS = 100; Producto inventario[MAX_PRODUCTOS]; int totalProductos = 0...
TOOL
0.969148
5.745433
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-08-31T16:12: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": "c8665ae21dea...
dd8962a4-03af-4f10-a0ba-dc1e83249635
Vcoch27/NguyenVanHoang_codegymtest
bai5.cpp
#include <iostream> using namespace std; // hàm fibonacci int fibonacci(int n) { if (n <= 1) return n; return fibonacci(n - 1) + fibonacci(n - 2); } int main() { int n; cout << "Nhap n (1 <= n <= 30): "; cin >> n; while (n <= 0 || n > 30) { cout << "n phai nam trong khoang...
ALGO
0.998619
3.614958
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2025-04-26T03:32: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": "a2ff236211...
f172fa98-bed3-4118-8add-eb811be66a66
watchdog1023/TitanOS
headers/Neuron.h
#ifndef NEURON #define NEURON #include<vector> #include<iostream> #include<fstream> #include<sstream> #include<cstdlib> #include<cassert> #include<cmath> using namespace std; class Neuron; typedef vector<Neuron> Layer; // ****************** class Neuron ****************** class Neuron { public: Neuron(unsigne...
ALGO
0.96149
4.152426
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2017-03-13T15:46: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": "68a3c47d1...
99e7c58f-3971-47ed-abee-5463650466d4
codingwill/competitive-programming
LeetCode/Gemastik/tempCodeRunnerFile.cpp
#include <bits/stdc++.h> /* ** Author: wkwkwill (<NAME>.) ** 2020/09/02 */ using namespace std; using ll = long long int; ll BIG = 1e18 + 1; ll MOD = 1e9 + 7; void solve(); ll fastpow(ll x, ll y, ll n = BIG) { x %= n; ll ans = 1; while (y > 0) { if (y & 1) ans = (ans * x) % n; x = (...
ALGO
0.999718
3.829054
{ "github_metadata": { "branch": "master", "commit_count": 85, "repo_created_at": "2019-10-06T03:28:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "16cf3cad8...
02d79e96-956f-449e-a604-41e877e5bb7c
Teucka/roulettesimulator
main.cpp
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <time.h> #include <windows.h> #include <tchar.h> #include <strsafe.h> #include <conio.h> #define PRINTTEXTS 1 void readInt(int *i, char *text) { printf("%s: ", text); scanf_s("%d", i); } void readChoice(int *i, char *text) { while (*i < 1 || *i > ...
ALGO
0.978911
3.69372
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-01-09T22:25: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": "a014b96868...
39ba314e-2aae-4221-a97c-1e0a12641962
MagicCodeB/GDUT
操作系统/操作系统实验/OSexperirent/OS3-2/main.cpp
#include<stdio.h> #include<stdlib.h> #define SIZE 600 // 内存初始大小 #define MINSIZE 5 // 碎片最小值 enum STATE { Free, Busy }; struct subAreaNode { // 起始地址 int addr; // 分区大小 int size; // 作业号 int taskId; // 分区状态 STATE state; // 分区前向指针 subAreaNode *prior; // ...
ALGO
0.999844
4.503245
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-07-05T09:13:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b407b6fda2f4...
7208ceca-cf97-4d64-964d-b6003132ec70
jrbn/trident
src/trident/binarytables/storagestrat.cpp
/* * Copyright 2017 <NAME> * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version ...
ALGO
0.991876
5.802006
{ "github_metadata": { "branch": "master", "commit_count": 78, "repo_created_at": "2017-01-05T18:07:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7b8ed7005...
4a9d7f5f-6872-4661-b662-a918533832cd
blackbeardONE/CheggHero
coursehero_auto_reg/txtsource/264c.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int,int> ii; #define fill(a,x) memset(a,x,sizeof(a)) #define pb push_back #define sz(x) (int)x.size() #define F first #define S second #define FOR(i,a,b) for(int i = a; i<=b; ++i) #define NFOR(i,a,b) for(int i =...
ALGO
0.999908
3.709253
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2018-09-17T03:12:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "68cf6797b...
77dfe80e-e36c-44f2-8e16-42336fbc3bcf
luciendgolden/TWMailer
server/commons/helper.h
// // Created by <NAME> on 30.10.18. // #ifndef SERVER_HELPER_H #define SERVER_HELPER_H #include <stdio.h> #include <stdlib.h> #include <string> #include <dirent.h> #include <iostream> #include <sstream> #include <fstream> #include <sys/stat.h> #include <fstream> int check_for_user_dir(const char *searchPath, int lo...
TOOL
0.900292
4.656582
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2018-10-26T10:39:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0b1b9f1cb0...
a8b56710-c42a-486f-8b51-9b29a7c89193
dacase/afnmr
src/MEAD/ElectrolyteByAtoms.cc
#include "MEAD/ElectrolyteByAtoms.h" #include "MEAD/CubeLatSpec.h" #include "MEAD/SolvAccVol.h" #include <iostream> // First some utilities for implementation of ElectrolyteByAtoms -------- struct IShell { // A simplified version of class Shell Coord coord; float radius; }; class CLIShell { // A simplified versi...
TOOL
0.952926
5.798548
{ "github_metadata": { "branch": "main", "commit_count": 326, "repo_created_at": "2020-02-17T18:56:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c536066c1e...
e80793b6-31bb-4835-b1a7-1ba5abac449e
krishna0303/Competetive-Programming-Codes
lbcs/Binary_Tree/BT.cpp
#include<bits/stdc++.h> using namespace std; struct BinaryTree{ int info; struct BinaryTree *left; struct BinaryTree *right; BinaryTree(int x){ info = x; left = right = NULL; } }; void preOrderTraversal(struct BinaryTree *root){ if(root){ cout<<root->info<<endl; ...
ALGO
0.99999
4.445606
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2020-03-22T20:08: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": "1f1244ed0...
bb35061e-db9f-4f02-a591-29dbf3e6f337
okovtun/P_11
Pointers/Split/main.cpp
#include<iostream> using namespace std; void FillRand(int arr[], const int n); void Print(int arr[], const int n); void main() { setlocale(LC_ALL, ""); const int n = 10; int arr[n]; FillRand(arr, n); Print(arr, n); //1) Вычисляем необходимые размеры массивов: int even_count = 0; int odd_count = 0; for (int ...
ALGO
0.997784
4.245044
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2022-04-27T17:14: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": "644ab096f...
9fe97804-fe4f-4387-8652-e72539ae550d
ArifKhan18/Competitive-Programming-II
Cses/Introductory_Problems/Grid_Coloring_I.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; using ld = long double; #define endl '\n' #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define point(x) fixed << setprecision(x) #define Fast...
ALGO
0.999968
4.833964
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2025-06-02T04:39:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d66b333fc...
5a97f08a-11c8-4ab0-9948-3dd5400b979e
jgillham/AwesomeRobot
exp/dense-graph/src/main-path-finder-minus-heuristic.cpp
#include <iostream> #include <fstream> #include <boost/config.hpp> #include <boost/graph/graph_traits.hpp> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/dijkstra_shortest_paths.hpp> #include <boost/progress.hpp> #include "graph.hpp" #include "func.hpp" #include <cassert> using namespace boost; int...
ALGO
0.990778
3.96628
{ "github_metadata": { "branch": "master", "commit_count": 154, "repo_created_at": "2012-11-20T13:01:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7f5b16db...
5e5299bf-cda9-41df-bfb6-cbfc8766b07c
d4n1elchen/online-judge
LeetCode/1.two-sum/1.two-sum.cpp
/* * @lc app=leetcode id=1 lang=cpp * * [1] Two Sum * * https://leetcode.com/problems/two-sum/description/ * * algorithms * Easy (45.40%) * Total Accepted: 2.9M * Total Submissions: 6.4M * Testcase Example: '[2,7,11,15]\n9' * * Given an array of integers, return indices of the two numbers such that the...
ALGO
0.999941
6.215224
{ "github_metadata": { "branch": "master", "commit_count": 105, "repo_created_at": "2017-01-23T12:15: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": "3a281742...
3855e72f-f81f-4617-a3f3-4ff6b8fdc488
jtrugman/EE553-HW
final-exam-practice/day5/fraction.cc
#include <iostream> using namespace std; template <typename T> class Fraction { private: T num, den; public: Fraction (T num, T den) : num(num), den(den) {} Fraction (T num) : num(num), den(1) {} Fraction friend operator + (const Fraction& a, const Fraction& b){ return Fraction(a.num * b.den ...
TOOL
0.955826
4.725251
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-12-16T16:37: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": "734cc3707b...
5062d1eb-e127-4202-af35-da81ac80c835
DComEX/dcomex-framework
korali/source/auxiliar/rtnorm/new_implementation/rtnorm.cpp
// Pseudorandom numbers from a truncated Gaussian distribution. // // This implements an extension of Chopin's algorithm detailed in // N. Chopin, "Fast simulation of truncated Gaussian distributions", // Stat Comput (2011) 21:275-288 // // Copyright (C) 2015 <NAME> // Copyright (C) 2012 <NAME>, <NAME> // (LSI...
ALGO
0.999303
5.815321
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2023-05-04T14:10:35.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7b5e6ac3d4...
9b80728f-eeff-47ba-87d9-558b7f9bb6cd
twoupload/Codetree
240807/두 배열의 곱 2/multiple-of-two-arrays-2.cpp
#include <iostream> using namespace std; int a[4][2]; int b[4][2]; int c[4][2]; int main() { // 여기에 코드를 작성해주세요. for(int i = 0; i < 4; i++) { for(int j = 0; j < 2; j++) { int num; cin >> num; a[i][j] = num; } } for(int i = 0; i < 4; i++) { f...
ALGO
0.999934
4.175678
{ "github_metadata": { "branch": "main", "commit_count": 809, "repo_created_at": "2024-02-08T03:21: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": "ce99cf5f83...
b4961376-ee38-433a-9fcd-a9cbc6b1d08c
Larry-LL/Ballbot-MPC
Arduino_Code/PID_Control_Duplicate/PID_Control_Duplicate.ino
#include <PID_v1.h> #include <BasicLinearAlgebra.h> #include <Wire.h> #include <Adafruit_Sensor.h> #include <Adafruit_BNO055.h> #include <utility/imumaths.h> #include <PID_v1.h> #include <math.h> using namespace BLA; uint16_t BNO055_SAMPLERATE_DELAY_MS = 100; Adafruit_BNO055 bno = Adafruit_BNO055(55, 0x28, &Wire); /...
TOOL
0.926064
4.839421
{ "github_metadata": { "branch": "main", "commit_count": 54, "repo_created_at": "2024-11-12T18:19: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": "431421d6a09...
a1a340ee-55ae-462d-bc98-975fdd555307
wanglinjie/coding
leetcode/201.cpp
#include <iostream> using namespace std; /* Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers in this range, inclusive. For example, given the range [5, 7], you should return 4. 从两个数字最高位开始判断相应位是否相等 记录相应位是否相等情况 从高位往低位遍历,记录开始第一个相应位不相同的位置,这个位置以及位置以后的元素应该为0 */ class Solution { ...
ALGO
0.999987
5.073158
{ "github_metadata": { "branch": "master", "commit_count": 249, "repo_created_at": "2015-12-15T01:17: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": "deef08e4...
01a82fc1-611d-4a11-abbd-5ebc50a2b645
sduerr85/OpenBuildEnergyPlus
src/EnergyPlus/ThermalComfort.hh
#ifndef ThermalComfort_hh_INCLUDED #define ThermalComfort_hh_INCLUDED // ObjexxFCL Headers #include <ObjexxFCL/FArray1A.hh> #include <ObjexxFCL/Optional.hh> // EnergyPlus Headers #include <EnergyPlus.hh> #include <DataGlobals.hh> namespace EnergyPlus { namespace ThermalComfort { // Using/Aliasing // Data // MO...
TOOL
0.914871
3.821229
{ "github_metadata": { "branch": "master", "commit_count": 2124, "repo_created_at": "2020-04-01T19:06: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": "8b621e2...
ca87c4f6-4fae-4a40-830a-4656ce4202da
proteinprospector/prospector
libucsf/lu_mat_score.cpp
/****************************************************************************** * * * Library : libucsf * * * ...
ALGO
0.981563
4.456154
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2015-10-25T00:26:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4e593be2f5a...
be0b2436-79dc-467f-a8f7-6e86f3d2f1c3
swapnil159/My-CP-Submissions
Educational_Rounds/39/C.cpp
/* winners never quit and quitters never win. #swap */ #include <bits/stdc++.h> using namespace std; typedef long long int ll; #define mod 1000000007 #define pb push_back #define mp make_pair #define vc vector #define fs first #define sec second #define pq priority_queue #define lb...
ALGO
0.999975
3.502838
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2019-04-25T12:38: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": "e6374ecce...
978d8b68-1680-4859-abc1-76fbfbc75326
jasonduong11/CPSC-335
Lectures/11-15/sort/heap_sort.cpp
#include <iostream> using namespace std; void sift(int a[], int k, int n) { int i, j, x; i = k; x = a[i]; while ((j = 2*i + 1) < n) { if (j < n - 1 && a[j] < a[j + 1]) j++; if (x >= a[j]) break; a[i] = a[j]; i = j; } a[i] = x; } void heapSort(int a[], int n) { int x; for (int k = n / 2 - 1; k >= 0; k--) ...
ALGO
0.999869
4.425902
{ "github_metadata": { "branch": "main", "commit_count": 63, "repo_created_at": "2021-08-31T20:09: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": "ca995b1e51a...
792ec475-e829-49e5-8240-a06134cfeda3
Uranusz/leetcode
z/152_maximum_product_subarray.cc
/* * ===================================================================================== * * Filename: 152_maximum_prodect_subarray.cc * * Description: * * Version: 1.0 * Created: 01/05/2016 09:53:27 PM * Revision: none * Compiler: gcc * * Author: YOUR NAME...
ALGO
0.999948
5.655802
{ "github_metadata": { "branch": "master", "commit_count": 62, "repo_created_at": "2015-09-13T07:59:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "1502bed2e...
3c0d3045-c23b-47a8-b42f-06e1778ba56e
velazqua/competitive-programming
online-judges/UVa/11340/11340.cpp
/* <NAME> * Start: Tue Dec 27 14:24:34 EST 2011 * End : Tue Dec 27 14:34:41 EST 2011 */ #include <iostream> #include <vector> #include <set> #include <map> #include <algorithm> #include <sstream> #include <cmath> #include <cstdio> #include <deque> #include <string> using namespace std; int main () { int T; cin >...
ALGO
0.956656
3.624261
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2013-09-10T14:41:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f48c6d463...
0dad81bb-7ec1-4d17-be5c-bab05402b164
renyajie/Learning
Algorithm/提高/搜索/DFS之搜索顺序/单词接龙.cpp
#include<iostream> using namespace std; const int N = 20; int g[N][N]; string words[N]; int used[N]; int n; int ans; void dfs(int i, int cnt) { ans = max(ans, cnt); used[i]++; for(int j = 0; j < n; j++) { if(g[i][j] && used[j] < 2) { dfs(j, cnt + words[j].size() - g[i...
ALGO
0.999852
3.560834
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2021-03-18T13:03: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": "f432e3c635...
ab7d2f98-d3c8-4a30-901d-f4da77ad69a6
thanhhungg/CTDL_PTIT
CTDL_PTIT/DSA01009.cpp
#include <bits/stdc++.h> using namespace std; #define endl "\n" int a[100], n, k; vector<string> v; void in() { cout<<v.size()<<endl; for (int i = 0; i < v.size(); i++) { cout<<v[i]<<endl; } cout << endl; } bool check() { int cnt = 0, res = 0; for (int i = 0; i < n; i++) { ...
ALGO
0.999844
3.724475
{ "github_metadata": { "branch": "main", "commit_count": 56, "repo_created_at": "2022-02-06T14:18: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": "1fa8ce038f2...
7dc29706-b4de-48d1-a2cd-b2132e98c9be
Yawn-Sean/Daily_CF_Problems
daily_problems/2025/04/0429/personal_submission/cf690e1_kaicheng.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define mod 1000000007 // 10^9 + 7 #define MOD 998244353 // 998244353 #define YES cout << "YES" << '\n' #define NO cout << "NO" << '\n' #define int long long #define itn int void solve() { int n, m; cin >> n >> m; vec...
ALGO
0.999791
5.246046
{ "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": "8eac...
13947a66-f622-470b-a929-5645a9aea362
DesZou/Project-Eros
LuoGu/5689.cc
#include <iostream> #include <algorithm> #include <cmath> #include <cstdio> const long long P = 1e9 + 7; const int N = 3e5 + 5; int n, q; int fa[N]; long long f[N], s[N]; long long inv[N], fac[N]; int find(int x) { return x == fa[x]? x : fa[x] = find(fa[x]); } long long C(int n, int m) { return ((fac[n] * inv[m])...
ALGO
0.999632
4.599905
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2017-10-11T11:20:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cf31c0a3a...
e4215b40-1dd5-472b-8344-3aad23bfcdca
zmlin1998/LeetCode
Others/31.cpp
class Solution { public: void nextPermutation(vector<int>& nums) { """ # 1. Find the first decreasing element from the end # 2. Find the first element greater than the element found in step 1 from the end # 3. Swap the elements found in step 1 and 2 """ int n ...
ALGO
0.999995
6.156297
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2023-12-30T03:07: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": "c8d284fe4...
4c6ef6e1-0574-4fa9-a48e-5fbf3552002d
SVCH3R/algo_term_3
contest_2/H.cpp
#include <vector> #include <string> #include <iostream> int P(const std::string& s) { size_t size = s.size(); if (size == 0) { return 0; } std::vector<int> pref(size, 0); pref[0] = 0; int k = 0; for (size_t i = 1; i < size; ++i) { k = pref[i - 1]; while (k > 0 && s[i] != s[k]) { k = pre...
ALGO
0.999943
4.360697
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-11-13T19:26: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": "11781911b794...
ac81cb4b-543d-4d47-830e-19bfc1a901a3
tjddus/PS
BOJ/14000/14002_가장긴증가하는부분수열4.cpp
#include <iostream> using namespace std; int N, a[1001], dp[1001], nextIdx[1001], mC = 1, mI; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin >> N; for (int i = 1; i <= N; i++) { cin >> a[i]; dp[i] = 1; } mI = N; for (int i = N - 1; i >...
ALGO
0.999999
4.052574
{ "github_metadata": { "branch": "main", "commit_count": 238, "repo_created_at": "2020-12-06T08:55: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": "e214cb6f93...
76c569d1-5fcf-4200-b753-195dd1223fd1
WhiZTiM/coliru
Archive2/52/938b5fbbc4c0f5/main.cpp
#include <iostream> #include <assert.h> #include <chrono> #include <map> typedef unsigned long long ull; template<ull mod> ull fact2(ull n) { ull result = 1; for (ull i = 2; i <= n; ++i) { result = (result * i) % mod; } return result; } template<ull mod> struct fast_fact { u...
ALGO
0.999915
5.224474
{ "github_metadata": { "branch": "master", "commit_count": 42630, "repo_created_at": "2016-04-21T16:34:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "abb9fa...
262d9984-c510-40d2-a300-3a8fb423c172
eaburns/search
pancake/pancake.hpp
// Copyright © 2013 the Search Authors under the MIT license. See AUTHORS for the list of authors. #include <cstdio> #include <cstdlib> #include <cassert> #include <vector> #if NCAKES >= 128 #error Too many pancakes for char typed cost. #endif extern "C" unsigned long hashbytes(unsigned char[], unsigned int); class ...
ALGO
0.993272
4.180155
{ "github_metadata": { "branch": "master", "commit_count": 1210, "repo_created_at": "2013-06-20T14:23:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 34, "forks": 20, "issues": 28, "pull_requests": 0 }, "file_meta": { "content_id": "8545...
327ce446-2070-40c7-a082-8d7035df3368
DeeeU/Everyday-problem-C
inazuma/cpp/ABC/Dprob/under_99/088.cpp
using namespace std; #include <iostream> #include <cstdlib> #include <algorithm> #include <cmath> #include <limits> #include <climits> #include <vector> #include <string> #include <set> #include <queue> #include <stack> #include <map> #include <numeric> typedef long long ll; typedef pair<int,int> p; #define rep(i, n)...
ALGO
0.999972
3.868837
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2018-11-28T04:23:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "1f416a16b...
84a118a8-61cb-4c60-9b7f-77a064ef82d4
Junghs-cloud/Baekjoon
Gold/3/_2146.cpp
#include <iostream> #include <queue> #include <utility> #include <set> using namespace std; int** map; bool** isVisited; set<int>** checkVisitedWithNum; set<int>::iterator it; int currentIslandCount = 1; queue<pair<int, int>> bfsQueue; int N; int dx[] = { -1, 1, 0, 0 }; int dy[] = { 0 , 0, -1, 1 }; struct info { in...
ALGO
0.999336
3.915107
{ "github_metadata": { "branch": "master", "commit_count": 816, "repo_created_at": "2023-01-08T13:47:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6806f10c...
0c391ae8-bf60-4fd2-903b-949a49b4015b
KULeuven-COSIC/SCALE-MAMBA
src/Mod2Engine/aBitVector2.cpp
/* Copyright (c) 2017, The University of Bristol, Senate House, Tyndall Avenue, Bristol, BS8 1TH, United Kingdom. Copyright (c) 2021, <NAME>, <NAME> 10, bus 2452, B-3001 Leuven-Heverlee, Belgium. All rights reserved */ #include "aBitVector2.h" #include "GC/Base_Circuits.h" #include "GC/Q2_Evaluate.h" #include "Mod2Ma...
ALGO
0.980329
4.284691
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2018-05-02T10:40:57.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 261, "forks": 84, "issues": 0, "pull_requests": 6 }, "file_meta": { "content_id": "6a76005...
71719dba-47db-4ab5-be37-5a580b0fe9d4
hmofrad/CodingPractice
skinnyleetcode/productExceptSelf1.cpp
/* * https://leetcode.com/problems/product-of-array-except-self/solution/ * (c) <NAME>, 2020 * (e) <EMAIL> */ class Solution { public: vector<int> productExceptSelf(vector<int>& nums) { int size = nums.size(); std::vector<int> left(size); std::vector<int> right(size); std::ve...
ALGO
0.999966
6.555821
{ "github_metadata": { "branch": "master", "commit_count": 660, "repo_created_at": "2016-07-22T04:19:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "462b6776...
c7977a49-6920-478e-b19b-f28a5e49c645
anvesha11/ds-algo
Searching and sorting/counting-elements-in-2-arrays-lessequal-element-in-arr1-amazon.cpp
// function to count for each element in 1st array, // elements less than or equal to it in 2nd array // function returns the index of largest element // smaller than equal to 'x' in 'arr'. For duplicates // it returns the last index of occurrence of required // element. If no such element exits then it returns -1. i...
ALGO
0.999911
5.051816
{ "github_metadata": { "branch": "master", "commit_count": 165, "repo_created_at": "2020-06-03T08:09: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": "bc6c8b8a...
e4196bfb-71a5-43ec-ad06-8247857a5fc7
GSNeves/Snake
snake.cpp
#include <string> #include "snake.h" #include <iostream> void printSnake(Snake snake) { Segment* head = snake.head; std::cout << "Snake:\n"; while (head != NULL) { std::cout << head->position.x << ' ' << head->position.y << '\n'; head = head->next; } } Snake initialize(const int width...
TOOL
0.98172
5.690595
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2025-01-12T04:03:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cbf26a7a8c3...
9f8073fe-02b8-4303-af8c-81be05d4eaa1
Doggerlas/StyleTransfer
src/StyleSynthesis/Context/ContextPartGraphLearningCurve.h
//============================================================================ // // This file is part of the Style Transfer project. // // Copyright (c) 2016 // -<NAME>, <NAME> (authors of the code) / UMass-Amherst // // This is free software: you can redistribute it and/or modify // it under the terms of the GNU Gene...
DATA
0.966096
6.405002
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-04-22T02:02: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": "f0e0bcf5e591...
ae6885dd-f5a5-49de-9a88-5bfcadbe4e1f
archita2k1/CFBTraining
C++/Beginners/Chap1/IM1cg.CPP
// Filename: \\U1Chap01\IM1cg.CPP #include <conio.h> #include <iostream.h> #include <stdio.h> // Function to find the matching parenthesis int match_paren(char str[20]) { int i, j; cout << "\n\tThe entered string is "; for (i = 0; str[i] != '\0'; i++) cout << str[i]; int stp = 0; // Let starting parenthesis is 0 ...
ALGO
0.999458
4.112922
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2022-03-24T17:46: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": "5fe2b7b21ea...
ab1ac1e9-1205-4386-91ae-c1757b0ed4d2
Hunter764/CPP
YCC/Contest2/D.AddingDigits.cpp
/* The program reads three integers: a, b, and n. It converts a to a string and appends digits (0 to 9) to it to form a new number. It checks if the new number modulo b equals 0. If true, it prints the number with n-1 trailing zeros. If no such number is found, it prints -1. */ // a.x = 10.a + x ,, a`=(10.a` + x%b)=...
ALGO
0.999395
3.90142
{ "github_metadata": { "branch": "main", "commit_count": 240, "repo_created_at": "2024-02-16T06:40:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ad9920658c...
eabd21af-cb62-4c5d-ade4-75bb5519fc1a
Mulab11/cntt2016-hw1
TC-SRM-548-div1-1000/xhk.cpp
// BEGIN CUT HERE // END CUT HERE #line 5 "KingdomAndCities.cpp" #include<bits/stdc++.h> using namespace std; #define ll long long const int maxn=50,mod=1000000007; int n,m,ne,ans; int comb[1310][60],c[60][60]; void work() {int i,j,k,p; for(i=0;i<=max(n,n*(n-1)/2);i++) { comb[i][0]=1; for(j=1;j<=min(maxn,i);j+...
ALGO
0.99999
4.434263
{ "github_metadata": { "branch": "master", "commit_count": 4450, "repo_created_at": "2016-09-28T13:04:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 31, "forks": 28, "issues": 0, "pull_requests": 8 }, "file_meta": { "content_id": "c3a44...
f9f6d281-a416-47d2-b5ac-179994428ea5
jhu-cisst/cisst
cisstVector/vctDeterminant.h
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */ /* Author(s): <NAME> Created on: 2004-04-16 (C) Copyright 2004-2007 Johns Hopkins University (JHU), All Rights Reserved. --- begin cisst licen...
TOOL
0.999444
6.553318
{ "github_metadata": { "branch": "main", "commit_count": 4711, "repo_created_at": "2014-03-12T21:45:28.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 69, "forks": 45, "issues": 22, "pull_requests": 1 }, "file_meta": { "content_id": "9469853...
f0556fd0-9203-46c5-a6dd-2866e5475790
kyad/atcoder
abc298/e/a.cc
#include <algorithm> #include <cassert> #include <iostream> #include <vector> using namespace std; // modint #include <atcoder/modint> using namespace atcoder; using mint = modint998244353; ostream& operator<<(ostream& os, const mint &v) { os << v.val(); return os; } vector<mint> f(int N, int A, int P) { mint pr...
ALGO
0.999573
4.106145
{ "github_metadata": { "branch": "master", "commit_count": 889, "repo_created_at": "2021-08-26T14:42: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": "c53a6e25...
4b4de10d-3eb9-455b-939e-a104ffe89659
youchen/academic-project
2014_1_Summer/CS780_Advanced_OOP_in_C++/assign_08/assign_08/main.cpp
// // main.cpp // assign_08 // // Created by <NAME> on 6/25/14. // Copyright (c) 2014 <NAME>. All rights reserved. // #include <iostream> #include <fstream> #include <sstream> #include <queue> #include <list> using namespace std; class word{ string name; list<int> row; public: word(string n):name(n){ ...
TOOL
0.904833
3.976003
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2014-12-30T22:45:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7fc706b8a...
082062ea-2f01-413a-b44e-e99ca0f02bfb
piyushagarwal08/JU-Notes
CRT/PrimeTime.cpp
// Prime Time #include <iostream> #include <string> #include<cmath> using namespace std; int is_Prime(int n) { if(n==1) return 0; for(int i=2;i<(int)pow(n,0.5)+1;i++) { if(n%i==0) return 0; } return 1; } int main() { int D,P,HP,N,j,k,i; std::cin>>D>>P; HP = D/P; N=H...
ALGO
0.999908
3.442891
{ "github_metadata": { "branch": "master", "commit_count": 214, "repo_created_at": "2019-08-21T05:13:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 28, "forks": 38, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c5d3fe...
62343df5-0cf4-45d5-8d76-1a31bbd3b05a
NhatMinh0208/CP-Archive
codeforces/61/D.cpp
#include <bits/stdc++.h> using namespace std; long long n; vector<long long> tree[100001]; vector<long long> cost[100001]; long long DP[100001], DP2[100001]; long long visited[100001]; long long dfs2(int node) { long long ans = 0; visited[node] = 1; for (int i = 0; i < tree[node].size(); i++) { int child = tree[n...
ALGO
0.999941
3.861588
{ "github_metadata": { "branch": "master", "commit_count": 1398, "repo_created_at": "2020-12-23T02:12: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": "d8a8717...
2104f238-6693-4ef8-af25-b199ce801a52
dkdrozdov/brigade7
resources/semester-2/pt3/tree.cpp
#include <stdio.h> #include "tree.h" #include "stack.h" tree::tree(char _elem, tree *_left, tree *_right) : elem(_elem), left(_left), right(_right) {} void tree::input(FILE *fp) { tree *t = this; stack *s = new stack(); elem = fgetc(fp); for (char c = fgetc(fp); c != EOF; c = fgetc(fp)) { switch ...
ALGO
0.998993
3.541429
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2021-10-07T01:45: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": "62df0a4074c...
19999164-1160-438e-938c-cd09e0285104
tsuchi0410/AtCoder
problems/AHC/AHC020/main2.cpp
/* 出力強度の大きさを個別に二分探索 頂点のスタートは 1 ~ N まで全通り試す 辺は最小全域木問題 */ #include <iostream> #include <vector> #include <algorithm> #include <cmath> using namespace std; #define rep(i, n) for(int i = 0; i < n ; i++) struct UnionFind { // core member vector<int> par; // constructor UnionFind() { } UnionFind(int n) : par...
ALGO
0.999972
4.082229
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2023-11-04T03:38: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": "8bab7be1f...
5bf89e89-08a0-410d-b27c-1a326169ea94
krishnakpt18/numericalmethods
expn/exponenfit.cpp
#include <iostream> #include <iomanip> #include <cstring> #include <fstream> #include <cmath> using namespace std; int main () { int i,j,k,n; double sumx=0,sumy=0,sumx2=0,sumY=0,sumxy=0,ax=0; double *x,*y,*z,*yfit; double x2,xy; ifstream fin; ofstream fout; fin.open("in.txt"); fout.open("outexp.txt"); ...
DATA
0.9867
3.235068
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2022-09-06T16:26:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa78f9eb945...
14613aeb-3834-4a05-b764-d20ad38ff4c1
BioMedIA/MIRTK
Modules/Registration/src/CosineOfNormalizedGradientField.cc
/* * Medical Image Registration ToolKit (MIRTK) * * Copyright 2013-2015 Imperial College London * Copyright 2013-2015 <NAME>, <NAME> * * 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 *...
ALGO
0.984466
6.795729
{ "github_metadata": { "branch": "master", "commit_count": 2061, "repo_created_at": "2016-01-03T22:25:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 197, "forks": 71, "issues": 64, "pull_requests": 3 }, "file_meta": { "content_id": "1015...
dd2e7b89-d560-45b1-8dea-48292dfbb237
Boostibot/crystalflow
main.cpp
#define JOT_ALL_IMPL #define COMPILE_GRAPHICS #include "config.h" #include "defines.h" #include "simulation.h" #include "log.h" #include "assert.h" #include "assert.h" #include <cmath> #include <stddef.h> #include <cuda_runtime.h> #include <vector> #define WINDOW_TITLE "sim" #define DEF_WINDOW_WIDTH ...
ALGO
0.986213
4.26032
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-03-06T01:01: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": "0319489f41ff...
c881e3ad-84d2-45c9-a787-54207a506f77
minhazul-ashim/phitron-algo
assmnt3/canGo.cpp
#include<bits/stdc++.h> using namespace std; class Edge { public: int u; int v; int w; Edge(int u, int v, int w) { this->u = u; this->v = v; this->w = w; } }; const long long int INF = 1e18; const int N = 1e7 + 5; vector<Edge> edges; long long int dis[N]; int n, e; ...
ALGO
0.999985
4.782527
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2023-08-05T16:18: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": "accad085418...
ca70a67d-08bd-4339-9730-f80ac0ba43cb
Matthias-Fauconneau/serenity
core/function.h
#pragma once /// \file function.h Equivalent to std::function #include "array.h" // functor abstract interface template<Type R, Type... Args> struct functor; template<Type R, Type... Args> struct functor<R(Args...)> { virtual ~functor() {} virtual R operator()(Args... args) const abstract; }; // functor templa...
TOOL
0.972068
7.48262
{ "github_metadata": { "branch": "master", "commit_count": 2422, "repo_created_at": "2012-09-26T21:28:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c6befbb...
557d0296-5c85-4703-9337-47a419dd1bed
giftycad/my-c-lessons
inheritance.cpp
//we get to see how inheritance works in c++ #include <iostream> using std::cout; using std::string; class AbstractEmployee //Abstract class { virtual void AskForPromotion() = 0; //Pure virtual function or abstract function //Any class that decides to use this function or me...
TOOL
0.942586
4.782791
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-10-04T01:00: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": "87d0845e14e0...
dbc3184e-c298-483e-a710-8dd04075657f
n22dcdk069/LeMinhQuan_Mon-C
Chapter4/Challenges/bai13.cpp
#include <iostream> int main() { // Get user input for the number of books purchased int booksPurchased; std::cout << "Enter the number of books purchased this month: "; std::cin >> booksPurchased; // Calculate points based on the number of books int points = 0; if (booksPurchased == 1) ...
TOOL
0.996198
5.791367
{ "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": "9ae75c304adc...
39fad23a-5b5f-43cf-bd1c-3a9ebda8243b
BioMedIA/MIRTK
Modules/Numerics/include/mirtk/PolynomialSolvers.h
/* * Medical Image Registration ToolKit (MIRTK) * * Copyright 2016 Imperial College London * Copyright 2016 <NAME> * * 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...
TOOL
0.999769
5.682188
{ "github_metadata": { "branch": "master", "commit_count": 2061, "repo_created_at": "2016-01-03T22:25:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 197, "forks": 71, "issues": 64, "pull_requests": 3 }, "file_meta": { "content_id": "2164...
b4233edd-18ee-42af-b76b-985f601dc425
d-zhelyazkov/CompetitiveProgramming
HackerRank_C/XOR_Matrix/src/XOR_Matrix.cpp
//============================================================================ // Name : XOR_Matrix.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #includ...
ALGO
0.999882
3.611051
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-01-19T16:59:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "27b0ce1503...
58b4ed75-009c-4f04-8db2-7e2f88fd651b
jcsearson/hackerrank
C++ (solutions)/Cut the Sticks/cut-the-sticks-expanded.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main(){ int n; cin >> n; vector<int> arr(n); vector<int> temp(n); cout << "Initial Size of Array: " << n << "\n\n"; // Fill array with inital contents for( int i = 0;i < n;i++ ){ cin >> arr...
ALGO
0.999986
4.261194
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2016-10-09T14:44: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": "2dcc146a50...
ae14337e-d91e-4931-a55e-5b8e7ee98002
jlaxman/Codeforces-Solved-Problems
basic/118B.cpp
#include<bits/stdc++.h> using namespace std; void fun(int i, int n) { if (i == n) { for (int k = 0; k <= n; k++) { if (k != n) cout << k << " "; else cout << k; } for (int k = n + 1; k < 2 * n + 1; k++) { cout << " " << i - k + n; } cout << endl; return; } for (int k = 0; k < n - i; k++) { if...
ALGO
0.999972
4.094243
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-10-26T17:15: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": "1e8ecd992c39...
19d292f8-e1a1-4bae-993c-a66a3f3fecac
oxydated/Exporter
MathUtility/mathUtility.cpp
#include <utility> #include <array> #include <vector> #include <algorithm> #include "mathUtility.h" #include "debugLog.h" namespace oxyde { namespace math { using complex = std::complex<double>; void cubicRoots(double a, double b, double c, double d, complex& root1, complex& root2, complex&root3) { double qa...
ALGO
0.999784
3.077297
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2019-01-10T23:07: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": "eea5c2b13...
cc58b2c0-1319-4d58-9a6d-39de8034c2cd
A-006/lcao
module_gint/module_basis/module_nao/projgen.cpp
#include "projgen.h" #include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <numeric> #include "module_base/cubic_spline.h" #include "module_base/math_integral.h" #include "module_base/math_sphbes.h" using namespace ModuleBase; void projgen(const int l, const int nr, ...
ALGO
0.999956
5.205956
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-06-04T08:48: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": "d90a0dadd95...
6d747939-e147-44b4-850b-368c6d7002f3
alexjinxu/C-C-Coding
ArrayManipulationCPP.cpp
//============================================================================ // Name : ArrayManipulationCPP.cpp // Author : ax // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //=========================================================================...
ALGO
0.999496
3.566141
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2017-04-04T19:39: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": "ab986d3b29...
504882c7-9c95-436d-8ed9-31e62352d72b
CarlosTorres010/Fundamentos_Civil
15ejercicio.cpp
#include<iostream> using namespace std; int main(){ int tipoTrabajador; float horasTrabajadas, tarifa, total, sueldoFinal; cout << "Ingrese las horas del trabajador: "; cin >> horasTrabajadas; cout << "Ingrese la tarifa del trabajador: "; cin >> tarifa; total = horasTrabajadas * tarifa; cout << "In...
TOOL
0.926906
3.563031
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-05-06T05:48: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": "1284c10b9cd3...
b16764fe-3106-4e54-ac8a-b7279ed26d8a
HabeebUllahTabrez/CPP
Queue/CircularQueue.cpp
#include <iostream> using namespace std; class CircularQueue { private: int size; int front; int rear; int *Q; public: CircularQueue(): size(10), front(0), rear(0) { Q = new int[size]; } CircularQueue(int n): size(n), front(0), rear(0) { Q = new int[size]; } int isFull(); int isEmpty(...
ALGO
0.994643
4.834612
{ "github_metadata": { "branch": "main", "commit_count": 39, "repo_created_at": "2020-10-15T16:08:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6e42a81fbf9...
7b61fec7-0cdb-4818-936a-d86a3fa73145
imanolgzz/ICPC-CrusadersMTY
Codeforces/edu_113/A.cpp
#include <bits/stdc++.h> #define ll long long #define ld long double #define ENDL '\n' #define sza(x) ((int)x.size()) #define all(a) (a).begin(), (a).end() using namespace std; void redirectIO(); template<class T> void print(vector<T> &vec); template<class T> void print(vector<T> &vec, int start); template<class T> v...
ALGO
0.999909
3.670741
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2024-07-29T20:21:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "24006aa5c0b...
f1f23d10-5ed4-4921-8427-9f0d4890cdca
littlelid/OJ
leetcode/115.cpp
#include<cstdio> #include<iostream> #include<string> #include<stack> #include<utility> #include<vector> using namespace std; class Solution { public: int numDistinct(string s, string t) { if(s.size() == 0) return 0; else if(t.size() == 0) return 1; this->s = s; this->t = t; ...
ALGO
0.999986
4.234399
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2017-02-13T14:54: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": "376958fc8...
eba0a78e-188a-4e8b-986d-43dac9bf1acd
Snowysani/Priority-Queue-Runtimes
main.cpp
// // main.cpp // Gallegos_Michael_PA3 // // Created by <NAME> on 10/22/18. // Copyright © 2018 <NAME>. All rights reserved. // /* For this programming assignment, you will implement a Priority Queue. Your Priority Queue can grow dynamically as in the Stack assignment (although you should use a method with am...
ALGO
0.995383
4.802116
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-01-15T22:16: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": "0e0ff84eb9...
8fbfba55-a366-4954-b255-b9be61bfa410
dbgilson/CS-ECE-Course-Projects-UTK
cs130/lab5.cpp
//Lab 5 //First we access libraries, and we call using namespace std #include <stdio.h> #include <iostream> #include <iomanip> #include <cmath> #include <cstdlib> #include <fstream> #include <sstream> #include <vector> #include <bitset> using namespace std; //These are the C++ versions of the functions //There is bubb...
ALGO
0.999507
3.689572
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2022-01-14T20:44:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6f6d2fc0661...
9010098d-ed24-492d-815b-b23082b95d91
siddharthumakarthikeyan/Cable-Driven-Parallel-Robots-CDPR-Modelling
cdpr_controllers/src/tda.cpp
#include <cdpr_controllers/tda.h> #include <visp/vpIoTools.h> // this script is associated with TDAs // note that due to the dimension problem, if run "cvxgen_minT" method, must comment "cvxgen_slack" // and "adaptive_gains" code block, as well as uncomment relative header files. // these code based on CVXGEN can be ...
ALGO
0.999687
3.746729
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2021-05-31T15:47:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 32, "forks": 2, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "c48f7953ae...