uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
a4ea7651-b03b-421a-921c-ed2dd1479f05 | nvnamsss/leetcode | Minimum Falling Path Sum/main.cpp | /*
Given an n x n array of integers matrix, return the minimum sum of any falling path through matrix.
A falling path starts at any element in the first row and chooses the element in the next row that is either directly below or diagonally left/right. Specifically, the next element from position (row, col) will be (r... | ALGO | 0.999991 | 6.978657 |
70ba264b-c80f-468b-85ef-6cf2899f5ddc | iamtasir/Competitive-programming | 2020/December/Untitled3.cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double dl;
typedef unsigned long long ull;
#define pb push_back
#define PB pop_back
#define nn "\n"
#define O_O ios_base::sync_with_stdio(false); cin.tie(NUL... | ALGO | 0.999923 | 3.163274 |
a39dbdc6-32e6-4403-94da-c749b31a608b | jonah-chen/HACKENBUSH | worldgen/parser.cpp | /**
* @file parser.cpp
* @author Jonah Chen
* @brief implement the functionality specified in parser.hpp
* @version 1.0
* @date 2021-11-14
*
* @copyright Copyright (c) 2021
*
*/
#include "parser.hpp"
/**
* @brief process the intermediate step of parsing a file, which is identifying
* and parsing the key ... | TOOL | 0.957394 | 4.854384 |
89012d64-8186-4662-a36d-903676ccec8d | wuzoo/Solving_problem | 백준/골드/2206. 벽 부수고 이동하기/벽_부수고_이동하기.cpp | #include <iostream>
#include <queue>
#include <cstring>
using namespace std;
int n, m;
int visited[1001][1001][2]; // [0]: 벽 안부수고, [1]: 벽 부수고
int map[1001][1001];
long long step[1001][1001];
int dx[4] = {0, 0, -1, 1};
int dy[4] = {1, -1, 0, 0};
int main(){
cin >> n >> m;
for(int i = 1; i <= n; ++i){
... | ALGO | 0.99997 | 4.084258 |
3514d200-7f68-45f0-9a76-b3ea571dd3fc | YihanWangAstro/AGN | code/tde-single.cpp | #include "SpaceHub/src/spaceHub.hpp"
#include "SpaceHub/src/taskflow/taskflow.hpp"
using namespace hub;
using namespace unit;
using namespace callback;
using namespace force;
using namespace orbit;
using f = Interactions<NewtonianGrav>;
using Solver = methods::DefaultMethod<f>;
using Particle = Solver::Particle;
using ... | ALGO | 0.998788 | 4.162119 |
fa981a59-891b-4556-aa24-f11a44cd1120 | ishandutta2007/codeforces | e869120/normal/1178/C.cpp | #include <iostream>
using namespace std;
#pragma warning (disable: 4996)
long long H, W, S = 1;
int main() {
cin >> H >> W;
for (int i = 1; i <= H + W; i++) { S *= 2LL; S %= 998244353LL; }
cout << S << endl;
return 0;
} | ALGO | 0.999848 | 4.507505 |
4a4364bb-0aba-432f-9c5f-c6a4ec6ae191 | demi2k-sudo/problem-solving | CPP/54_countEncoder.cpp | #include<iostream>
#include<string>
using namespace std;
string encode(string s) {
// code here
string res = "";
int l=0,r=0;
while(l<s.length()){
res+=s[l];
while(r<s.length() and s[r]==s[l]) r++;
res+=to_string(r-l);
l = r;
}
return res;
}
int main(){
stri... | ALGO | 0.999962 | 4.692041 |
04eb1d09-0161-47cb-aa01-d0d300ea4dfb | Bebido/Projects | lpierwsze/umiesz potegowac/Source.cpp | #include <iostream>
int potega_ostatnia_cyfra(int, int);
int main()
{
int testy, podstawa, wykladnik, wynik;
std::cin >> testy;
while (testy)
{
std::cin >> podstawa;
std::cin >> wykladnik;
wynik = potega_ostatnia_cyfra(podstawa, wykladnik);
std::cout << wynik << "\n";
--testy;
}
return 0;
}
int poteg... | ALGO | 0.998879 | 5.343781 |
b96ec6ef-67c7-4e79-b2ab-6b1f54c6e8a7 | Gem0512/codeptit_ki_1_nam_2 | sua_den.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
const ll MOD = 1e9 + 7;
int main()
{
int n, k, b;
cin >> n >> k >> b;
int a;
int c[100005];
for (int i = 1; i <= n + 1; i++)
{
c[i] = 1;
}
for (int i = 0; i < b; i++)
{
cin >> a;
c[a] = 0... | ALGO | 0.999993 | 3.632991 |
c4b6505b-e6e0-4412-a8e0-280b976973e2 | divyajaincs/Sorting-Techniques | HEAPSORT.CPP | #include<stdio.h>
#include<conio.h>
void insert(node *, node *);
typedef struct bst
{
int data;
struct bst *rchild,*lchild;
}node;
void main()
{
char ans='N';
node *root,*newnode,*temp,*parent;
clrscr();
do
{
newnode=getnode();
printf("enter you ele");
scanf("%d",&newnode->data);
if(root==NULL)
root=newnod... | ALGO | 0.99993 | 3.545325 |
36088608-d61c-4707-814e-633f28a9e5c4 | crazystylus/AtCoderPractice | abc042/abc042_c.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
bool dislikes[10] = {false};
bool doIter(ll ele);
int main()
{
ll n, k, tmp;
cin >> n >> k;
for (int i = 0; i < k; i++)
{
cin >> tmp;
dislikes[tmp] = true;
}
while (doIter(n))
{
n++;
}
cout <<... | ALGO | 0.999634 | 3.612798 |
cca9fb61-c90e-4379-b5e3-7e2ae4bbd65d | VikramChauhan19/swayam | 19_04_25/2563. Count the Number of Fair Pairs.cpp | #include<vector>
#include<algorithm>
using namespace std;
class Solution {
public:
long long countFairPairs(vector<int>& nums, int lower, int upper) {
int n = nums.size();
sort(nums.begin(),nums.end());
long long result = 0;
for(int i = 0;i<n-1;i++){... | ALGO | 0.999979 | 5.847908 |
87ef8dbc-87e5-4eb2-8109-6899489ea84e | rt-kill/CompetitiveProgramming | LeetCode/Hard/booking-concert-tickets-in-groups/main.cpp | #include <bits/stdc++.h>
using namespace std;
/* Macros {{{ */
/* A lot of this is from some of Benq's submissions
[https://codeforces.com/profile/Benq]
Ugly af to the eyes, but with vim fold its barable
Hopefully c++20 concepts can make all this stuff must cleaner */
/* Basics {{{ */
using ll = long lon... | ALGO | 0.999862 | 4.786901 |
2cf94f05-3a6f-46c6-83ff-b16541d4b0ad | Gulam-Kibria-GK/Data-Structure-And-Algorithm | Data_Structures/linear data structure/array/linearsearch in array.cpp | #include<bits/stdc++.h>
using namespace std;
int linearsearch(int a[],int b,int x)
{
int i;
for(i=0; i<b; i++)
{
if(x==a[i])
{
return i;
}
}
return -7;
}
int main()
{
int ar[6]= {10,20,30,40,50,60};
int a,b;
cin>>a;
b=sizeof(ar)/sizeof(ar[0]);
... | ALGO | 0.996245 | 3.632137 |
72edf917-169b-4034-9edf-5ef91a99c376 | CarlosHSF99/CG2324 | src/generator/models/patch_model.cpp | #include <cmath>
#include <array>
#include <fstream>
#include <iostream>
#include "generator/models/patch_model.h"
using std::array, std::pair, std::vector;
std::pair<array<double, 4>, array<double, 4>> getVectors(double t);
Vertex
generateVertex(const vector<Point3> &P, array<double, 4> UM, array<double, 4> VM, arr... | TOOL | 0.916694 | 4.672797 |
0f13ae00-0535-4ad1-8a2d-3ae45a3264a6 | Sanidhya2101/Important-Algorithm | Dynamic_Programming/01_knapsack/paint_house.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define ul unsigned long int
/*4 3
1 5 7
5 8 4
3 2 9
1 2 4*/
int minpaint(vector<vector<int>> a)
{
int n=a.size();
int k=a[0].size();
vector<vector<int>> dp(n,vector<int>(k,0));
for(int i=0;i<n;i++)
{
for(int j=0;j<k;... | ALGO | 0.999983 | 3.587198 |
8a451f06-8ded-43be-aac4-9c0a29612514 | toufu-24/AtCoder | Practice/2024_05_29/Festival.cpp | #include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
#define all(v) v.begin(), v.end()
#define SORT(v) sort(v.begin(), v.end())
#define RSORT(v) sort(v.rbegin(), v.rend())
#define REVERSE(v) reverse(v.begin(), v.end())
#define ll long
#define ld long double
#define int ll
int... | ALGO | 0.999995 | 4.716479 |
16f83ee6-bf20-49a6-984f-c6b46c9cea86 | sdycxx2279/myAlgorithm | 59.cpp | //
//@author Xiao Xu
//@create 2018-08-30 22:21
//Spiral Matrix II
//直接按顺序调整好就没必要在判断direction了,减少了多个判断操作
//
#include <iostream>
#include <vector>
using namespace std;
class Solution {
public:
vector<vector<int>> generateMatrix(int n) {
vector<vector<int>> result(n, vector<int>(n, 0));
if(!n)
... | ALGO | 0.999879 | 4.963638 |
4f5f115e-9172-431e-8423-b7fb3cc1d130 | BittuRaj124365/CppCodes | LinkedList/Singly Linked List/traverseAndInserAtHeadAndEnd.cpp | #include<iostream>
using namespace std;
struct node{
public:
int data;
struct node* next;
node(int data){
this->data=data;
this->next=NULL;
}
};
void traverse(node* head){
node* temp=head;
while(temp!=NULL){
cout<<temp->data<<"->";
temp=temp->next;
}
c... | ALGO | 0.999674 | 3.963089 |
940cbcb9-0019-4cb5-b92a-c34fc5bde2e6 | dingqy/Master-thesis-gem5 | src/systemc/tests/systemc/misc/sim_tests/biquad/biquad2/delay_line.cpp | /*****************************************************************************
delay_line.cpp --
Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15
*****************************************************************************/
/*************************************************************************... | ALGO | 0.95321 | 5.936704 |
04f5fd43-d97e-4822-a9c9-f36ff0d59843 | Ryb7532/AtCoder | submissions/abc300/b.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define GET_MACRO(_1,_2,_3,NAME,...) NAME
#define rep3(i,s,e) for (int i=(int)s; i<(int)e; i++)
#define rep2(i,n) rep3(i,0,n)
#define rep(...) GET_MACRO(__VA_ARGS__,rep3,rep2)(__VA_ARGS__)
#define rrep3(i,s,e) for (int i=(int)s-... | ALGO | 0.999828 | 3.714745 |
9ece4d3c-fe26-4dbc-94f3-7ec4092f4800 | cbkpar/BOJ | boj_3117.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int iN, iK, iM;
cin >> iN >> iK >> iM;
vector<int> vecNum(iN + 1, 0);
for (int i = 1; i <= iN; ++i) cin >> vecNum[i];
vector<int> vecRotate(iK + 1, 0... | ALGO | 0.99999 | 3.219937 |
18bcff4a-90b5-447c-bc79-9eed288c9f08 | Sudhanshu2306/Leetcode | 3169-count-days-without-meetings/3169-count-days-without-meetings.cpp | class Solution {
public:
int countDays(int days, vector<vector<int>>& a) {
sort(a.begin(),a.end());
int n=a.size();
int count=a[0][0]-1;
int prev=a[0][1];
for(int i=1;i<n;i++){
if(a[i][0]>prev){
count+=(a[i][0]-prev-1);
prev=max(pr... | ALGO | 0.999906 | 5.244188 |
a6f2948b-7706-4f43-bab0-aa410717145e | Hybridlo/PrCpLab8 | Lab8Mesh/main.cpp | #include <mpi.h>
#include <chrono>
#include <stdlib.h>
#include <iostream>
#include <vector>
using namespace std;
void transpose(int*& matrix, int size)
{
for (int i = 0; i < size; i++)
{
for (int j = 0; j < size; j++)
{
int tmp = matrix[i * size + j];
matrix[i * size + j] = matrix[j * size + i];
matri... | ALGO | 0.999858 | 4.431664 |
2d5172f0-663c-4344-8443-666d0d46c4c3 | glyredsun/boost | boost_1_61_0/libs/graph/example/implicit_graph.cpp | #include <boost/concept/assert.hpp>
#include <boost/graph/adjacency_iterator.hpp>
#include <boost/graph/dijkstra_shortest_paths.hpp>
#include <boost/graph/graph_concepts.hpp>
#include <boost/graph/properties.hpp>
#include <boost/iterator/counting_iterator.hpp>
#include <boost/iterator/iterator_facade.hpp>
#include <boo... | ALGO | 0.999715 | 5.788437 |
b54465fa-543a-452e-8890-fe5d5bc85272 | yzzupgo/MFTCG | Data/abc123_b/ckw/wa/4966507.cpp | #include <iostream>
#include <array>
using namespace std;
int main(){
//input
array<int, 5> A;
for(int i=0; i<5; i++){
cin >> A[i];
}
//compute
int min;
int ans = 0;
for(int i=0; i < 5; i++){
if(i==0){
min = A[i];
}else if(A[i]%10 < min%10){
... | ALGO | 0.999435 | 3.811926 |
591ca1a0-d2af-4530-a160-bd1a466f9c31 | illwieckz/OWEngine | code/Library/bullet-2.80-rev2531/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.cpp | #include "btQuantizedBvh.h"
#include "LinearMath/btAabbUtil2.h"
#include "LinearMath/btIDebugDraw.h"
#include "LinearMath/btSerializer.h"
#define RAYAABB2
btQuantizedBvh::btQuantizedBvh() :
m_bulletVersion(BT_BULLET_VERSION),
m_useQuantization(false),
//m_traversalMode(TRAVERSAL_STACKLESS_CACHE_FRIE... | ALGO | 0.998314 | 7.086988 |
42e1308f-bf45-4c87-af68-2b3ff383910b | MoriamAkterSwarna/phitron-practice | C++ for DSA/Week-1/Module-2/dynamic_array.cpp | #include<bits/stdc++.h>
using namespace std;
int main(){
// int *a = new int[5]; // dynamic memory allocation of array of 5 integers
int n;
cin >> n;
int *a = new int[n]; // dynamic memory allocation of array of n integers
for(int i = 0; i < n; i++){
cin >> a[i];
}
for(int ... | ALGO | 0.992818 | 3.494897 |
66b58d11-de15-4b80-9cbb-c2e9635bc201 | KumarOjas/Codeforcees-solution-archive. | PracticeTwoPointersMethodSegmentwithSmallSpread.cpp.cpp | #include <cstdio>
#include <vector>
#include <set>
typedef long long ll;
int main () {
ll n, k;
scanf("%lld %lld", &n, &k);
std::vector<ll> a(n);
for(ll p = 0; p < n; p++)
{
scanf("%lld", &a[p]);
}
std::multiset<ll> s;
ll left(0), cnt(0);
for(ll p = 0; p < n; p++){
s.insert... | ALGO | 0.999901 | 3.850949 |
4a908b15-d90f-4f82-983a-cad070e64027 | AntonyFP-7/flutter_teslo_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.998799 | 6.776823 |
dfaa5911-b4d9-458a-bbfd-b3390c8cb74e | harsh-kain/leetcode_problems | createTargetArrayintheGivenOrder_1389.cpp | #include<iostream>
#include<vector>
using namespace std;
class Solution {
public:
vector<int> createTargetArray(vector<int>& nums, vector<int>& index){
int n=nums.size();
vector<int> ans;
for(int i=0;i<n;i++)
ans.insert(ans.begin()+index[i],nums[i]);
return ans;
}
};
int main()
... | ALGO | 0.999971 | 5.682631 |
aef63333-2198-456c-b5a0-11e31aa52394 | Yuzhou541/Algorithm_competition | 34.heap.cpp | #include<iostream>
#include<algorithm>
using namespace std;
const int N = 100010;
int h[N], hp[N], ph[N];
int mysize;
void heap_swap(int u, int v){
swap(h[u], h[v]);
swap(hp[u], hp[v]);
swap(ph[hp[u]], ph[hp[v]]);
}
void down(int u){
int t = u;
if(2 * u <= mysize && h[t] > h[2 * u]) t = 2 * u;
if(2 * u + 1 <= my... | ALGO | 0.999855 | 3.96444 |
a6aea82d-b123-4fe9-8d60-fe7c66f5b0df | samva123/DSA-CPP | Codes/Queue/Implementations/queue/LinkedList.cpp | #include <iostream>
using namespace std;
struct Node {
int data;
Node* next;
Node* prev;
Node(int val) : data(val), next(nullptr), prev(nullptr) {}
};
class QueueLL {
Node *front, *rear;
public:
QueueLL() : front(nullptr), rear(nullptr) {}
void enqueue(int val) {
Node* newNode = n... | ALGO | 0.999387 | 4.755536 |
669f76e1-fce6-4009-be16-1bb7ff12d269 | gr-rassadnikov/itmo | sem-3/dm/lab-2/A.cpp | //
// Created by Grigorii Rassadnikov on 08.01.2023.
//
#include <iostream>
#include <vector>
#include <set>
#include <fstream>
#include <algorithm>
using namespace std;
#define ll long long
int main() {
ifstream cin("schedule.in");
ofstream cout("schedule.out");
ll n;
cin >> n;
vector<pair<ll,... | ALGO | 0.999847 | 4.427144 |
604a02f0-03d5-4eda-8b69-b0aea58908c0 | alfiyanilmi12/alfiyan | responsi_Alfiyanilmi_5160411396.cpp | #include <conio.h>
#include <string.h>
#include <stdio.h>
struct data
{
char nama[30];
char nim[10];
int nilai;
};
data mhs[10];
int n,i,j,a,k,m;
char kata[10],temp[10];
void input()
{
printf("Jumlah data : "); scanf("%d",&n);
for (i=0; i<n; i++)
{
printf("\nData ke-%d\n",i+1);
printf(" ... | ALGO | 0.996241 | 3.157157 |
e753d6df-3143-4213-9bd6-91b97dc1f844 | son-of-mountain/problem-solving | codeforces/icpc_mansoura/.history/session3/S - Min Cost String_20240810131050.cpp | #include<bits/stdc++.h>
using namespace std;
#define sonic ios_base::sync_with_stdio(false) ; cin.tie(NULL) ; cout.tie(NULL);
int main(){
string s ;
cin >> s ;
int cost[26];
for(int i=0; i<26; i++) cin >> cost[i];
int mincost = INT_MAX ;
char minstr = 'z' ;
// approach
// 1. for each... | ALGO | 0.99999 | 3.960783 |
95b4d2e3-018c-455f-912e-f155f4584ef3 | sorowar-cse/Recursion | G.cpp | #include<stdio.h>
void print_star(int n)
{
int k= 0;
if(n==0)
return;
while(k!=2*n-1)
{
printf ("*");
k++;
}
print_star(n-n);
}
void print_space(int n)
{
if(n==0)
return;
printf(" ");
print_space(n-1);
}
void print_the_pat(int n,int m)
{
if(n==0... | ALGO | 0.999979 | 3.898111 |
582a1262-7d58-4e55-b8ba-b0048a1e4f03 | tajwone17/Competitive-programming | CodeForce/B_Move_to_the_End.cpp | #include <bits/stdc++.h>
using namespace std;
#define freePalestine \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define int long long int
#define all(n) for (int i = 0; i < (n); i++)
#define endl "\n"
#define no cout << "NO" << endl
#define yes cout << "YES" ... | ALGO | 0.999742 | 4.344144 |
a56fa34d-c32f-44b4-93cd-46d6373e7d9b | delsiiin/leetcode | 动态规划/1301.最大得分的路径数目.cpp | /*
* @lc app=leetcode.cn id=1301 lang=cpp
*
* [1301] 最大得分的路径数目
*/
// @lc code=start
#include <iostream>
#include <vector>
using namespace std;
using PII = pair<int, int>;
class Solution
{
private:
static constexpr int mod = (int)1e9 + 7;
public:
void update(vector<vector<PII>> &dp, int n, int x, int y, ... | ALGO | 0.99995 | 6.192718 |
98f5f431-9935-49ae-8bf2-60f139bcd730 | avdhagam/DSA | dsa/minstepstoone.cpp | #include <stdio.h>
#include <iostream>
#include <vector>
using namespace std;
int helper(int n, vector<int> &dp)
{
if (dp[n] != -1)
{
return dp[n];
}
if (n == 1)
{
return 0;
}
int ans2 = 1e9;
int ans3 = 1e9;
if (n < 1)
{
return 1e9;
}
int minus... | ALGO | 0.999942 | 4.673007 |
ce15eb61-4473-404d-863e-a1af08664a20 | alexriderspy/Coding-on-a-whim | cses/dp/array description.cpp | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n'
#define sz(x) (int)(x.size())
#define all(x) x.begin(),x.end()
#define rall(x) (x).rbegin(),(x).rend()
#define setbits(x) __builtin_popcountll(x)
#define leastsigbit(x) __builtin_ffs(x)
#define hmap unordered_map
#define hset uno... | ALGO | 0.999996 | 3.974452 |
f48c7bc0-2675-4ee0-a2e8-1174b713b8fc | itsTg1/DataStructures | binarySearch/sqrtx.cpp | class Solution {
public:
int mySqrt(int x) {
int ans=0;
int s=1;
int e=x;
while(s<=e){
int mid=s+(e-s)/2;
if(mid==x/mid){
return mid;
}
else if(mid<x/mid){
ans=mid;
s=mid+1;
}
... | ALGO | 0.999982 | 5.260017 |
673a90ec-2395-4676-8e14-c31bf0c09c41 | alexandraback/datacollection | solutions_5670465267826688_0/C++/Dariost/solution.cpp | #include <bits/stdc++.h>
using namespace std;
#define sym_one (0)
#define sym_i (1)
#define sym_j (2)
#define sym_k (3)
#define sign_neg (1)
#define sign_pos (0)
typedef pair<int, int> ii;
ii multiply(ii a, ii b)
{
ii res;
res.first = a.first ^ b.first;
if(a.second == sym_one)
{
res.second =... | ALGO | 0.999943 | 3.729214 |
57bb6245-d6b5-4bae-a6f7-e7411a8c0820 | AR0Ss/Visual03-31 | main.cpp | #include <iostream>
using namespace std;
int main()
{
//1 100 ¦ ϶ (For Լ ̿)
int Total = 0;
for(int i = 0; i <= 100; i++)
{
if (i % 2 == 0)
{
Total += i;
}
cout << Total << endl;
}
return 0;
}
| ALGO | 0.996046 | 3.62879 |
4acdc02c-fd5c-4679-8db8-eaf003d9ca59 | urawa72/procon | atcorder/abc093/c/main.cpp | #include <bits/stdc++.h>
using namespace std;
#define all(v) v.begin(), v.end()
#define V vector
#define P pair
typedef long long ll;
const int INT_INF = 1e9;
const ll INF = 1LL << 30;
int main() {
V<int> v(3);
for(int i = 0; i < 3; i++) cin >> v[i];
sort(all(v));
int x = v[2] - v[0];
int y = v[2... | ALGO | 0.999924 | 4.170787 |
79808e37-b158-465c-9e3e-89fecbe8f70c | jdshahexplore/shah | cpp/jainam/Practical_31.cpp | #include<iostream>
using namespace std;
template<class T>
void bubble_sort(T b[])
{
T temp;
for(int i=0;i<10;i++)
for(int j=i;j<10;j++)
if(b[i]>b[j])
{
swap(b[i],b[j]);
}
}
template<class T1>
void swap(T1 a,T1 b)
{
T1 temp;
temp=a;
a=b;
b=temp;
}
int main()
{
int a[5];
float b[10];
cout<<"Ent... | ALGO | 0.998618 | 3.651025 |
f2cda501-0081-42b7-8238-4b7f7595e308 | mishrajiharsh219/leetcode | 2545-sort-the-students-by-their-kth-score/2545-sort-the-students-by-their-kth-score.cpp | class Solution {
public:
vector<vector<int>> sortTheStudents(vector<vector<int>>& score, int k) {
int m=score.size();
int n=score[0].size();
vector<vector<int>> ans;
vector<pair<int,int>> v;
for(int i=0;i<m;i++){
v.push_back({score[i][k],i});
}
sor... | ALGO | 0.999959 | 5.851186 |
bd3835a9-1b4f-4fa3-af40-2980a9ad78c0 | goiaciprian/Cplpl | trapez.cpp | //trapez.cpp -- PbInfo -- Raspuns asteptat 6.08, output 6.009 pentru 6 2 5;
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
float b, B, l, c, h, d, f;
cin >> B >> b >> l;
c = (B-b)/2;
h = sqrt((l*l) - (c*c));
f = b + c;
d = sqrt(h*h+f*f);
cout << d;
return 0;
... | ALGO | 0.999832 | 3.247393 |
7766b9f3-4816-4a46-9a26-32e9f3a4e486 | equation9/BOJ | 10809.cpp | /*10809번 알파벳 찾기*/
#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
int main(){
char Word[101];
int alphabet[26][2], i, alph;
for(i = 0 ; i < 26; i++){
alphabet[i][1] = -1;
alphabet[i][0] = 0;
}
scanf("%s", Word);
for(i = 0 ; i < strlen(Word) ; i++)
{
alph = (int)Word[i] - 97;... | ALGO | 0.999944 | 3.53827 |
d32791af-d0f3-42ff-8bfa-de84dbe94073 | raincross7/code-similarity | codes/train_code/problem138/problem138_202.cpp | #include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define int long long
const int N = 1e5 + 5;
int n, ans = 0, mx = -1;
int a[N];
int32_t main()
{
IOS;
cin >> n;
for(int i = 1; i <= n; i++)
{
cin >> a[i];
if(a[i] >= mx)
ans++;
... | ALGO | 0.999827 | 4.25365 |
8853b4a0-e586-4f16-b274-37d0f0ff3847 | ayushman3004/Basic-C- | tempCodeRunnerFile.cpp | #include<iostream>
#include<vector>
using namespace std;
int main(){
vector<int> v;
//for loop
for(int i=0; i<5; i++){
int elements;
cin>>elements;
v.push_back(elements);
}
for(int i=0; i<v.size(); i++){
cout<<v[i]<<" ";
}
cout<<endl;
//for each ... | ALGO | 0.997827 | 3.976169 |
6c781ae8-5d8d-49f5-b1f0-2d6c0f764263 | ishandutta2007/codeforces | wsyhb/normal/1293/B.cpp | #include<stdio.h>
#include<bits/stdc++.h>
using namespace std;
int main()
{
double s=0;
int n;
scanf("%d",&n);
for(int i=1;i<=n;i++)
s+=1.0/i;
printf("%.12lf",s);
return 0;
} | ALGO | 0.999322 | 3.514263 |
d1c8158e-4e88-4fbb-8f11-4bd3005250eb | mlllolllm/c-primer-plus-6th-answers | c++ primer plus 6th/Chapter17/5/5/Source.cpp | #include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<set>
#include<fstream>
using namespace std;
int main() {
string temp;
cout << "Welcome Mat`s and Pat`s friends!\n";
cout << "Here are Mat`s friends(q to quit):\n";
vector<string> mf;
getline(cin, temp);
while (temp != "q") {
mf.p... | ALGO | 0.991641 | 4.240334 |
343f6c2a-8c0f-4084-8e9c-5b0dc23e4da2 | BrendanGlancy/akron | old/semester-5/cpp/1/Gaddis-CPP_10e_SourceCode/Chapter 17/Program 17-14.cpp | #include <iostream>
#include <string>
#include <map>
#include "Contact.h"
using namespace std;
int main()
{
string searchName; // The name to search for
// Create some Contact objects
Contact contact1("Ashley Miller", "<EMAIL>");
Contact contact2("Jacob Brown", "<EMAIL>");
Contact contact3("Emily Ram... | TOOL | 0.882487 | 4.674838 |
8c36c656-9393-4d5f-8419-d0c749dc9c3d | stuti2403/Interactive-Video-Synthesis-using-Vibrational-Modal-Analysis | Lukas Kanade +sim/opencv/modules/imgproc/src/featureselect.cpp | #include "precomp.hpp"
#include "opencl_kernels_imgproc.hpp"
#include <cstdio>
#include <vector>
#include <iostream>
#include <functional>
namespace cv
{
struct greaterThanPtr :
public std::binary_function<const float *, const float *, bool>
{
bool operator () (const float * a, const float * b) const
... | ALGO | 0.998912 | 6.866618 |
557bf5b2-61c3-469a-9494-096cb18a1247 | jacke121/push_image_to_rtsp | hik_client_dll/opencv/sources/modules/photo/src/calibrate.cpp | #include "precomp.hpp"
#include "opencv2/photo.hpp"
#include "opencv2/imgproc.hpp"
//#include "opencv2/highgui.hpp"
#include "hdr_common.hpp"
namespace cv
{
class CalibrateDebevecImpl : public CalibrateDebevec
{
public:
CalibrateDebevecImpl(int _samples, float _lambda, bool _random) :
name("CalibrateDebev... | TOOL | 0.990898 | 5.928608 |
53d47b09-30fa-4e19-bf0e-44173662404c | JiaLong0209/TKU_Assignments | 112-2/Computer_Programming/week13/median_of_array.cpp | #include "./functions.h"
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
void exe(int* arr, int n, int times){
for(int i = times; i; i--){
printf("\n-----------------Round %d-----------------\n", times-i+1);
randomArray(arr, n);
printArray(arr, n);
bubbleSort(arr, n);
printArray(arr, n);
double m... | ALGO | 0.999677 | 4.338747 |
16f8bf15-7525-4155-945d-e70ea4fecbb6 | Shamil-Wild/Prakticheskii | ConsoleApplication10(3)/ConsoleApplication10(3)/ConsoleApplication10(3).cpp | #include <iostream>
#include <cmath>
using namespace std;
double A, result, a; //переменная для числа
int B; //переменная для целой степени
int main() {
cin >> A; //ввод числа
cin >> B; //ввод целой степени
a = A; //записываем число
for (int i = 1; i != B; i++) { //задаем счетчик i=1, пока i не равно B(нашей... | ALGO | 0.999974 | 4.77972 |
dfd11bf8-87cf-406c-acd3-e424d9f98414 | lewissbaker/llvm | clang-tools-extra/clang-include-fixer/find-all-symbols/PathConfig.cpp | #include "PathConfig.h"
#include "llvm/Support/Path.h"
namespace clang {
namespace find_all_symbols {
std::string getIncludePath(const SourceManager &SM, SourceLocation Loc,
const HeaderMapCollector *Collector) {
llvm::StringRef FilePath;
// Walk up the include stack to skip .inc files.... | TOOL | 0.883415 | 7.71141 |
82fcb420-d7c8-470c-902d-ee26681c1376 | jasacris/Proyecto-TT1 | src/TimeUpdate.cpp | #include "..\include\TimeUpdate.hpp"
Matrix& TimeUpdate(Matrix &P, Matrix &Phi, double Qdt){
return Phi*P*transponse(Phi) + Qdt;
} | ALGO | 0.998422 | 3.909944 |
6405686b-751a-43b8-9bc1-9407ab1b6ba1 | L3r0yJ3nkins/testcore | src/bindings/ScriptDev2/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp | /* ScriptData
SDName: Boss_Nethermancer_Sepethrea
SD%Complete: 90
SDComment: Need adjustments to initial summons
SDCategory: Tempest Keep, The Mechanar
EndScriptData */
#include "precompiled.h"
#include "mechanar.h"
#define SAY_AGGRO -1554013
#define SAY_SUMMON -1554014
#def... | TOOL | 0.917821 | 6.849857 |
b6db272c-039d-4144-8da5-0fb461823600 | mohammedaafith/afithguvi | digit.cpp | #include <bits/stdc++.h>
using namespace std;
int countDigit(long long n)
{
int count = 0;
while (n != 0) {
n = n / 10;
++count;
}
return count;
}
int main(void)
{
long n;
cin>>n;
cout<< countDigit(n);
return 0;
}
| ALGO | 0.999699 | 4.728192 |
174a6515-85a4-47f0-a631-b1d14a6d1fba | Mwako/deps | boost/libs/spirit/classic/example/fundamental/stuff_vector.cpp | ///////////////////////////////////////////////////////////////////////////////
//
// This sample demontrates a parser for a comma separated list of numbers
// This is the phoenix version of number_list.cpp.
// This is discussed in the "Phoenix" chapter in the Spirit User's Guide.
//
// [ JDG 1/12/2004 ]
//
///////... | TOOL | 0.978579 | 7.116484 |
7c65d7c5-b60f-4f02-9472-a2b3cbd246f2 | Harishankeryadav/leetCode | 3sumclosest.cpp | #include <bits/stdc++.h>
using namespace std;
int threeSumClosest(vector<int>& nums, int target) {
sort(nums.begin(), nums.end());
int closestSum = INT_MAX; // Initialize closestSum with a large value
int minDiff = INT_MAX; // Initialize minDiff with a large value
for (int i = 0; i < nums.size() - 2; ... | ALGO | 0.999996 | 6.01731 |
660f687b-e691-4257-99eb-1bbfafe1b1c7 | MingshanHe/Theory-and-Practice-of-Humanoid-Walking-Control | 3. Project/tmp/qpoases/testing/cpp/test_example5.cpp | /**
* \file testing/cpp/test_example5.cpp
* \author Andreas Potschka, Christian Kirches
* \version 3.2
* \date 2011-2017
*
* Very simple example for testing qpOASES (using the possibility to
* compute the local linear feedback law)
*/
#include <stdlib.h>
#include <qpOASES.hpp>
#include "../../examples/exampl... | ALGO | 0.927024 | 5.913157 |
b6683bf7-56ec-411c-82e9-2ac761713e35 | rishii1909/dusty-drawers | Codechef practice problems/1000-1200 1* Beginners Level/ELECTIONS.cpp | #include <bits/stdc++.h>
using namespace std;
template<typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p) { return os << '(' << p.first << ", " << p.second << ')'; }
template<typename T_container, typename T = typename enable_if<!is_same<T_container, string>::value, typename T_container::va... | ALGO | 0.987883 | 4.035164 |
ef135896-c936-4853-ae87-c3e75d4db053 | darrylteo/cp4-solutions | 4 Graph/2. Minimum spanning tree/b. Variants/10048 - Audiophobia.cpp | #include <bits/stdc++.h>
using namespace std;
typedef tuple<int, int, int> iii;
typedef vector<int> vi;
class UnionFind { // OOP style
private:
vi p, rank, setSize; // vi p is the key part
int numSets;
public:
UnionFind(int N) {
p.assign(N,... | ALGO | 0.999942 | 4.579329 |
80116455-8838-4113-aadf-e99f2bd06912 | ishandutta2007/codeforces | kuroni/normal/1746/D.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int t; cin >> t;
while (t--) {
int n, k; cin >> n >> k;
vector adj(n, vector<int>());
vector<int> a(n);
for (int i = 1; i < n; i++) {
int p; cin >> ... | ALGO | 0.999941 | 3.726916 |
23180c57-9e99-4b97-a6c4-e818eb546da3 | Ravinesh18/DSA | Arrays/maxdiffprob.cpp | #include <bits/stdc++.h>
using namespace std;
int maxdiff(vector<int> arr)
{
int min = INT_MAX, max = INT_MIN, a, b;
for (int i = 0; i < arr.size() - 1; i++)
{
if (arr[i] > max)
{
max = arr[i];
}
else
{
}
}
return -1;
}
int main()
{
v... | ALGO | 0.999356 | 4.487387 |
936c4cb1-e7a7-4635-b5be-7f678820c045 | Ryb7532/AtCoder | submissions/abc333/c.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define GET_MACRO(_1,_2,_3,NAME,...) NAME
#define rep3(i,s,e) for (int i=(int)s; i<(int)e; i++)
#define rep2(i,n) rep3(i,0,n)
#define rep(...) GET_MACRO(__VA_ARGS__,rep3,rep2)(__VA_ARGS__)
#define rrep3(i,s,e) for (int i=(int)e-... | ALGO | 0.999961 | 3.283996 |
cd616023-8c05-4b2c-a9d8-97379a1bfb76 | Piau3425/Code-Practice | MCU/道館題/一上/W9_LCS_&_LIS/pA-uva_10405.cpp | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define fi first
#define se second
#define INF 0x3f3f3f3f
#define WA() ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
#define int long long
signed main() { WA();
... | ALGO | 0.999873 | 4.917057 |
04e1115e-9c99-4170-8c34-09c14c67ed4e | mdaffabdul/M.Daffa.A.M_LabAlgo | Pertemuan 6/menggubah kapital menjad non kapital.cpp | #include <iostream>
#include <cctype>
#include <cstring>
using namespace std;
int main()
{
char teks[20], teks_baru[20];
cout << "Tuliskan kata dengan huruf kapital = ";
cin >> teks;
for (int i=0; i<strlen(teks); i++) {
if(teks[i] >= 'a' && teks[i] <= 'z'){
teks_baru[i] = toupper... | ALGO | 0.908621 | 4.766541 |
0861b377-c99b-412d-8b71-9e7851fb9325 | elteammate/cadical-async-env | cadical/src/queue.cpp | #include "internal.hpp"
namespace CaDiCaL {
// Slightly different than 'bump_variable' since the variable is not
// enqueued at all.
inline void Internal::init_enqueue (int idx) {
Link &l = links[idx];
if (opts.reverse) {
l.prev = 0;
if (queue.first) {
assert (!links[queue.first].prev);
links... | ALGO | 0.997298 | 7.382623 |
a77ecfc6-adb8-46c8-a408-6b0205d81d8f | WeichenXu/shuati | 368_largest_div_subset.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
class Solution {
public:
vector<int> largestDivisibleSubset(vector<int>& nums) {
sort(nums.begin(), nums.end());
vector<pair<int, int>> dp;
int maxSize = -1, maxIdx = -1;
for (int i=0; i<nums.size(); ++... | ALGO | 0.999927 | 4.765706 |
94426352-59d5-4079-b686-a5ff10bf489b | ishandutta2007/codeforces | i_love_dasha_karpenko/normal/1327/E.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> pp;
typedef tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update> super_set;
typ... | ALGO | 0.999912 | 3.72214 |
805bccbf-23f8-4ee3-a268-0d4699700ad5 | Bri1987/acwing | algorithm_basic/basic/1_difference_797.cpp | #include <iostream>
using namespace std;
void insert(int l ,int r, int c, int b[]){
b[l] += c;
b[r + 1] -= c;
}
int main(){
int n,m;
cin >> n >> m;
//insert算法涉及到r + 1,所以数组b多开一列
int a[n + 1],b[n + 2];
a[0] = 0;
for(int i = 1; i <= n; i++)
cin >> a[i];
for(int i = 0; i <= n ... | ALGO | 0.999925 | 3.495136 |
1c688e42-2f62-4b9f-9aaa-f92543ebecc8 | thenamerahulkr/dsa | Thodi si maths/isPrime.cpp | #include <bits/stdc++.h>
using namespace std;
bool isPrime(int n)
{
if(n==1){
return false;
}
for (int i = 2; i < sqrt(n); i++)
{
if (n % i == 0)
{
return false;
}
}
return true;
}
int main()
{
cout << isPrime(6);
} | ALGO | 0.999764 | 4.178679 |
236d3447-d1c2-42e1-be7a-0deb8c09a202 | Yanagi-kon/HuaweiSOFT | helpSOS_map4.cpp | #include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
#include <cmath>
#include <vector>
#include <queue>
#include <map>
#include <fstream>
#include <ctime>
#include <utility>
#include <cstdlib>
using namespace std;
const int M_SIZE = 200;
const int B_SIZE = 10;
const int BOAT_SIZE = 5;
char mp[2... | ALGO | 0.99943 | 3.409755 |
2fb533d1-6c85-4bec-b225-013e8cdb7885 | IAmAllOfMe/Steve | ConsoleApplication2/ConsoleApplication2/ConsoleApplication2.cpp | // ConsoleApplication2.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "stdafx.h"
#include <fstream>
#include <iostream>
#include <cmath>
#include <string>
#include <stdio.h>
using namespace std;
int main()
{
float G = 6.67408*pow(10,-11);//gravitational constant in SI uni... | ALGO | 0.996754 | 3.67181 |
c7da5760-6f73-4215-9dd4-f1a2267e9bd4 | ishandutta2007/codeforces | hongzy/normal/126/B.cpp | #include <cstring>
#include <cstdio>
char * No_res = "Just a legend\n";
char s[1000100];
int n, f[1000100];
void get_fail() {
f[0] = f[1] = 0;
for(int i = 1; i < n; i ++) {
int j = f[i];
for(; j && s[i] != s[j]; j = f[j]) ;
f[i + 1] = s[i] == s[j] ? ++ j : 0;
}
}
bool KMP(char * T, int len) {
int j = 0;
... | ALGO | 0.999968 | 3.400513 |
98df2374-f514-43d3-b8b2-7283839771fa | ameyjain99/CodingNinja | Number Theory-3/income_on_the_nth_day.cpp | /* Daulat Ram is an affluent business man. After demonetization, IT raid was held at his accommodation in which all his money was seized. He is very eager to gain his money back, he started investing in certain ventures and earned out of them. On the first day, his income was Rs. X, followed by Rs. Y on the second day.... | ALGO | 0.999925 | 4.935002 |
7e4b56d4-1d67-43ff-ba47-7f460d87db9c | Omisha016/DSA-stash | Recursion/RatInMaze.cpp | //
// RatInMaze.cpp
// Recursion
//
// Created by Omisha Gupta on 06/08/23.
//
#include <iostream>
#include <vector>
using namespace std;
bool isSafe(int x, int y,vector < vector < int >> & arr,vector<vector<bool>> &visited,int n)
{
if((x>=0 && x<n) && (y>=0 && y<n) && arr[x][y]==1 && visited[x][y]==0)
{
... | ALGO | 0.999981 | 6.048662 |
e9751d17-1a02-4b16-9e5b-bb8b9ec2ffdf | GMANOHAR-1/Strivers-SDE-Sheet-Challenge | binary_search/allocate books.cpp | /*
Time Complexity: O(M * log(K))
Space complexity: O(1),
where 'K' is the sum of the time required to study all the chapters
and 'M' is the number of chapters.
*/
long long ayushGivesNinjatest(int n, int m, vector<int> time)
{
long long sum = 0;
int maxTime = INT_MIN;
// We will itera... | ALGO | 0.999986 | 6.075375 |
c8f35f18-e596-4464-82c2-9bf215d29d2a | Himanshu2500/Codeforces | Div2/648/B.cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int M=1e9+7;
int a[501];
int b[501];
int c[501];
void solve()
{
int n;
cin>>n;
for(int i=0;i<n;i++)
{
cin>>a[i];
c[i]=a[i];
}
int z=0,o=0;
for(int i=0;i<n;i++)
{
cin>>b[i];
if(b[i]==1)
o++;
else
z++;
}
... | ALGO | 0.99998 | 3.703701 |
3e99d210-476d-48a8-86bb-39f823d8246f | Hemannshu/DSA-codes | fibo.cpp | #include <iostream>
using namespace std;
int fib(int n){
if(n<=1){
return n;
}
int result1 = fib(n-1);
int result2= fib(n-2);
int result = result1 + result2;
return result;
}
int main() {
int n;
cin>>n;
int ans = fib(n);
cout<< ans<<endl;
return 0;
}
| ALGO | 0.999944 | 5.092109 |
30e860a6-4780-496f-9b55-e2a5d67c3879 | ishandutta2007/codeforces | enem/normal/835/C.cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pll pair<ll,ll>
#define ull unsigned long long int
#define rep(i,a,b) for (ll i = a; i <= b; i++)
#define ren(i,a,b) for(ll i=b;i>=a;i--)
#define F first
#define S second
#define PB push_back
#define DB pop_back
#define MP make_pair
#define MT m... | ALGO | 0.999874 | 3.408939 |
2388334a-368b-4fb8-8094-2fe21225e5c5 | Coder-Liuu/CCF-CSP-solution | 2013-12/4-有趣的数.cpp | // 知识点:排列组合
#include <iostream>
using namespace std;
typedef long long LL;
const int N = 1010, MOD = 1e9 + 7;
int n;
LL C[N][N];
LL res,t;
int main() {
cin >> n;
for(int i = 0; i < N; i++){
for(int j = 0; j <= i; j++){
if(!j) C[i][j] = 1;
else C[i][j] = (C[i-1][j] + C[i-1][j-1]... | ALGO | 0.999985 | 4.561546 |
9e5ac698-d2ca-422e-9c02-ae55f9281b74 | OhYee/sourcecode | ACM/AOJ/805.算法期末考试A.cpp | /*
By:OhYee
Github:OhYee
HomePage:http://www.oyohyee.com
Email:<EMAIL>
Blog:http://www.cnblogs.com/ohyee/
かしこいかわいい?
エリーチカ!
要写出来Хорошо的代码哦~
*/
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <string>
#include <iostream>
#include <vector>
#include <list>
#include <queue>
#include <... | ALGO | 0.999941 | 3.45512 |
9b6b66cc-c352-41c3-b865-884eabca6276 | jshky/CODE | p3959.cpp | // luogu-judger-enable-o2
#include<bits/stdc++.h>
using namespace std;
int n,m,i,j,a[15][15],deep[15],ans=INT_MAX,cnt,b[15];
const int inf=2139062143;
inline int read () {
int X = 0; char ch = 0;
while(ch < 0 || ch > 9) ch = getchar();
while(ch >= 0 && ch <= 9) X = X * 10 + ch - '0', ch = getchar();
re... | ALGO | 0.999888 | 3.76478 |
64880e55-e192-42c4-abd0-37c8009c7c90 | TSEDA-C/TSEDA | TSEDA-EC-OnUse-Orth/main.cpp | #include <fstream>
#include <sstream>
#include "common.h"
#include "config.h"
#include "TSEDA.h"
using namespace std;
int main() {
srand((int) time(0));
//{set the runtime (termination) time of the algorithm} -xy4
map<string, double> SchTime;
SchTime["CyberShake30_1.0"] = 1.389;
SchTime["CyberSh... | ALGO | 0.994156 | 3.370815 |
e75ae075-80c4-4025-8892-d4f895b4311e | russellocean/CPSC2120 | Stack-based Postfix Expression Calculator/Postfix Calculator Sample Test Cases/T5.cpp | #include <string>
#include <iostream>
using namespace std;
int calculatePostfixExpression(string expression[], int length);
int main()
{
string exp[] = {"22", "5", "%"};
//ASSERT_EQ(calculatePostfixExpression(exp,3), 2);
if (calculatePostfixExpression(exp,3) != 2)
{
cout << "expected/correct... | TEST | 0.982472 | 4.319635 |
9b85da8b-3667-4f69-a623-87cb2084899d | DeveloperArthur/Programacao-CPP | deque.cpp | #include <iostream>
#include <deque>
using namespace std;
int main(int argc, char *argv[]){
deque<int> fila;
cout << "Antes de inserir os elementos: ";
if(fila.empty()){
cout << "Fila vazia\n";
}else{
cout << "Fila nao vazia\n";
}
fila.push_back(10);
fila.push_back(20);
fila.push_front(30);
cout << ... | TOOL | 0.928711 | 5.153615 |
17d9709e-2a57-4f64-925a-21ee0e58c7c9 | faridsantiago25/currency_api | 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.99887 | 6.783439 |
744b99d6-79f8-410b-950e-0ee8d487318c | iMjayant17/PracticeLeet | 1700-minimum-time-to-make-rope-colorful/minimum-time-to-make-rope-colorful.cpp | class Solution {
public:
int minCost(string colors, vector<int>& t) {
int ans = 0;
for(int i = 0;i<colors.length();i++){
int sum = t[i];
int maxi = t[i];
for(int j = i+1;j<colors.length();j++){
if(colors[j]!=colors[i]){
... | ALGO | 0.999784 | 5.963068 |
20629874-e3d5-4bcc-b7aa-7f785757d697 | Source-SDK-Archives/source-sdk-orangebox | utils/serverplugin_sample/serverplugin_empty.cpp | #include <stdio.h>
#include <stdio.h>
#include "interface.h"
#include "filesystem.h"
#include "engine/iserverplugin.h"
#include "eiface.h"
#include "igameevents.h"
#include "convar.h"
#include "Color.h"
#include "vstdlib/random.h"
#include "engine/IEngineTrace.h"
#include "tier2/tier2.h"
#include "game/server/iplayeri... | TOOL | 0.871986 | 5.608763 |
51b70afe-9873-46dc-b2e4-07ba1b383f29 | PhilipNelson5/math4610 | hw4/9-CholeskyTest/main.cpp | #include "../../hw3/5-matrixOperations/matrixOperations.hpp"
#include "../../utils/matrixUtils.hpp"
#include "../8-CholeskyFactorization/choleskyFactorization.hpp"
#include <chrono>
#include <iomanip>
#include <iostream>
int main()
{
const auto n = 1000;
Matrix<double> C = rand_double_NxM(n, n, -10, 10);
auto ... | TEST | 0.990489 | 6.312466 |
38cd33e7-22e7-42fb-80af-2fcc7ea38b6c | JH-Ha/Algorithm | baekjoon/10844/ans.cpp | #include <iostream>
#define MOD 1000000000
using namespace std;
long long dp[105][10];
int main()
{
for (int i = 1; i < 10; i++)
{
dp[1][i] = 1;
}
dp[1][0] = 0;
for (int i = 2; i < 105; i++)
{
dp[i][0] = dp[i - 1][1] % MOD;
//dp[i][1] = dp[i - 1][0] + dp[i - 1][2];
... | ALGO | 0.999857 | 3.920634 |
dad01a15-7702-441f-862d-7090349523b8 | xingdeshoumin/icar_detector | icar_detector/test/set_parameter.cpp | #include <cstdio>
#include <opencv2/opencv.hpp>
#include <rclcpp/rclcpp.hpp>
#include "icar_detector/Marks.hpp"
cv::RotatedRect conicalRect(std::vector<cv::Point> contour)
{
int Xmin = contour[0].x;
int Xmax = contour[0].x;
int Ymin = contour[0].y;
int Ymax = contour[0].y;
// 遍历数组,查找最大值和最小值
fo... | TOOL | 0.986258 | 4.527491 |
7262247e-a37e-42f9-9c23-4493f9fa80e4 | vanandrewnguyen/LC | addTwoNumbers.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
public:
ListNode* addTwoNumbe... | ALGO | 0.999771 | 6.550163 |
bfdfd1b8-2097-479e-befa-ed1612a9e1ec | LeoninCS/Henu_Data-Structure | 实验源码/实验7.cpp | #include<iostream>
#include<stack>
#include<queue>
#include<string>
using namespace std;
struct node {
char val;
node* left;
node* right;
};
node* root = nullptr;
void menu() {
cout << "1. " << endl;
cout << "2. (ݹ)" << endl;
cout << "3. (ǵݹ1)" << endl;
cout << "4. (ǵݵݹ2)" << endl;
co... | ALGO | 0.999253 | 3.656279 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.