uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
8b229574-f21d-45c8-a15c-d8debe757759 | ishandutta2007/codeforces | vfleaking/normal/403/E.cpp | #include <iostream>
#include <cstdio>
#include <vector>
#include <cstdlib>
#include <algorithm>
#include <climits>
#include <iterator>
using namespace std;
const int MaxN = 200000;
const int MaxLogN = 18;
template <class T>
inline void tension(T &a, const T &b)
{
if (b < a)
a = b;
}
class TreeQuerier
{
private:
... | ALGO | 0.999882 | 3.829682 |
c1b7fa5f-f633-41d7-bff8-fd82462376e8 | tooHighh/Car-Rental | sha256.cpp | #include "SHA256.h"
#include <sstream>
#include <iomanip>
SHA256::SHA256() : m_BlockLength(0), m_MessageLength(0)
{
// Initialise the hash values. These words were obtained by taking the first
// thirty-two bits of the fractional parts of the square roots of the first
// eight prime numbers.
m_H[0] = 0... | ALGO | 0.987142 | 6.428555 |
7efb414b-d7a9-4fe8-9041-975bcf40dd4d | Joseph-Ogutu/Sales-Agent-Assistant | myenv/lib/python3.12/site-packages/sklearn/svm/src/liblinear/tron.cpp | #include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include "tron.h"
#ifndef min
template <class T> static inline T min(T x,T y) { return (x<y)?x:y; }
#endif
#ifndef max
template <class T> static inline T max(T x,T y) { return (x>y)?x:y; }
#endif
static void default_print(const char *buf)
{... | ALGO | 0.999718 | 5.836969 |
04b8ca45-0f18-4608-9dc3-f7c0ce38971f | diego-cr/sapphire | buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/variant.cpp | #include "pins_arduino.h"
#ifdef __cplusplus
extern "C" {
#endif
// Digital PinName array
const PinName digitalPin[] = {
PA_0, // Digital pin 0
PA_1, // Digital pin 1
PA_2, // Digital pin 2
PA_3, // Digital pin 3
PA_4, // Digital pin 4
PA_5, // Digital pin 5
PA_6, // Digital pin 6
PA_7, // Dig... | CONFIG | 0.916945 | 5.195516 |
cd964475-54b5-4403-8588-5f53f268a978 | Divya063/programming | sort/merge_sort/fredo_sums.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define N 100005
#define MOD 1000000007
#define dd double
#define DEBUG(x) cout << '>' << #x << ':' << x << endl;
ll max_sum = 0;
ll total_sum =0;
ll min_sum = INT_MAX;
void merge(ll *arr, ll start, ll mid, ll end){
ll i = start, j = mid+1;
ll k = ... | ALGO | 0.999869 | 3.972372 |
51b19223-518b-400c-8c6e-9a74951edff1 | singhriyaa/lab-4b | lab4b ques5.cpp | #include <iostream>
using namespace std;
int sum_of_digits(int n);
int main() {
int n,s=0;
cout<<"enter a number\n";
cin>>n;
s=sum_of_digits(n);
cout<<"sum of the digits is "<<s;
return 0;
}
int sum_of_digits(int n)
{
int f=0,s=0;
while(n>0)
{
f=n%10;
n=n/10;
s=s+f;
}
return s;
} | ALGO | 0.999816 | 4.874011 |
b3ca38e0-4beb-4ad1-bd1f-6ce7d0735b52 | amanjha491/Leetcode_Solution | 1200-1299/1268.Search Suggestions System/Solution.cpp | class Trie {
public:
void insert(string& w, int i) {
Trie* node = this;
for (int j = 0; j < w.size(); ++j) {
int idx = w[j] - 'a';
if (!node->children[idx]) {
node->children[idx] = new Trie();
}
node = node->children[idx];
i... | ALGO | 0.999991 | 6.704689 |
38636903-2c5d-4100-adb7-483dddcb4e8f | aktiger/C-CPP | zeromove.cpp | /*
*discription:给定一组数,将零全部排到最后,将非零元素排在最前,华为面试
*autor:justinzhang
*Email:<EMAIL>
*Established:2011年2月8日21:13:47
*Revised1:2011年4月24日15:57:22
*Revised2:2011年5月10日15:21:54,受到算法导论快速排序的启发,(p85)
* 利用快速排序中用来寻找支点的算法来完成任务
*/
#include <iostream>
using namespace std;
#define arraysize(type, name) (sizeof(name... | ALGO | 0.9999 | 3.289083 |
7a14ebbc-808f-4a98-90cb-2b6681b39fda | garrettjoecox/advent-of-code | 2024/src/days/day00.cpp | #include <iostream>
#include <cassert>
#include <regex>
#include <map>
#include <sstream>
#include <string>
static std::string exampleInput = R""""(
10
20
)"""";
static std::string puzzleInput = R""""(
100
200
)"""";
static void parse(std::string input, std::vector<int32_t>& result) {
std::istringstream inputStr... | ALGO | 0.985364 | 6.016301 |
6de0d158-a457-48a7-bc07-df3493331780 | ishandutta2007/codeforces | serval/normal/1669/G.cpp | #include <cstdio>
#include <algorithm>
using namespace std;
const int N = 50 + 5;
int n, m;
char p[N][N];
void solve()
{
scanf("%d%d", &n, &m);
for (int i = 1; i <= n; i++)
for (int j = 1; j <= m; j++)
{
scanf("%c", &p[i][j]);
while (p[i][j] != '.' && p[i][j] != '*' && p[i][j] != 'o')
scanf("%c", &p... | ALGO | 0.998922 | 3.56517 |
01cbd2f5-179c-4f40-8b53-5007952455a3 | XiangZi0028/GAMES101_CODE_FRAMEWORK | 3party/eigen3/bench/benchmarkX.cpp | // g++ -fopenmp -I .. -O3 -DNDEBUG -finline-limit=1000 benchmarkX.cpp -o b && time ./b
#include <iostream>
#include <Eigen/Core>
using namespace std;
using namespace Eigen;
#ifndef MATTYPE
#define MATTYPE MatrixXLd
#endif
#ifndef MATSIZE
#define MATSIZE 400
#endif
#ifndef REPEAT
#define REPEAT 100
#endif
int mai... | ALGO | 0.969911 | 3.371454 |
5a32c041-426e-4878-a185-f0a04fe331e6 | shanky1947/Data-Structures-and-Algorithm | Coding Ninjas/BST/6_find_path_in_bst.cpp | /*
Find Path in BST
Send Feedback
Given a BST and an integer k. Find and return the path from the node with data k and root (if a node with data k is present in given BST). Return null otherwise.
Assume that BST contains all unique elements.
Input Format :
Line 1 : Elements in level order form (separated by space)
(If ... | ALGO | 0.999993 | 4.466851 |
642b5fd3-9910-4e11-999c-025e585fdff7 | Simon-Fuhaoyuan/LeetCode-100DAY-Challenge | insertDeleteGetRandomO1/main.cpp | #include <iostream>
#include <unordered_map>
#include <vector>
#include <stdlib.h>
#include <time.h>
using namespace std;
class RandomizedSet {
private:
unordered_map<int, int> set;
vector<int> nums;
int size;
public:
/** Initialize your data structure here. */
RandomizedSet() {
size = 0;
... | ALGO | 0.975573 | 6.106155 |
d76962e8-a575-4215-ab3e-8ebc3361d5fd | tokkiboi/C- | lab5/main.cpp | // Alex Kim - 20224753
// <EMAIL>
// Lab #5 - Monthly House Costs
/* Write a C++ program to calculate the monthly cost of a house given the selling price */
#include <iostream>
#include <iomanip>
#include <cstdlib>
#include <fstream>
#include <cmath>
#include <string>
#define TAX_RATE 0.0125
#define INSURANCE_COST 55... | TOOL | 0.864634 | 4.192013 |
a10a953f-3cc5-4588-a2f8-21211272b0e1 | daniilkananenka/bsu-famcs-inf-programming | second-semester/asm/control-work/task-2/task-2.cpp | #include <iostream>
#include<ctime>
const int ROWS = 5;
const int COLS = 5;
extern "C" int _cdecl RowMaxSum(int nums[ROWS][COLS], int rows, int cols);
int main() {
int A[ROWS][COLS];
// RANDOMIZE ARRAY
srand(time(0));
std::cout << "Array of numbers:" << std::endl;
for (int i = 0; i < ROWS; i++)
{
for (int... | ALGO | 0.999183 | 4.96023 |
b0c131f0-8f4f-4039-9768-7a2ad65948ec | Vorun5/botoholt_flutter | windows/runner/utils.cpp | #include "utils.h"
#include <flutter_windows.h>
#include <io.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
void CreateAndAttachConsole() {
if (::AllocConsole()) {
FILE *unused;
if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
_dup2(_fileno(stdout), 1);
}
if (freopen_s(&unuse... | TOOL | 0.998859 | 6.785645 |
1309e583-285d-4fef-b355-29417bfb4c5f | Pyrodox/CPP_Projects | algorithms/Silver/Introduction To Prefix Sums/staticrangesum.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mx = 5e5;
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
ll n, q;
cin >> n >> q;
ll v[mx], q1[mx], q2[mx];
for (ll i = 0; i < n; ++i) {
cin >> v[i];
}
for (ll i = 0; i < q; ++i) {
... | ALGO | 0.999896 | 4.053245 |
0cd55563-4a9a-4020-a496-0aaeb0f6a545 | NextThread/450-dsa | greedy/find_maximum_sum_possible_equal_sum_of_three_stacks.cpp | int maxEqualSum(int n1, int n2, int n3, vector<int> &stack1, vector<int> &stack2, vector<int> &stack3)
{
int sum1 = accumulate(begin(stack1), end(stack1), 0);
int sum2 = accumulate(begin(stack2), end(stack2), 0);
int sum3 = accumulate(begin(stack3), end(stack3), 0);
int top1 = 0, top2 = 0, top3 = 0;
while (1)... | ALGO | 0.999866 | 4.56352 |
683b40e2-097e-474a-b79e-62876a74f066 | lauren-pak/cplusplus | transform.cpp | #include <bits/stdc++.h>
using namespace std;
int main(){
int n, l;
cin >> n >> l;
char arr[l];
for(int i=0; i<l; i++){
cin >> arr[i];
}
int cost[26][26];
memset(cost, -1, sizeof(cost));
for(int i=0; i<n; i++){
char m, n, w;
cin >> m >> n >> w;
cost[m-9... | ALGO | 0.999763 | 3.126816 |
c68587cf-1d0f-4a25-9f66-9a261705df14 | fdfe03/file_5 | MapSquare.cpp | // Practical 5 ADDS: MapSquare
// Zemin Wong A1780385
#include "MapSquare.h"
#include <vector>
using namespace std;
int MapSquare::f(int input){
return input*input;
}
std::vector<int> MapSquare::map(std::vector<int> inputVector){
int size = inputVector.size();
vector<int> output;
if (size == 1) {
output... | ALGO | 0.988273 | 4.66221 |
7f1b6bfd-0047-42b6-982c-e2e1f0b8d43a | ishandutta2007/codeforces | cucl2/normal/1463/B.cpp | /* by Hyperhydrochloric Acid */
#include <bits/stdc++.h>
using namespace std;
#define SZ(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
#define loop(i, n) for(int i = 0; i < (n); ++i)
#define cont(i, n) for(int i = 1; i <= (n); ++i)
#define circ(i, a, b) fo... | ALGO | 0.999632 | 4.075335 |
49e48244-86c9-4fb1-a73e-7bcabb4be55c | Salty-SourKey/Algorithm_Practice | Algorithm Training/data structure/uva-00514.cpp | #include <iostream>
#include <stack>
using namespace std;
//Stack 1,2,3,4, ... , N 순으로 Push될 때
//Pop으로 만들 수 있는 경우인지 아닌지 판단하는 문제
int main(){
int N, i, idx;
int input[1001];
bool flag;
while(cin >> N, N){
stack<int> station;
while(1){
i = 1;
idx = 1;
... | ALGO | 0.999931 | 3.883683 |
9403dc11-ff4c-41fd-ad44-99b33f3f8e13 | ADIo6/Cpp-programming | CampusMonk(YT)/smallest-largest.cpp | /*
Print an integer representing the concatenation of four digits where 1st digit represents the smallest digit in the thousands place of all three numbers(a,b,c).second digit represents the largest digit in the hundreds place of all 3 no.s, third digits represents the smallest digit in the tens place of all three no.s... | ALGO | 0.999789 | 4.47132 |
3bc3f6c9-4dd5-42cf-b795-4da94075d8be | Splashy34/Lab5 | lab5/lab5.cpp | #include <iostream>
#include "List.h"
using namespace std;
class HashSet
{
private:
static const int size = 503;
List <string> table[size];
int hashFunc(const string& key) const
{
unsigned long hash = 0;
for (char c : key)
{
hash = (hash * 37 + c) % size;
}
return hash % size;
}
public:
HashSet();
... | ALGO | 0.994741 | 5.382599 |
7d398178-7e2f-40ab-9a99-2d575691985a | khalilia2000/CarND-MPC-Quizzes | polyfit/src/Eigen-3.3/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_colwise.cpp | #include <iostream>
#include <Eigen/Dense>
using namespace std;
int main()
{
Eigen::MatrixXf mat(2,4);
mat << 1, 2, 6, 9,
3, 1, 7, 2;
std::cout << "Column's maximum: " << std::endl
<< mat.colwise().maxCoeff() << std::endl;
}
| ALGO | 0.999505 | 3.79586 |
b0d20f49-d51a-41b1-b773-884b4871ffe7 | jydu/coalhmm | CoalHMM/TwoSpeciesDiscretizedCoalHmmTransitionMatrix.cpp | //
// File: TwoSpeciesDiscretizedCoalHmmTransitionMatrix.cpp
// Created by: Julien Dutheil
// Created on: Thu Apr 02 13:20 2009
//
#include "TwoSpeciesDiscretizedCoalHmmTransitionMatrix.h"
//This is for the old version:
#include "CtmcTools.h"
//This is for the new one:
#include "generated-two-species/generators.h"
#in... | ALGO | 0.976363 | 5.646638 |
4f4a7c59-12a4-4cf9-9a98-f9509775676d | achieven123/mini-project | Data_Structure/linked_list/02_linked_list.cpp | #include <stdio.h>
#include <stdlib.h>
typedef int element;
typedef struct LinkedListNode {
element data;
LinkedListNode* link;
} LinkedListNode;
LinkedListNode* InsertFirstNode(LinkedListNode* head, element value) {
LinkedListNode* p = (LinkedListNode*)malloc(sizeof(LinkedListNode));
p->data = value;
p->link ... | ALGO | 0.999829 | 4.101095 |
20543472-0023-4a92-9340-b3bd95af1761 | ChoeMinji/mongo-r4.4.6 | src/third_party/mozjs-60/extract/js/src/jit/x86-shared/MacroAssembler-x86-shared.cpp | #include "jit/x86-shared/MacroAssembler-x86-shared.h"
#include "jit/JitFrames.h"
#include "jit/MacroAssembler.h"
#include "jit/MacroAssembler-inl.h"
using namespace js;
using namespace js::jit;
// Note: this function clobbers the input register.
void
MacroAssembler::clampDoubleToUint8(FloatRegister input, Register ... | TOOL | 0.893733 | 5.24969 |
7e3a6185-096b-4572-b352-234443aa3f3f | rafaelmm16/LP | Trabalhos Antigos/folder/Trabalho-Keicila-Carla-Everton/jagpdf-master/code/src/core/jstd/configimpl.cpp | #include "precompiled.h"
#define JAG_INCLUDE_STRING_UTILS_EX
#include <core/jstd/configimpl.h>
#include <core/generic/refcountedimpl.h>
#include <core/generic/assert.h>
#include <core/errlib/errlib.h>
#include <msg_jstd.h>
#include <interfaces/streams.h>
#include <core/generic/stringutils.h>
#include <core/jstd/file_st... | CONFIG | 0.963117 | 4.102543 |
a8fedc67-bb45-43a1-ba86-d9267eb378a8 | BitBuddiesHub/BBH-C---Learning-Journey | Day 6/newton_sqrt.cpp | #include <bits/stdc++.h>
using namespace std;
double newton_sqrt(double S, double tolerance = 1e-5, int max_iteration = 10000)
{
if (S < 0)
{
return -1;
}
double x = S;
for (int i = 0; i <= max_iteration; ++i)
{
double next_x = 0.5 * (x + S / x);
if (abs(next_x - x) < to... | ALGO | 0.999888 | 3.697677 |
ea8d8635-ba9e-457c-8050-434376fd0510 | ayushman-sinha/My-LeetCode-Solutions | next-permutation/Time Limit Exceeded/10-5-2021, 11_57_38 AM/Solution.cpp | // https://leetcode.com/problems/next-permutation
class Solution {
public:
vector<pair<vector<int>,int>>ans;int c=0;
bool should_swap(vector<int>nums,int cur,int start)
{
for (int i = start; i < cur; i++)
if (nums[i] == nums[cur])
return 0;
return 1;
}
void permute... | ALGO | 0.999998 | 5.614882 |
98660cee-76a4-4084-befa-265662d46ddd | muathsharawy99/movie_app | windows/runner/utils.cpp | #include "utils.h"
#include <flutter_windows.h>
#include <io.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
void CreateAndAttachConsole() {
if (::AllocConsole()) {
FILE *unused;
if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
_dup2(_fileno(stdout), 1);
}
if (freopen_s(&unuse... | TOOL | 0.998859 | 6.785645 |
e26618de-47ce-4799-85d8-55a847c0d0cc | NVlabs/RetMol | MolBART/megatron_molbart/Megatron-LM-v1.1.5-3D_parallelism/megatron/data/helpers.cpp | /* Helper methods for fast index mapping builds */
#include <algorithm>
#include <iostream>
#include <limits>
#include <math.h>
#include <stdexcept>
#include <pybind11/pybind11.h>
#include <pybind11/numpy.h>
#include <random>
namespace py = pybind11;
using namespace std;
const int32_t LONG_SENTENCE_LEN = 512;
py::a... | DATA | 0.941458 | 4.020043 |
ca3d4168-b196-466e-870e-d21709463f63 | ArtLavr/Tasks | Tasks/4.cpp | #include "pch.h"
#include <iostream>
#include <cmath>
using namespace std;
int NOD(int a, int b)
{
while (a*b != 0)
if (a > b)
{
a = a % b;
}
else
{
b = b % a;
}
return (a + b);
}
int NOK(int a, int b)
{
return (a / NOD(a, b))*b;
}
int main()
{
int a, b;
cout « "Ente... | ALGO | 0.999614 | 4.511286 |
7cc3a6c7-2b9c-46f6-8cd4-c7e26657e335 | AniviaKid/Artificial-Intelligence | lab3(PLA)/PLA_initial_15352427.cpp | #include<iostream>
#include<fstream>
#include<string>
#include<vector>
#include<set>
#include<map>
#include<sstream>
#include<iomanip>
#include<cmath>
#include<algorithm>
using namespace std;
struct Data
{
vector<double> data;//
int label;//+1 or -1
int label_from_predict;
};
vector<Data> train;//ѵ
vector<Data> t... | DATA | 0.993355 | 4.267401 |
1b580c3d-1852-4d0b-8205-54ffdb0b98fe | truonghienminh/Full-House | code/05_01g/05_01g.cpp | #include <iostream>
#include <math.h>
using namespace std;
bool check(int n){
while (n > 0){
int temp = n % 10;
if (temp % 2 == 0)
return false;
n /= 10;
}
return true;
}
int main(){
int n;
cin >> n;
long long arr[n];
for (int i = 0; i < n; i++){
... | ALGO | 0.999968 | 3.970779 |
ee6fb2dc-7df1-4c68-8148-71b9a770912c | ishandutta2007/codeforces | strawberryc/normal/1270/I.cpp | #include <bits/stdc++.h>
template <class T>
inline void read(T &res)
{
res = 0; bool bo = 0; char c;
while (((c = getchar()) < '0' || c > '9') && c != '-');
if (c == '-') bo = 1; else res = c - 48;
while ((c = getchar()) >= '0' && c <= '9')
res = (res << 3) + (res << 1) + (c - 48);
if (bo) res = ~res + 1;
}
ty... | ALGO | 0.999832 | 3.909015 |
19940b17-21a4-4312-9c82-6538e451b546 | headless-piston/luogu | 间谍网络.cpp | #include<cstdio>
#include<stack>
#include<cstring>
#include<algorithm>
using namespace std;
const int N=3010;
int n,p,r,tot,tot1,head[N],dfn[N],low[N],cnt,ans,minn[N],color[N],sum[N],indegree[N],x[N*N],y[N*N],w[N];
bool instack[N],flag;
struct edge{
int to,nxt;
}e[N*N];
void add(int u,int v){
e[++tot].to=v;
e[tot].n... | ALGO | 0.999873 | 3.61275 |
a6df3ec6-2405-4e4f-b972-39cacd0d952d | ganit23BAC10033/Daily-GFG-exercise | Difficulty: Medium/Kadane's Algorithm/kadanes-algorithm.cpp | //{ Driver Code Starts
// Initial Template for C++
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
// User function Template for C++
class Solution {
public:
// Function to find the sum of contiguous subarray with maximum sum.
int maxSubarraySum(vector<int> &arr) {
// code here...... | ALGO | 0.999388 | 6.769319 |
96c5e5ba-878c-42a3-8a68-a03fa86b3296 | DimaIgorevich/FifteenPuzzle3d-OpenGL- | MIC++/Dirrection.cpp | #include "Dirrection.hpp"
#define YES true
#define NO false
DirrectionStruct Dirrection::byIndex(int indexEmptyCell){
DirrectionStruct dirrection;
dirrection.downDirrect = dirrection.upDirrect = dirrection.leftDirrect = dirrection.rightDirrect = dirrection.forwardDirrect = dirrection.backDirrect = NO;
... | ALGO | 0.922449 | 3.9285 |
e1c3761d-39db-4506-9b52-ce98219040b3 | jaintle/leetcode-sync | problems/minimum_number_of_operations_to_make_all_array_elements_equal_to_1/solution.cpp | class Solution {
public:
int minOperations(vector<int>& nums) {
int n=nums.size();
int c=count(nums.begin(),nums.end(),1); // if there is at least 1. then it's easy!
if(c!=0) return n-c;
int res=1e7; // just a dummy value
for(int i=0;i<n;i++){
int g=... | ALGO | 0.999972 | 5.585084 |
8c882c6d-b9b3-490f-87fc-59250edc5fc5 | ishandutta2007/codeforces | wild_hamster/normal/1146/D.cpp | #include <string>
#include <time.h>
#include <vector>
#include <algorithm>
#include <bitset>
#include <utility>
#include <map>
#include <set>
#include <sstream>
#include <iostream>
#include <cmath>
#include <deque>
#define pii pair<ll,ll>
#define MOD 998244353
#define mp make_pair
#define X first
#define Y second
type... | ALGO | 0.999972 | 4.06715 |
638fde4b-254d-4e32-9961-21d9ef1dade3 | tianyang-li/de-novo-rna-seq-quant-1 | boost_1_51_0/libs/graph_parallel/test/distributed_dfs_test.cpp | #ifdef BOOST_NO_EXCEPTIONS
void
boost::throw_exception(std::exception const& ex)
{
std::cout << ex.what() << std::endl;
abort();
}
#endif
using namespace boost;
using boost::graph::distributed::mpi_process_group;
// Set up the vertex names
enum vertex_id_t { u, v, w, x, y, z, N };
char vertex_names[] = { 'u',... | ALGO | 0.917432 | 6.767587 |
a1b5adab-3a04-4728-9de1-92d6008994c6 | chopingu/competitive_programming | cses/03_dynamic_programming/10_edit_distance.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define sz(x) (ll)(x).size()
int main() {
cin.tie(0)->sync_with_stdio(0);
string a, b;
cin >> a >> b;
ll n = sz(a);
ll m = sz(b);
ll memo[n + 1][m + 1];
memset(memo, 0x3f, sizeof memo);
memo[0][0] = 0;
for(ll i ... | ALGO | 0.999985 | 4.294202 |
d1f40cc8-7116-4b8f-b036-b6cb29220815 | mwmcnall/Zybooks | CS201/Week 3/3.24 LAB.cpp | #include <iostream>
#include <string>
using namespace std;
int main() {
string inputMonth;
int inputDay;
cin >> inputMonth;
cin >> inputDay;
if ((inputDay <= 1) || (inputDay >= 31)) {
cout << "Invalid" << endl;
} else if ((inputMonth == "March" && inputDay >= 20) || inputMonth == "April"
... | ALGO | 0.996158 | 4.889067 |
03387aa0-ed7d-42d7-8aaf-9ef6b854b956 | raincross7/code-similarity | codes/train_code/problem107/problem107_300.cpp |
//include
//------------------------------------------
#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 ... | ALGO | 0.999079 | 3.985594 |
26caf839-57b9-4a0b-9406-6c18f064f1e4 | paulkrok1999/programming | task_18_02_2025_task3/ConsoleApplication1/ConsoleApplication1.cpp | #include <iostream>
using namespace std;
char* removeChar(const char* text, int index) {
int len = strlen(text);
char* text2 = new char[len];
strncpy_s(text2, index+1, text, index); // Безопасно
strcpy_s(
text2 + index,
len - index,
text + index + 1
);
return text2;
}
void print_arr(const char* arr) {
int ... | ALGO | 0.987798 | 3.457439 |
b35fd1d0-a4db-410c-88a7-d5a0ce3ed8a8 | cfeitong/ACM-problem-archive | implementation/5-cfgym101102-I.cpp | #include <functional>
#include <tuple>
#include <cassert>
#include <numeric>
#include <iostream>
#include <bitset>
#include <cctype>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
#include <set>
#include <string>
#include <map>
#include <stack>
#include <cstdio>
#include <cstring>
#include <d... | ALGO | 0.999944 | 3.839862 |
bfa32f14-0aa5-4068-a6be-2fc0dd870b25 | christymanthara/Lab4OpenCV | Lab4task4.cpp | // Detect the road sign using the Hough circular transform - function cv::HoughCircles().
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <iostream>
using namespace std;
using namespace cv;
Mat gray;
Mat img_blur;
int main(int argc, char** argv)
{
... | ALGO | 0.998949 | 4.096851 |
ea619811-9dd7-4d73-9f7c-8b6004f5beb5 | tushhaar12/Strivers-SDE-Sheet-Challenge | array/longestSubWithoutRepChars.cpp | #include <bits/stdc++.h>
using namespace std;
int longestSub(string s)
{
int n = s.size();
int left = 0, right = 0, len = 0;
vector<int> mpp(256, -1);
while (right < n)
{
if (mpp[s[right]] != -1)
{
left = max(left, mpp[s[right]] + 1);
}
mpp[s[right]] = ... | ALGO | 0.999923 | 5.339318 |
0e479d31-b01d-492f-83db-081243389dc2 | Aidoshq/pp_1 | lab works/6.cpp | #include <bits/stdc++.h>
using namespace std;
int main () {
int n ;
cin>>n;
vector <int> a(n);
for (int i=0 ; i<n ; i++) {
cin>>a[i];
}
int x , y ;
cin>>x>>y;
a.insert(a.begin()+x , y) ;
for (int i=0 ; i<a.size() ; i++) {
cout<<a[i]<<" ";
}
return 0;
} | ALGO | 0.999902 | 3.275353 |
aef7d98f-48b8-4295-9b3e-1e3984789efe | showmanlee/HowCanISolveThisQuestion | BOJ/14000/14782.cpp | // Bedtime Reading, I
// https://www.acmicpc.net/problem/14782
#include <iostream>
#include <algorithm>
using namespace std;
int main(void) {
cin.tie(NULL);
ios_base::sync_with_stdio(false);
int n;
cin >> n;
int res = 0;
for (int i = 1; i <= n; i++) {
if (n % i == 0) {
res += i;... | ALGO | 0.999987 | 6.217555 |
bc8822a1-7d40-41fe-849b-2eb8a3471e9c | stoman/CompetitiveProgramming | problems/heapoperations/generator_helpers/max.cpp | //Author: Stefan Toman
#include <iostream>
using namespace std;
int main() {
int n = 100000;
cout << n << endl;
for(int i = 0; i < n/2; i++) cout << "insert 1" << endl;
for(int i = 0; i < n/2; i++) cout << "getMin 0" << endl;
} | ALGO | 0.999065 | 3.468219 |
adde41d2-6f3f-4088-86d1-e76b03b0d6e7 | alifalhasan/CP-code-vault | Codeforces/Educational Round/Educational Codeforces Round 95 (Rated for Div. 2)/C - Mortal Kombat Tower/92887942.cpp | #include<bits/stdc++.h>
using namespace std;
const int N=2e5+5;
int a[N],frnd[N],me[N];
int main()
ios_base::sync_with_stdio(false);
cin.tie(NULL);cout.tie(NULL);
int i,n,t;
cin >> t;
while(t--)
{
cin >> n;
for(i=1;i<=n;i++)cin >> a[i];
frnd[0]=1,me[1]=frnd[1]=a[1];
... | ALGO | 0.999947 | 3.871213 |
ea9b215c-528f-4f83-b0de-e643853654da | eglejaseviciute/oop-1uzduotis | v1.0 (list)/src/funkcijos.cpp | #include "funkcijos.h"
#include "myLib.h"
#include "studentas.h"
#include "strategijos.h"
map<string, VeikimoGreicioMatavimai> veikimoGreicioRezultatai;
// Funkcija skaiciuojanti vidurki
double skaiciuotiVidurki(const list<int>& namuDarbai) {
if (namuDarbai.empty()) return 0;
double suma = 0.0;
for (int n... | TOOL | 0.910861 | 4.716196 |
9c79700d-91bf-4652-8287-0245671b5cf0 | watakandai/px4_fslqr_controller | src/modules/position_estimator_inav/inertial_filter.cpp | #include "px4_defines.h"
#include "inertial_filter.h"
#include <cmath>
void inertial_filter_predict(float dt, float x[2], float acc)
{
if (PX4_ISFINITE(dt)) {
if (!PX4_ISFINITE(acc)) {
acc = 0.0f;
}
x[0] += x[1] * dt + acc * dt * dt / 2.0f;
x[1] += acc * dt;
}
}
void inertial_filter_correct(float e, flo... | ALGO | 0.98998 | 5.922671 |
e6262194-8f17-4d5c-8009-842ff0714684 | pastgonex/Algorithm_Ultimate | Acwing_Basic/01 第一章 基础算法/03_数的三次方根(二分)_The_third_root_of_a_number.cpp | #include <iostream>
using namespace std;
int main(void)
{
double x;
scanf("%lf", &x); // ! double 在使用printf的时候 是 lf
double l = -1e4, r = 1e4;
while(r - l > 1e-8) //!小数点后保留6位 -8 5位 -7
{
double mid = (l + r) / 2;
if(mid * mid * mid >= x)
r = mid;
else
... | ALGO | 0.999987 | 3.646898 |
e62bb29d-2943-489d-a3ba-dd798fbef404 | Kuba46/BMSTU-OOP-IU7-SSH3-2024 | Lab04/logic/normalizationparameters.cpp | #include "normalizationparameters.h"
NormalizationParameters::NormalizationParameters(double min, double max)
{
_min = min;
_max = max;
}
double NormalizationParameters::min() const
{
return _min;
}
double NormalizationParameters::max() const
{
return _max;
}
void NormalizationParameters::setMin(dou... | TOOL | 0.925067 | 4.414702 |
9a7c445c-3ef2-4a91-88fa-a641afd826d9 | myselflabib/SolutionVault | PHITRON/DS_PHITRON/MODULE_2/CF_PROB/L_New_Array.cpp | // https://codeforces.com/group/MWSDmqGsZm/contest/223205/problem/L
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
vector<int> A(n);
vector<int> B(n);
for (int i = 0; i < n; i++)
{
cin >> A[i];
}
for (int i = 0; i < n; i++)
{
cin >> B[i];... | ALGO | 0.999984 | 3.239631 |
e412035d-b84d-45bd-bd48-4e63d0a3af2a | Hadi-pstu/Codeforces-Problem | 271A.cpp | #include <bits/stdc++.h>
#define ll long long
#define be(x) x.begin(), x.end()
#define rbe(x) x.rbegin(), x.rend()
#define pb push_back
#define pf push_front
#define ppf pop_front
#define ppb pop_back
#define ft front
#define bk back
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NU... | ALGO | 0.996607 | 4.120608 |
efe7fcc8-6bd6-4ce8-a1ad-e848897098ed | NLeSC-AAA2/gridder | run-fpga-gridder.cpp | #include <fftw3.h>
#include <omp.h>
#include <CL/cl_ext_intelfpga.h>
#include "common/common.h"
#include "common/print.h"
#include "common/init.h"
#include "reference/fft.h"
#include "reference/gridder.h"
int main(int argc, char **argv)
{
if (argc > 2) {
std::cerr << "usage: " << argv[0] << " [gridder.ao... | ALGO | 0.965721 | 5.961377 |
72dd6d09-4bbe-41c6-99cd-dbfe6d024dd2 | kiyanabagh/SimCity | residential.cpp | #include "Residential.h"
#include <vector>
#include <iostream>
using namespace std;
// Check if a cell is within bounds
bool Residential::isValid(int x, int y, int maxX, int maxY) {
return x >= 0 && y >= 0 && x < maxX && y < maxY;
}
// Count adjacent cells with minimum population
int Residential::countAdjacentWi... | ALGO | 0.999398 | 5.669111 |
783975d6-c367-413a-b289-572c4e11057c | 113bommy/deepmind_codecontests_refine | cpp_gold_filter_file/cpp_train_6176_7.cpp | #include <bits/stdc++.h>
using namespace std;
long long n, m, x, y, k, a, b;
long long tmp, anss = 0;
long long binary() {
long long x1, y1;
long long l = 0, r = 1000000000, mid, ans = -1;
while (l <= r) {
mid = (l + r) / 2;
x1 = x + a * mid;
y1 = y + b * mid;
if (x1 >= 1 && x1 <= n && y1 >= 1 && ... | ALGO | 0.999954 | 3.939211 |
90429ace-dabc-445e-a522-1a2898355e79 | 846754497THK/ACM-tools-and-skills | 程序板子/Data-Structure/SegmentTree-Divide.cpp | /*
Problem:
有1e9只小怪兽,第i只编号为i
有一张n个点,m条边的无向图n,m<=1e5
每条边只允许编号在[l,r]之间的小怪兽通过
问有多少小怪兽可以从1点抵达n点
Solution:
我们对边标号区间[l,r]进行离散,最多产生2*m-1个区间,
对区间进行时间分治,在线段树节点上保存覆盖子树所有区间的边id,
对线段树DFS遍历,当1和n连通时将节点包含的编号统计入答案即可
连通性判断用可回溯并查集,复杂度O(mlogm)
*/
#include <bits/stdc+... | ALGO | 0.999877 | 4.410178 |
c6994425-b793-48d9-bf57-8fc3aafcb7f5 | Harikrishna-Manoj/Netflix_Clone | windows/runner/utils.cpp | #include "utils.h"
#include <flutter_windows.h>
#include <io.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
void CreateAndAttachConsole() {
if (::AllocConsole()) {
FILE *unused;
if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
_dup2(_fileno(stdout), 1);
}
if (freopen_s(&unuse... | TOOL | 0.9988 | 6.76073 |
83f71160-df5c-4405-bcfd-dfaa8eb91ee7 | NiloyKumarKundu/Codeforces | Others/Good Bye 2014/A. New Year Transportation/newYearTransportation.cpp | #include<bits/stdc++.h>
using namespace std;
#define MAX 100000
vector<int> vc[MAX];
vector<bool> visited;
int flag = 0;
int DFS(int n, int p) {
visited[n] = true;
for(int x : vc[n]) {
if(!visited[x]) {
if(x == p) {
flag = 1;
break;
} else {
... | ALGO | 0.999998 | 4.073741 |
5d1f09fd-d538-497f-bab7-9e905c91944f | merbar/CarND-MPC-Project | src/Eigen-3.3/doc/snippets/MatrixBase_all.cpp | Vector3f boxMin(Vector3f::Zero()), boxMax(Vector3f::Ones());
Vector3f p0 = Vector3f::Random(), p1 = Vector3f::Random().cwiseAbs();
// let's check if p0 and p1 are inside the axis aligned box defined by the corners boxMin,boxMax:
cout << "Is (" << p0.transpose() << ") inside the box: "
<< ((boxMin.array()<p0.array(... | ALGO | 0.971752 | 3.51303 |
218b50a9-d8b9-4023-b068-5a524d642b03 | Aidan2803/Leetcode | 0792-binary-search/0792-binary-search.cpp | class Solution {
public:
int search(vector<int>& nums, int target) {
int i = 0;
int j = nums.size() - 1;
while(i <= j){
int k = i + (j - i) / 2;
std::cout << "k: " << k << "\n";
if(nums[k] > target){
j = k - 1;
std:... | ALGO | 0.99978 | 5.942888 |
e588574d-15ca-48a4-9b4a-2c86fea939f1 | pedrohp-machado/MaratonaProgramacao | miniMaratona1/EverythingNim/main.cpp | #include <bits/stdc++.h>
using namespace std;
int main(){
int test, n;
cin >> test;
while (test--){
//0 = Alice, 1 = Bob
bool player = 1;
cin >> n;
vector <int> piles(n);
for (int i = 0; i < n; i++) cin >> piles[i];
int aux = 0, k;
... | ALGO | 0.999995 | 4.740111 |
654c3ef3-7077-449d-bdbd-7404f97b6d12 | lucky-ali-786/DSA | dsa2/recursion/maze.cpp | #include<iostream>
using namespace std;
int maze(int n,int m)
{
if(n==1||m==1) return 1;
if(n==2&&m==2) return 2;
return maze(n,m-1)+maze(n-1,m);
}
void print2(int n,int m,string s){
if(n<1||m<1) return;
if(n==1&&m==1){
cout<<s<<endl;
return;
}
print2(n-1,m,s+'D');
print2(n,m-1,s+'R'... | ALGO | 0.999947 | 4.105538 |
2efe8bc7-3f45-41bd-9cdc-b3b008b6b2c3 | hal-uw/gpu_variability_sc22_artifact | sec5c_lammps/src/COLLOID/pair_colloid.cpp | /* ----------------------------------------------------------------------
Contributing author: Pieter in 't Veld (SNL)
------------------------------------------------------------------------- */
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "pair_colloid.h"
#include "atom.h"... | ALGO | 0.999119 | 6.7005 |
616ba5b5-1569-49d5-818e-1a46b005d1b6 | Riztazz/wmane | dep/g3dlite/source/Random.cpp | #include "G3D/Random.h"
namespace G3D {
Random& Random::common() {
static Random r;
return r;
}
Random::Random(void* x) : state(NULL), m_threadsafe(false) {
(void)x;
}
Random::Random(uint32 seed, bool threadsafe) : m_threadsafe(threadsafe) {
const uint32 X = 1812433253UL;
state = new uint32[N];... | TOOL | 0.959054 | 5.921245 |
5de2540d-b91b-4dba-8d2f-741d235c9563 | mdsiaofficial/ProblemSolving | CodeChef/Sum_of_digits.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--)
{
int n;
cin>>n;
int sum=0;
while(n>=1){
sum=sum+(n%10);
n=n/10;
}
cout<<sum<<endl;
}
return 0;
}
| ALGO | 0.999918 | 5.082279 |
e64236c9-f09f-4507-b3b9-a19f73fa53da | glerium/acm-life | codeforces/P8638.cpp | #include <bits/stdc++.h>
using namespace std;
int f[1005][1005];
int lcs(const string &s, const string &t, int n, int m) {
if(n <= 0 || m <= 0)
return 0;
if(f[n][m] != -1)
return f[n][m];
if(s[n-1] == t[m-1])
return f[n][m] = 1 + lcs(s, t, n-1, m-1);
else
return f[n][m] =... | ALGO | 0.999945 | 4.418959 |
59686054-77fd-4728-8122-fd02705cbcf0 | fanjae/Cpp-Practice | 0114_After/Chapter08/Listing08_10/Listing08_10.cpp | #include <iostream>
unsigned long left(unsigned long num, unsigned ct); // Left 함수의 오버로딩
char *left(const char *str, int n = 1);
int main()
{
using namespace std;
const char *trip = "Hawaii!!"; // 테스트 값
unsigned long n = 12345678; // 테스트 값
int i;
char *temp;
for (i = 1; i < 10; i++)
{
cout << left(n, ... | TOOL | 0.98954 | 3.531378 |
95961bfd-c20a-4502-9fc1-ccc1f8e3ced0 | JahanzebNawaz/Introduction-to-C-plus-plus-CPP-Chapter-Exercises | chapter-5/Program 5.11.cpp | /* write a program that inputs two intergers. it determines
and prints if the first integer is a multiple of second integer */
#include<iostream>
#include<conio.h>
using namespace std;
main()
{
int a,b;
cout<<"\n Enter 1st integer ";
cin>>a;
cout<<"\n Enter 2nd Integer ";
cin>>b;
if(a%b==0)
cout<<"\n 1st num... | ALGO | 0.999155 | 3.085039 |
ba054e37-9f89-44ca-8b02-c7019125d83d | Nikhilsharmaiiita/LeetcodeCracker | sum-root-to-leaf-numbers/sum-root-to-leaf-numbers.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.99996 | 6.649162 |
b695f818-e5a2-4fbc-aaf1-3d184a2d331d | SonuKumarYadav9977/Programmings | C++/Pattern Printings/mastNumPyramid.cpp | #include<iostream>
using namespace std;
int main(){
char user_input;
do{
int n;
cout<<"enter the hight of the pyramid: ";
cin>>n;
for(int i=1;i<=n;i++){
int a=i-1;
for(int j=1;j<=n-i;j++){
cout<<" ";
}
int count=1;
... | ALGO | 0.994835 | 3.026888 |
f9bb8266-4e38-4589-943c-80abef34b25f | amansaini7999/Data-Structure-and-Algorithms | Old/Suggested Questions/Avalara/lightHouse.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin >> t ;
while ( t-- )
{
int n ;
cin >> n ;
int arr [ n + 1] ;
for ( int i = 1 ; i <= n ; i ++ )
cin >> arr [ i ] ;
int left [ n ] , right [ n ] ;
stack < int > stk , stk2 ;
for ( int i = 1 ; i <=n ; i ++ )
{
right [ i ] ... | ALGO | 0.999968 | 4.256177 |
fb515dfe-00d6-4a0f-a406-befe35686e14 | ishandutta2007/codeforces | cuizhuyefei/normal/1086/E.cpp | #include<bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define SZ(x) ((int)x.size())
#define L(i,u) for (register int i=head[u]; i; i=nxt[i])
#define rep(i,a,b) for (register int i=a; i<=b; i++)
#define per(i,a,b) for (register int i=a; i>=b; i--)
using namespace std;
typedef long long ll;
type... | ALGO | 0.999947 | 3.746535 |
39c758fe-6c09-4c35-ba8b-1a20ce92c4fc | ManojMuruganA/CPP_Programs | C++ programs/Operator_overloading_enum.cpp | #include <iostream>
using namespace std;
enum E { C0 = 0, C1 = 1, C2 = 2};
E operator+(const E& a, const E& b){ // Overload operator
unsigned int uia = a, uib = b;
unsigned int t = (uia + uib) % 3; // Redefined addition
return (E) t;
}
int main(){
E a = C1, b = C2;
int x = -1;
x = a + b; /... | ALGO | 0.874472 | 3.99806 |
82a04a11-b99c-4865-abc5-9ef9e4c3fe85 | snccekl/fla | fla-project/utils.cpp | #include <bits/stdc++.h>
#include "utils.h"
#include "message.h"
extern bool verbose;
string Trim(const string &str, const char &ch) {
if (str.empty())
return str;
string res = str;
res.erase(0, res.find_first_not_of(ch));
res.erase(res.find_last_not_of(ch) + 1);
return res;
}
void Help() {
cout << "us... | ALGO | 0.996318 | 4.336634 |
95ef28e6-60b8-4f27-80e5-47e53a8c79cf | Ranajit2005/CPP-Practice-github | Graph/kuruskal.cpp | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
//code of Disjoint set
int parent[100];
int size[100];
void make(int v){
parent[v] = v;
size[v] = 1;
}
int find(int v){
if(parent[v] == v) return v;
return parent[v] = find(parent[v]);
}
int Union(int v1,int v2){
v1 = ... | ALGO | 0.999997 | 4.536445 |
fd1a22ee-5834-4a71-856e-46d8afac3a23 | buptrh/leetcode | google/686. Repeated String Match.cpp | class Solution {
public:
int repeatedStringMatch(string A, string B) {
int minCount = B.size()/A.size();
string comp = "";
for(int i = 1; i <= minCount + 2; i ++) {
comp += A;
if(comp.find(B) != -1) {
return i;
}
}
return -1;
}
}; | ALGO | 0.999973 | 5.783237 |
0610ac1a-e77a-4e88-b8d5-d5e2c6a12d7b | ShlomoStept/Stanford_CS_106B_DataStructures | Homework/5.Patient Queue/Homework Files/HeapPatientQueue.cpp | // heappatientqueue.cpp
/*
* File: heappatientqueue.cpp
* --------------------------
* Name: Shlomo Stept
* Section leader: N/A --> Self administered course
*/
#include "HeapPatientQueue.h"
HeapPatientQueue::HeapPatientQueue() {
front = new string[10];
capacity= 10;
size =0;
}
HeapPatientQueue::~Hea... | ALGO | 0.936879 | 5.098705 |
6a99a460-b91e-4c31-91b1-087c30c9cc1a | TanmayMishra4/Competitive-Coding | AbstractShape.cpp | #include <bits/stdc++.h>
using namespace std;
// Base class
class Shape{
public:
virtual float getArea() = 0;
virtual float getPerimeter() = 0;
};
class Rectangle:public Shape{
float length, breadth;
public:
Rectangle(float length, float breadth){
this->length = length;
... | TOOL | 0.900448 | 3.862944 |
469f7965-6e15-40e9-b6ba-2596707af29c | H-SM/GraphPathGuru | server/Yen/Yen_source.cpp | #include <iostream>
#include <vector>
#include <utility>
#include <string>
#include <fstream>
#include <queue>
#include <algorithm>
#include <Windows.h>
#include <climits>
#include <chrono>
std::string epath;
using std::cout;
using std::endl;
using std::greater;
using std::pair;
using std::priority_queue;
using std::... | ALGO | 0.994148 | 4.332586 |
afcecfc7-a1c8-4bc2-b0f5-3f07bb43f998 | KushwahaPraveen1/CrackYourPlacement | Day3/reverse-pairs.cpp | class Solution {
public:
int reversePairs(vector<int>& nums) {
if (nums.empty()) return 0;
return mergeSort(nums, 0, nums.size() - 1);
}
private:
int mergeSort(vector<int>& nums, int left, int right) {
if (left >= right) return 0;
int mid = left + (right - left) / 2;
... | ALGO | 0.999985 | 5.992671 |
1a032c3a-bfa2-4f53-acc3-ff3c704bd089 | MrE-Fog/swiftC | lib/SIL/Utils/PrunedLiveness.cpp | #include "swift/SIL/PrunedLiveness.h"
#include "swift/AST/TypeExpansionContext.h"
#include "swift/Basic/Defer.h"
#include "swift/SIL/BasicBlockDatastructures.h"
#include "swift/SIL/BasicBlockUtils.h"
#include "swift/SIL/OwnershipUtils.h"
#include "swift/SIL/SILInstruction.h"
#include "swift/SIL/SILValue.h"
#include "sw... | TOOL | 0.874104 | 7.149253 |
091f5a9b-6b9a-4a6b-8cd6-5c50340e9dab | victor110406/BOJ_Programmers.Cpp | 코드업/1128.cpp | #include<iostream>
using namespace std;
int main() {
int num;
cin >> num;
printf("%lld", num * 123456789LL);
return 0;
} | ALGO | 0.99947 | 3.499053 |
37e84bed-e205-47b0-ab74-9029c0250d33 | akshat2109/DSA-Practice | 0076-minimum-window-substring/0076-minimum-window-substring.cpp | class Solution {
public:
string minWindow(string s, string t) {
unordered_map<char, int> m;
for (auto c : t)
m[c]++;
int start = 0, end = 0, counter = t.size(), minStart = 0, minLen = INT_MAX, slen = s.size();
while (end < slen) {
if (m[s[end]] > 0)
... | ALGO | 0.999976 | 6.58063 |
9b735de6-06c5-4d6b-a0f3-1d3536fddce9 | manikanta2901/ubuntu | .history/SRM/elab/DataStructures/Arrays/AR16_20200911144945.cpp | #include<bits/stdc++.h>
#include<iostream>
using namespace std;
int main(){
int t;
cin >> t;
while(t--){
int size,a;
cin >> size;
map<int,int> freq;
for(int i = 0; i < size; i++){
int a;
cin >> a;
freq[a]++;
}
size = INT_MI... | ALGO | 0.999846 | 3.17615 |
ce44b141-6353-4162-a76f-366e13aecdac | 113bommy/deepmind_codecontests_refine | cpp_gold_filter_file/cpp_train_701_36.cpp | #include <bits/stdc++.h>
using namespace std;
const int maxn = 57;
const int inf = (1LL << 29);
int a[maxn], b[maxn];
long double val[maxn];
long double dp[maxn][maxn];
long double sum[maxn];
bool cmp(long double a, long double b) { return a > b; }
long double s[57][maxn];
vector<long double> g[57];
int aa[maxn], now[m... | ALGO | 0.999989 | 3.053883 |
bac0615c-b16f-4f8b-9df9-372a27ae1dd4 | Ethereal-OS/frameworks_av | media/codecs/m4v_h263/dec/src/zigzag_tab.cpp | #include "mp4dec_api.h"
#include "mp4def.h"
#include "zigzag.h"
/*----------------------------------------------------------------------------
; MACROS
; Define module specific macros here
----------------------------------------------------------------------------*/
/*----------------------------------------... | ALGO | 0.995992 | 3.532503 |
56bc1bd7-a049-4c83-b297-fad6e61e29b6 | KANekT/surf-dart-courses | task-10/windows/runner/utils.cpp | #include "utils.h"
#include <flutter_windows.h>
#include <io.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
void CreateAndAttachConsole() {
if (::AllocConsole()) {
FILE *unused;
if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
_dup2(_fileno(stdout), 1);
}
if (freopen_s(&unuse... | TOOL | 0.998816 | 6.76073 |
f6788a30-31b6-481e-a9fa-e422d0e394b5 | derekgreene/dynamic-community | tracker.cpp | // ------------------------------------------------------------------------------------------
// Main Dynamic Community Tracking Tool
// ------------------------------------------------------------------------------------------
#include <getopt.h>
#include <string.h>
#include "settings.h"
#include "common/standard.h"
... | ALGO | 0.9917 | 5.975382 |
496f744e-3d85-4aa0-bd96-d03da8961a97 | surfingjae/sortAlgo_cpp | insertionSort_vec.cpp | #include <iostream>
#include <cstdlib>
#include <vector>
using namespace std;
void insertionSort(vector<int>& A)
{
int i, j, tmp, ASize;
ASize = A.end() - A.begin();
for (i = 1; i < ASize; i++)
{
for (j = i; j > 0; j--)
{
if (A[j] < A[j - 1])
{
tmp = A[j];
A[j] = A[j - 1];
A[j - 1] = tmp;
... | ALGO | 0.999574 | 4.535998 |
a2502a5c-f6c5-427c-aff4-1e5825708807 | HuY1u73Ch13/CodeDoiTuyen | 1964/khonghoanhao.cpp | #pragma GCC target ("avx2")
#pragma GCC optimze ("02")
#pragma GCC optimize ("unroll-loops")
#include<bits/stdc++.h>
#define ll long long
using namespace std ;
ll a,b,d=0;
ll demuoc(ll a)
{
ll s=0,m;
for(int i=1;i<=sqrt(a);++i)
{
if(a%i==0) {s=s+i;s+=a/i;}
}
m=sqrt(a);
if(m*m==a) s=s-m;
... | ALGO | 0.99978 | 4.073461 |
1ac5e7cc-dabc-4c69-ae15-7f38f481f42b | shishirRsiam/CSE-Fundamentals-With-Phitron | 5. XPSC - Problem Solving Club/Week 4/Day 4/B_Fedor_and_New_Game.cpp | #include<bits/stdc++.h>
#define str string
#define ll long long
#define pi pair<ll,ll>
#define vec vector<ll>
#define py cout<<"YES\n"
#define pn cout<<"NO\n"
#define pb(x) push_back(x)
#define bee(x) x.begin(), x.end()
#define loop(s,i,n) for(int i=s;i<n;i++)
using namespace std;
int main()
{
ios::sync_with_stdi... | ALGO | 0.999893 | 3.86306 |
c582b677-c782-4924-ad84-da8e6c395ec3 | Thyme0113/astnn_with_semi-supervised_learning | ssl_250/data/src/factorial/loop59.cpp | int main(){
int n;
long a=1;
cin>>n;
for(;n!=0;n--){
a*=n;
}
cout<<a<<endl;
}
| ALGO | 0.99995 | 3.893389 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.