uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
7e085b81-e18f-4147-911d-8b352dd37f55 | open-eid-lv/eparaksts-token-signing | macosx/eparaksts-chrome-extension/host-shared/BinaryUtils.cpp | #include "BinaryUtils.h"
#include <stdio.h>
#include <stdexcept>
using namespace std;
vector<unsigned char> BinaryUtils::hex2bin(const string &hex) {
if (hex.size() % 2 == 1)
throw runtime_error("Hex is incorrect");
vector<unsigned char> bin(hex.size() / 2, 0);
unsigned char *c = &bin[0];
const char *h... | TOOL | 0.890505 | 6.306987 |
3146a55d-6ab1-4710-a6db-d5b825c3c01c | coouir/codetree-TILs | 241223/특정 규칙에 따른 숫자 출력/output-numbers-according-to-specific-rule.cpp | #include <iostream>
using namespace std;
int main() {
// 여기에 코드를 작성해주세요.
int n, cnt = 1;
cin >> n;
for (int i=0; i<n; i++) {
for (int j=0; j<n; j++) {
if (j<i) {
cout << " ";
} else {
cout << cnt++ << ' ';
if (cnt == 10) {... | ALGO | 0.999941 | 4.132987 |
d69d7430-0d37-4a21-8f74-f051c8d42a65 | arbenton/balance | code/balance.cpp | #include <boost/math/quadrature/trapezoidal.hpp>
int main(void) {
return 1;
}
| TOOL | 0.946025 | 3.208456 |
1a25d6a2-f1d3-40b7-a5c1-b50b79cb7647 | IlyaKK/Coursera-C- | Coursera_C++/class_Function/src/class_Function.cpp | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
struct Image {
double quality;
double freshness;
double rating;
};
struct Params {
double a;
double b;
double c;
};
class FunctionPart{
public:
FunctionPart(char new_operation, double new_value){
operati... | TOOL | 0.957979 | 4.74529 |
2c3042e9-eaa8-4420-ac55-9a02e0f33954 | OWENBEEKS/RTGraphics-Lab-5 | Tutorial04/Tutorial04.cpp | using namespace DirectX;
//--------------------------------------------------------------------------------------
// Structures
//--------------------------------------------------------------------------------------
struct SimpleVertex
{
XMFLOAT3 Pos;
XMFLOAT3 Normal;
XMFLOAT2 Tex;
};
struct ConstantBuffer
{
... | TOOL | 0.900442 | 4.002818 |
25d50460-f5f4-4e3e-b2d1-c6fb03978dc9 | formerchild/gAClassFiles | 02/array_review_4.cpp | //-----------------------------------------------------------------------------------------------------------
// GAME AESTHETICS: Array Review part 4
//-----------------------------------------------------------------------------------------------------------
#include <iostream>
using namespace std;
int main()
{
/... | TOOL | 0.964068 | 4.453828 |
bea43c90-0639-46d8-9859-6feb0d031889 | letmefly/tools_script | Purple/VuPurple/Util/CommonUtility.cpp | #include "CommonUtility.h"
/*
@ Author: xlm(2015-2-9 9:31)
@ Parameter:
@ Returns:
@ Description:
*/
bool IsSameDay(unsigned long long uTime1, unsigned long long uTime2)
{
unsigned int uDay1 = uTime1 / DAY_SECOND;
unsigned int uDay2 = uTime2 / DAY_SECOND;
return (uDay1 == uDay2);
} | TOOL | 0.983555 | 3.928982 |
ee896da0-1d64-41f1-a459-dfe6eca89903 | Lessica/HikariSummer | mlir/lib/Analysis/Liveness.cpp | #include "mlir/Analysis/Liveness.h"
#include "mlir/IR/Block.h"
#include "mlir/IR/Operation.h"
#include "mlir/IR/Region.h"
#include "mlir/IR/Value.h"
#include "llvm/ADT/SetOperations.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/Support/raw_ostream.h"
using namespace mlir;
namespace {
/// Builds and holds block in... | TOOL | 0.958286 | 8.195807 |
4e6373e9-b7c0-4a2c-be1f-29118d4c6fe8 | SHEIKABDULLAHPM/Array-in-C | prime and even or odd.cpp | #include<stdio.h>
#include<string.h>
int main(){
char str[100];
int i,j,k;
scanf("%[^\n]s",str);
int n=strlen(str);
int prime=1;
if(n==0||n==1){
prime=0;
}
for(i=2;i<=n;i++){
if(n%i==0){
prime=0;
}
}
if(prime){
printf("%d not prime",n);
}
else{
printf("%d prime",n);
}
}
| ALGO | 0.999952 | 3.504752 |
c8d4ef0c-b0c6-48d3-8c1f-b395d3003b31 | Ashish-kushwaha01/DSA-Questions | Pattern_Left_Triangle.cpp | /* Pattern printing (Left Triangle )*/
#include<iostream>
using namespace std ;
int main(){
int n;
cout<<"Enter that how many rows you want to print : ";
cin>>n;
for(int i=1;i<=n;i++){
for(int j=1;j<=n-i;j++)
cout<<" ";
for(int j=1;j<=i;j++)
cout<<"* ";
cout<<"... | ALGO | 0.998734 | 3.307768 |
d3504aef-8b3f-479e-a807-2afbb6eccf40 | vasekp/genetic | examples/binary-mo.cpp | #include <iostream>
#include <random>
#include <functional>
#include <unistd.h> // isatty()
#include <chrono>
#include <atomic>
#include <iomanip>
#include <omp.h>
#ifdef DEBUG
#define NOINLINE __attribute__((noinline))
#else
#define NOINLINE
#endif
#include "genetic.hpp"
namespace Config {
const size_t popSize = ... | ALGO | 0.999622 | 4.99951 |
f4dd4060-604b-423a-8a87-03e812de90ea | ajayp1717/Mission_DS-Algo | Triplet Sum in Array - GFG/triplet-sum-in-array.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution{
public:
//Function to find if there exists a triplet in the
//array A[] which sums up to X.
bool find3Numbers(int A[], int n, int X)
{
//Your Code Here
sort(A,A+n);
fo... | ALGO | 0.999907 | 5.715562 |
5a3734b2-f8e0-4556-98e5-17211062f22c | jawedmoha/EDINARCOIN | libraries/chain/db_market.cpp | #include <graphene/chain/database.hpp>
#include <graphene/chain/account_object.hpp>
#include <graphene/chain/asset_object.hpp>
#include <graphene/chain/hardfork.hpp>
#include <graphene/chain/market_object.hpp>
#include <fc/uint128.hpp>
namespace graphene { namespace chain {
/**
* All margin positions are force clo... | TOOL | 0.877405 | 7.220785 |
c0e721c4-e528-4ce4-ae61-f9d89076f881 | Hiyabye/Baekjoon | 24xxx/24795.cpp | #include <iostream>
#include <unordered_set>
#include <vector>
using namespace std;
void solve(void) {
int n, y; cin >> n >> y;
unordered_set<int> k;
while (y--) {
int x; cin >> x;
k.insert(x);
}
int ans = n;
for (int i=0; i<n; i++) {
if (k.find(i) != k.end()) continue;
cout << i << "\n";
... | ALGO | 0.999663 | 3.550047 |
0af26f01-6a97-4052-b753-511efd26e7f6 | HwangCU/cppAlgorithm | ChiChi/PS/Baekjoon/Find_Area_2583.cpp | #include <iostream>
#include <queue>
#include <vector>
#include <algorithm>
using namespace std;
int N, M, K;
// 맵은 (N,M)임
int map[101][101] = { 0 };
int visited[101][101];
vector<int> ans;
int dy[] = { -1,1,0,0 };
int dx[] = { 0,0,-1,1 };
struct Point
{
int y, x;
};
void input()
{
cin >> M >> N >> K;
for (int i = ... | ALGO | 0.99985 | 3.243254 |
e3794e3f-fe7a-41bc-bd47-534770ca3ea8 | Andwerpz/Competitive-Programming-Practice | - cpp -/traderoutes.cpp | #include<bits/stdc++.h>
using namespace std;
typedef int64_t ll;
typedef vector<int> vi;
#define mp make_pair
#define pb push_back
#define f first
#define s second
#ifdef LOCAL
#include "debug.hpp"
#else
#define debug(...) "LAMELO > MJ"
#endif
//RMRC 2021 - M
//josh priority queue greedy implementation.
//idea is t... | ALGO | 0.999974 | 4.284962 |
893eb1f8-ed02-458a-a8a8-3b0eb9b770d3 | changhyeonnam/Problem_Solving | codeforce/#764(div.3)/B.cpp | //
//#include <iostream>
//#include <cstring>
//#include <string>
//#include <algorithm>
//#include <vector>
//#include <queue>
//#include <stack>
//#include <map>
//#include <set>
//#include <cmath>
//#define endl '\n'
//#define INF 1e9
//#define LINF 9223372036854775807
//using namespace std;
//
//typedef long long l... | ALGO | 0.999801 | 4.030263 |
ce1c1e14-b365-4014-8a5d-04035af1c64f | oberdandev/faculdade | Periodo_2/Estrutura de Dados/pilhas/c.cpp |
#include <iostream>
using namespace std;
const int MAX_SIZE = 100; // maximum size of the stack
class Stack {
private:
int top; // index of the top element in the stack
int arr[MAX_SIZE]; // array to store the elements of the stack
public:
Stack() { // constructor to initialize the stack
top... | ALGO | 0.997911 | 5.278097 |
2dc3ccf7-3e81-422d-a714-2b584b66cc6e | EllinaSohnenko/Matching | Программа/readFile.cpp | #include "readFile.h"
#include "element.h"
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <string>
#include <regex>
using namespace std;
int n = 0;
vector<graph> gr(0);
vector<vector<int>> com(0);
void PrintGraph() {
cout << " :\n";
if (gr.size() == 0) cout << " \n";
... | ALGO | 0.999253 | 4.567679 |
e8bc7a94-e81e-460f-bf91-276c1f30cabc | blackberry/OpenCV | modules/gpu/src/warp.cpp | #include "precomp.hpp"
#ifndef HAVE_CUDA
void cv::gpu::warpAffine(const GpuMat&, GpuMat&, const Mat&, Size, int, int, Scalar, Stream&) { throw_nogpu(); }
void cv::gpu::buildWarpAffineMaps(const Mat&, bool, Size, GpuMat&, GpuMat&, Stream&) { throw_nogpu(); }
void cv::gpu::warpPerspective(const GpuMat&, GpuMat&, const... | TOOL | 0.975264 | 7.432451 |
39def8c7-b1b1-47de-88de-0cd6cf6fbc51 | mridul-sehgal/cpp_dsa | Learning/linked list/mergeTwoLinkedList.cpp | // Node<int>* solve(Node<int>* first, Node<int>* second)
// {
// // if only 1 element exists
// if(first->next==NULL)
// {
// first->next=second;
// return first;
// }
// Node<int>*curr1=first;
// Node<int>*next1=curr1->next;
// Node<int>*curr2=second;
// Node<int>*next2=curr2->n... | ALGO | 0.999859 | 3.478719 |
0539461d-e95e-43be-b2ac-82d82d023c48 | DerpFest-Ten/platform_frameworks_native | services/surfaceflinger/Scheduler/SchedulerUtils.cpp | #include "SchedulerUtils.h"
#include <cinttypes>
#include <numeric>
#include <unordered_map>
#include <vector>
namespace android {
namespace scheduler {
int64_t calculate_median(std::vector<int64_t>* v) {
if (!v || v->empty()) {
return 0;
}
size_t n = v->size() / 2;
nth_element(v->begin(), v... | ALGO | 0.996003 | 7.072289 |
fa9476a8-aab1-48f2-8cc2-e43acf3c24c4 | MdMehediHasan22/c-WithDSA | divisble.cpp | #include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
if(n%2==0 && n%3==0){
cout<<"Divisible by both"<<endl;
}
else if(n%2==0){
cout<<"Divisble by only 2"<<endl;
}
else if(n%3==0){
cout<<"Divisble by only 3"<<endl;
}
else{
cout<<"Divisb... | ALGO | 0.999871 | 4.288979 |
0ea57451-49d8-46e6-8d9b-8f91ce5432e4 | rdimas-ut/numerical-methods | HW7/newtonDD.cpp | #include <vector>
using namespace std;
#define TEST
double newtonEval(double t, const vector<double>& coefs, const vector<double>& x) {
int n = coefs.size();
double value = coefs[n-1];
for(int i=n-2; i>=0; i--) {
value = value * (t - x[i]) + coefs[i];
}
return value;
}
// Set up divided difference coef... | ALGO | 0.99943 | 3.904885 |
236b9ef9-1255-41d4-ab40-e684e8a336c7 | ShaliniSJ/50-days-challenge | 0207-course-schedule/0207-course-schedule.cpp | class Solution {
public:
bool dfs(int curr,unordered_map<int,vector<int>>& adj, vector<bool>& vis, vector<bool>& path){
path[curr] = true;
vis[curr] = true;
for(auto nei:adj[curr]){
if(!vis[nei]){
if(dfs(nei,adj,vis,path))return true;
}
// ... | ALGO | 0.999977 | 6.07279 |
9fc01a24-6839-4622-8333-bb3cb4592fa4 | baudm/project-euler | 001.cpp | #include <iostream>
int main(void)
{
int i, sum = 0;
for (i = 3; i < 1000; i++) {
if (i % 3 == 0 || i % 5 == 0)
sum += i;
}
std::cout << sum << std::endl;
return 0;
}
| ALGO | 0.999528 | 4.373444 |
591b07d2-6b42-4a84-aba0-12e8eeb59541 | JITENDRA-DUBEY/DSA-PROGRAMS | 12.Stack/q1stcackimplemantionwitharray.cpp | // jsg stack impletation by using array;
#include<iostream>
#include<stdlib.h>
using namespace std;
struct Stack
{
int Size;
int Top;
int *S;
};
void Create(Stack*st)
{
cout<<"\nEnter the size of stack";
cin>>st->Size;
st->Top=-1;
st->S=new int[st->Size-1];
}
void Push(Stack*st,int x)
{
... | ALGO | 0.999346 | 3.620403 |
34c1695a-57e7-4abb-a526-51ee58934ced | prabhatravi/cplusplusprogramming_practice | pq_with_array.cpp | #include <iostream>
#include <queue>
using namespace std;
int main() {
int arr[] = {10, 5, 15};
priority_queue<int> pq(arr, arr+3);
while(pq.empty() == false) {
cout << pq.top() << " ";
pq.pop();
}
} | ALGO | 0.999113 | 3.954812 |
fda2268e-10bc-478e-90d8-e67607ee00db | Devil-DevR/Codeforces | A_Circle_Line.cpp | #include <bits/stdc++.h>
using namespace std;
void fastIO() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
}
void solve() {
int n;
cin>>n;
vector<int> arr(n);
for(int i=0;i<n;i++)cin>>arr[i];
int x,y;
cin>>x>>y;
x--,y--;
int sum = accumulate(arr.begin(), arr.end(), 0);
... | ALGO | 0.99996 | 4.748936 |
967528e9-77d2-4180-9190-b1599576d5c4 | simonepri/competitive-programming | UVA/11586/11586.cpp | /**
* Competitive Programming - Collection of solved problems.
*
* @author Simone Primarosa,(http://simoneprimarosa.com)
* @link (https://github.com/simonepri/competitive-programming)
* @license MIT License (https://opensource.org/licenses/MIT)
*/
#include <iostream>
//#include <string>
//... | ALGO | 0.999855 | 4.386695 |
f8ace65f-8422-4917-823d-149b7b2a1d32 | chenming-wu/robust-plane-cut | src/GeometryTools.cpp | #include "GeometryTools.h"
#include <CGAL/convex_hull_2.h>
Geotools::Geotools() {
}
Point3 Geotools::point_to_3d(const Point2& p, Plane& pl) {
Vector3 basis[2];
auto pop = pl.point();
const Vector3 vpop(pop.x(), pop.y(), pop.z());
basis[0] = pl.base1() / CGAL::sqrt(pl.base1().squared_length());
basis[1] = pl.bas... | ALGO | 0.997111 | 4.518281 |
fc2483f0-d531-41c3-b87b-015c53399008 | IlluMinati-Github/DSA | 414-third-maximum-number/third-maximum-number.cpp | class Solution {
public:
int thirdMax(vector<int>& nums) {
long first = LONG_MIN, second = LONG_MIN, third = LONG_MIN;
for (int i = 0; i < nums.size(); i++) {
long num = nums[i];
// skip duplicates
if (num == first || num == second || num == third) continue;
... | ALGO | 0.999985 | 5.725637 |
4bb2ad4b-bf91-443d-8c19-5e411953bd04 | duartecancela/heatequation | farao.cpp | #include <iostream>
#include <omp.h>
#include <cmath>
#include "farao.h"
int main (int argc, char *argv[]) {
std::cout << "farao" << std::endl;
int N = 8;
double b = 1.0;
double a = 0.0;
double area = soma_integral(f, a, b, N);
std::cout << "area = " << area << std::endl;
// Inicia a sim... | ALGO | 0.999737 | 4.021681 |
a03d2f4e-9c7d-4f1f-8cfb-f78d43b29372 | Hasini-456/SOC25 | week1/4h_p.cpp | class Solution {
public:
vector<vector<int>> fourSum(vector<int>& nums, int target) {
std::sort(nums.begin(), nums.end());
std::vector<std::vector<int>> foursums;
int n = nums.size();
int x, left, right;
int long long sum;
for(int i=0; ... | ALGO | 0.999985 | 5.953589 |
23e9854c-056d-4b3c-a0ca-c666fccf7e7f | HMByteSensei/Algorithms-and-Data-Structures | GraphImplementation/main.cpp | #include "GranaIterator.h"
#include "MatricaGraf.h"
#include "DFS.h"
#include "BFS.h"
#include "UsmjereniGraf.h"
#include "Grana.h"
#include "Cvor.h"
using namespace std;
int main() {
UsmjereniGraf<std::string> *g = new MatricaGraf<std::string>(4);
g->dodajGranu(0, 1, 2.5);
g->dodajGranu(1, 2, 1.2);
g... | ALGO | 0.961203 | 3.8223 |
6e0e0405-6790-46c6-a472-08ab6057297f | khurom/KKToolBox | Routines2Sort/toolbox_wavelets/toolbox_wavelets/mex/perform_79_transform.cpp | #include "mex.h"
#include "config.h"
#include <stdio.h>
#include <string.h>
#include <vector>
#include <algorithm>
#include "perform_79_transform.h"
/* Global variables */
int n, p; // size
int dir = 1;
int Jmin = 0;
double* y = NULL;
double* x = NULL;
void mexFunction( int nlhs, mxArray *plhs[],
... | ALGO | 0.999705 | 5.670344 |
d5dd3694-20e2-4aa3-b2cc-d38c75744566 | sonu-kumar9113/DSA_Sheet | Week1_assignment/Binary to decimal.cpp | //gfg
//Given a Binary Number b, find its decimal equivalent.
//Examples:
//Input: b = 10001000
//Output: 136
//Input: b = 101100
//Output: 44
//code
class Solution {
public:
int binaryToDecimal(string &b) {
// Code here.
int i = b.size()-1;
int decimal_no = 0;
... | ALGO | 0.999409 | 5.959435 |
1365266a-5e50-4029-8219-9bee1f7b6331 | BaoZhuhan/Awesome-SE-Box | 01程序设计基础与实验/PintiaExperiment/experiment3/计算油费.cpp | #include <stdio.h>
int main(void){
//setting and input
double a,b,sum;
char c;
scanf("%lf %lf %c",&a,&b,&c);
//calculate
if(b==90) sum = 6.95*a;
else if(b==93) sum =7.44*a;
else sum =7.93*a;
if(c=='e') sum*=0.97;
else sum*=0.95;
//output
printf("%.2lf",sum);
retur... | ALGO | 0.999171 | 3.358029 |
f9774010-5b09-41c7-b399-46700dfb9d3a | utkarshghorpade/LB | program180.cpp | #include<iostream>
using namespace std;
int CountCapital(char str[])
{
int iCnt = 0;
while(*str != '\0')
{
if(*str == ' ')
{
iCnt++;
}
str++;
}
return iCnt;
}
int main()
{
char Arr[20];
int iRet = 0;
cout<<"Enter string"<<endl;
cin.getl... | ALGO | 0.997754 | 3.701246 |
c4e1d370-bf0f-4284-8889-b5a37019a973 | Armour/LeetCode | 151.reverse_words_in_string/reverse_words_in_string.cpp | class Solution {
public:
void reverseRange(string &s, int st, int ed) {
for (int i = st, j = ed ; i < j; i++ , j--) {
swap(s[i], s[j]);
}
}
void reverseWords(string &s) {
if (s.compare("") == 0) return;
size_t trimSt = s.find_first_not_of(' ');
if (trimS... | ALGO | 0.999956 | 6.094701 |
b1ed0b81-c9dd-4976-9c57-8d2677fd9a36 | zxyDEDIRE/ACM_CODE | CodeForces/Hello 2023/BB.cpp | /*
嵌套变量重复
特殊样例 0 1 2 n
数组越界
开long long
*/
#include<bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long
using ull=unsigned long long;
using ll=long long;
using pii=pair<int,int>;
const int dx[]={0,0,1,-1,1,-1,1,-1};
const int dy[]={1,-1,0,0,1,-1,-1,1};
const int mod=998244353;
const int inf=0... | ALGO | 0.999815 | 3.463075 |
cefb9484-0a32-45d5-96e9-1fbf2c591e9c | zbqq/neus2 | dependencies/eigen/doc/examples/Tutorial_BlockOperations_colrow.cpp | #include <Eigen/Dense>
#include <iostream>
using namespace std;
int main()
{
Eigen::MatrixXf m(3,3);
m << 1,2,3,
4,5,6,
7,8,9;
cout << "Here is the matrix m:" << endl << m << endl;
cout << "2nd Row: " << m.row(1) << endl;
m.col(2) += 3 * m.col(0);
cout << "After adding 3 times the first colu... | ALGO | 0.995899 | 3.576145 |
d4b42c43-eec4-463c-8aed-3d411492d07f | Madhu-Biradakota/Mutation-Testing-using-DeepState | Final_SM_2/StringManipulator.mutant.593.cpp | #include "StringManipulator.h"
#include <algorithm>
#include <cctype>
#include <sstream>
#include <iterator>
#include <map>
#include <stdexcept>
#include <locale>
#include <regex>
#include <numeric>
std::string StringManipulator::reverse(const std::string& str) {
std::string reversed = str;
std::reverse(revers... | TOOL | 0.886685 | 6.446162 |
3fe56234-d56a-417f-a2a2-2e588a046ef9 | chingchen/Algorithm | Search Insert Position.cpp | /*
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.
You may assume no duplicates in the array.
Here are few examples.
[1,3,5,6], 5 → 2
[1,3,5,6], 2 → 1
[1,3,5,6], 7 → 4
[1,3,5,6], 0 → 0
*/
class Solution {
publi... | ALGO | 0.999975 | 6.218134 |
0a7946c0-f932-4dd7-a051-7dcf26c43eca | slicecoincore/slice | src/key.cpp | #include <key.h>
#include <crypto/common.h>
#include <crypto/hmac_sha512.h>
#include <random.h>
#include <secp256k1.h>
#include <secp256k1_recovery.h>
static secp256k1_context* secp256k1_context_sign = nullptr;
/** These functions are taken from the libsecp256k1 distribution and are very ugly. */
/**
* This parse... | TOOL | 0.884961 | 7.276573 |
fac09399-e978-411a-8c20-8ad625a9bd6c | HEETVICHHIVORA/ds-love-bbabr | tree/class3.cpp | #include <iostream>
#include <queue>
#include<map>
using namespace std;
class Node
{
public:
int data;
Node *left;
Node *right;
Node(int val)
{
this->data = val;
this->left = NULL;
this->right = NULL;
}
};
Node *create()
{
int data;
cin >> data;
if (data == -... | ALGO | 0.999961 | 4.527939 |
584ac4eb-2767-4ab2-b54f-0699ee20bf44 | ouchang/Cpp-Algorithms | CountLCS/main.cpp | #include <iostream>
#include <stdio.h>
#include <string>
#include <algorithm>
using namespace std;
//Program wyznacza długość LCS'a oraz liczbę możliwych LCS'ów (dany LCS jeżeli wygląda tak samo jak inny, ale jest stworzony za pomocą "innych" literek, także jest zliczany)
int T[100][100];
int D[100][100];
int main()... | ALGO | 0.999895 | 4.294802 |
ab35f62d-dcdd-47ba-8a31-2264aca28706 | SHIVAM-VASHISTH/cpp_projects | RationalNumberPractice.cpp | #include<iostream>
using namespace std;
class Rational {
private:
int p;
int q;
public:
Rational() {
this->p = 1;
this->q = 1;
}
Rational(int p, int q) {
this->p = p;
this->q = q;
}
Rational(Rational ... | TOOL | 0.98641 | 5.316299 |
527ce765-d650-4f90-9915-bf65448a32f9 | OldKingAllant/psx | thirdparty/quill/test/misc/TestUtilities.cpp | #include "TestUtilities.h"
#include <algorithm>
#include <chrono>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <random>
#include <sstream>
#include <string>
#include <system_error>
#include <utility>
#include <vector>
namespace quill
{
namespace testing
{
// Convert the given... | TEST | 0.91256 | 7.090004 |
6d027ba7-c13a-4676-987a-980f8d0feb18 | S1gn/leetcode | hot100/test108.cpp | #include <iostream>
#include <vector>
using namespace std;
struct TreeNode {
int val;
TreeNode *right;
TreeNode *left;
TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}
};
class Solution {
public:... | ALGO | 0.999981 | 6.423608 |
383494b9-3958-4e7f-b404-cc0e56e27322 | sinhnguyen-sunny/nd013-c6-control-starter-submission | project/pid_controller/eigen-3.3.7/test/denseLM.cpp | #include <iostream>
#include <fstream>
#include <iomanip>
#include "main.h"
#include <Eigen/LevenbergMarquardt>
using namespace std;
using namespace Eigen;
template<typename Scalar>
struct DenseLM : DenseFunctor<Scalar>
{
typedef DenseFunctor<Scalar> Base;
typedef typename Base::JacobianType JacobianType;
typed... | TEST | 0.988948 | 5.862647 |
9c0e0684-de9f-42fe-81a6-1c297e64c6a9 | yinchunlong/abelkhan-1 | ext/c++/thirdpart/c++/boost/libs/math/example/bernoulli_example.cpp | #pragma warning (disable : 4100) // unreferenced formal parameter.
#pragma warning (disable : 4127) // conditional expression is constant.
//#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
#include <boost/multiprecision/cpp_dec_float.hpp>
#include <boost/math/special_functions/bernoulli.hpp>
#include <iostream... | ALGO | 0.994323 | 5.107186 |
8ceab453-1948-40bf-adf2-7cc1870d4e9a | sarvex/leetcode-clojure | solution/1200-1299/1267.Count Servers that Communicate/Solution.cpp | class Solution {
public:
int countServers(vector<vector<int>>& grid) {
int m = grid.size(), n = grid[0].size();
vector<int> row(m), col(n);
for (int i = 0; i < m; ++i) {
for (int j = 0; j < n; ++j) {
if (grid[i][j]) {
++row[i];
... | ALGO | 0.999954 | 6.839762 |
eda07a10-299b-4bf4-a33f-d14dbfedc2d3 | JJayU/PSiO | Lab 2/PSiO Lab2/PSiO Lab2/Z10.cpp | #include <iostream>
#include <vector>
#include <math.h>
std::vector<double> get_poly(size_t elements_count)
{
std::vector<double> temp_vec;
for (size_t i = 0; i < elements_count; i++)
{
temp_vec.push_back(0);
std::cout << "Podaj element " << i + 1 << ": ";
std::cin >> temp_vec[i];
}
return temp_vec;
}
do... | ALGO | 0.999903 | 4.262027 |
903aa784-1c31-4059-a94a-c852db3a09f6 | epicyclism/aoc2016 | aoc21/aoc21.cpp | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <ranges>
#include <fmt/format.h>
#include "ctre_inc.h"
#include "timer.h"
enum class act { swap_pos, swap_letter, rotate_left, rotate_right,
rotate_pos, reverse, move };
struct action
{
act act_;
uint8_t ... | ALGO | 0.999514 | 6.001022 |
e88a0832-f9d2-47a8-b28f-34c2f84417d5 | gupta671/ECE565FP | src/systemc/tests/systemc/misc/v1.0/dash2/dist.cpp | /*****************************************************************************
dist.cpp -- Implementation of the odometers.
Original Author: Ali Dasdan, Synopsys, Inc.
*****************************************************************************/
/************************************************************... | ALGO | 0.986108 | 6.317926 |
478b1e94-33d0-4d4b-8476-a008c02d5a61 | alittlekitten/AlgorithmStack | Baekjoon/Cpp/Arithmetic/B5_25304_영수증.cpp | #include <iostream>
#include <string>
using namespace std;
int main(void) {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
// 25304 영수증
// 수학
int x, n, input1, input2;
int sum = 0;
cin >> x >> n;
for (int i = 0; i < n; ++i) {
cin >> input1 >> input2;
... | ALGO | 0.999817 | 3.967121 |
d93d4b69-4ef6-4591-b7bc-bd4686693740 | raincross7/code-similarity | codes/train_code/problem355/problem355_290.cpp | #include <bits/stdc++.h>
using namespace std;
int main(){
int N;
cin >> N;
string s;
cin >> s;
string t = "";
for (int i = 0; i < 2; i++){
for (int j = 0; j < 2; j++){
string tmp;
if (i == 0){
tmp += 'S';
} else {
tmp += 'W';
}
if (j == 0){
tmp += 'S... | ALGO | 0.999953 | 3.816472 |
0f256547-b3c2-4c54-94e2-81a438a0ec19 | SharifdotG/SharifdotG-s-CodeVault | Beecrowd/1 - Beginner/1435 - 1985/1534 - Array 123/1534_Array123.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int arraySize;
while (cin >> arraySize) {
int matrix[arraySize][arraySize];
for (int i = 0; i < arraySize; i++) {
matrix[i][i] = 1;
matrix[i][arraySize - i - 1] = 2;
for (int j = 0; j < arraySize;... | ALGO | 0.999732 | 3.760069 |
f7888590-5a72-4766-8d2b-a377bf1c0ada | Ageorge017/compsci121 | Assignment 5/Assignment 6/isPrime Function/isPrime Function/main.cpp | //
// main.cpp
// isPrime Function
// Albert George
// November 21, 2016
// The program compiled and ran successfully on MacOSX El Capitan, Xcode.
// This program asks the user to input an integer and it will determine if the number is prime or not.
#include <iostream>
using namespace std;
bool Prime(int NUM);
... | ALGO | 0.998283 | 4.939986 |
55fb3595-7212-42d3-ad7d-5b27e16376ce | jeannetoh99/cp | kattis/pivot.cpp | #include <bits/stdc++.h>
#define ll long long
#define ii pair<int, int>
#define iii tuple<int, int, int>
using namespace std;
int main() {
int n; cin >> n;
int arr[n];
int prefixmax[n];
int postfixmin[n];
for (int i = 0; i < n; i++) {
int x; cin >> x;
arr[i] = x;
if (i == ... | ALGO | 0.999933 | 4.475262 |
427ce906-4417-4ad6-b819-5f27ae9cc173 | agrawal-ris/competitive | Codeforces/Codeforces - 461A.cpp | #include <bits/stdc++.h>
using namespace std;
int main () {
long long int n, sum = 0,total = 0;
vector <int> a;
cin>>n;
int z;
for (int i=0;i<n;i++)
{
cin>>z;
a.push_back(z);
sum+=a[i];
}
sort(a.begin(),a.end());
total += sum;
for (int i = 0;i<n;i++)
{
sum -= a[i];
total += sum + a[i];
}
... | ALGO | 0.999896 | 3.76225 |
c117a248-c9d0-4219-8f6b-0d6005261fad | dinhphanh2005/marisaoj | Level_0/Squarenumber.cpp | #include <iostream>
#include <cmath>
using namespace std;
int main() {
long int a;
cin >> a;
long double s = sqrt(a);
if (s == (long int)s) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
return 0;
} | ALGO | 0.999679 | 4.084722 |
ee34a08c-bb09-4848-8af1-2505637e9c0b | Marya45/CP31sheet | Rated900/1883B.cpp | #include<bits/stdc++.h>
using namespace std;
void solve(){
int n,k;
cin>>n>>k;
string s;
cin>>s;
vector<int> v(26,0);
for(auto it:s){
v[it-'a']++;
}
int tmp = n-k;
if(tmp<2){
cout<<"YES"<<endl;
return;
}
if(tmp%2==0){
int cnt=0;
for(au... | ALGO | 0.999976 | 4.29486 |
e2ddb953-0db1-43ea-b5e5-1fa469d1840f | shahrinaSabrin/uva | uva.11777.cpp | #include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int t;
scanf("%d", &t);
int p=0;
while(t--)
{
p++;
int term1, term2, final, attendance,classTest[3];;
cin>>term1>>term2>>final>>attendance;
for(int i=0;i<3;i++)
{
cin>>cla... | ALGO | 0.997672 | 3.778381 |
91ee0aec-d20b-4253-a616-6194ca2bc151 | oiquetoi199/1000BaiTapVSCode | C348-C363.cpp | #include "nhapxuat.h"
#include <cmath>
void nhapTuDong(int a[][MAX], int row, int col)
{
int dem = 9;
for (int i = 0; i < row; i++)
{
for (int j = 0; j < col; j++)
{
a[i][j] = dem--;
}
}
}
// 348
void kiemTraDuong(int a[][MAX], int row, int col)
{
... | ALGO | 0.993164 | 3.156013 |
6ff176c6-3ca0-48fb-b841-236e4ece3bfe | manikanta2901/ubuntu | .history/imp/cpp/Algorithm/DynamicPrograming/LengthOfLongestCommonSubsequence_20210117132732.cpp | #include<bits/stdc++.h>
using namespace std;
int LengthCIS(string a,string b){
int LIS[a.size() + 1][b.size() + 1];
for(int i = 0; i < size; i++){
for(int j = 0; j < size; j++){
if(i == 0 || j == 0){
LIS[i][j] = 0;
}else if(a[a.size() - 1] == b[b.size()]){
... | ALGO | 0.999938 | 3.630653 |
c4e34397-f696-4af2-a6ed-22e008ce8fe2 | setnemo/cpp-sandbox | coursera/cpp-yellow-belt/week04/10_FindStarts/FindStartsWithStr.cpp | #include <string>
#include <vector>
#include <algorithm>
using namespace std;
template <typename RandomIt>
pair<RandomIt, RandomIt> FindStartsWith(
RandomIt range_begin, RandomIt range_end,
const string& prefix) {
return equal_range(
range_begin,
range_end,
prefix,
[&prefix](const s... | ALGO | 0.998369 | 5.739479 |
2c372404-d1eb-4e58-8832-beadf8e3457d | cxjwin/algorithms | LeetCode-CPP/offer.30/solution.cpp | //
// Created by smart on 2020/10/17.
//
#include <stack>
using namespace std;
class MinStack {
stack<int> _st;
stack<int> _min;
public:
/** initialize your data structure here. */
MinStack() {
//
}
void push(int x) {
_st.push(x);
if (_min.empty()) {
_min.p... | ALGO | 0.999889 | 6.631359 |
b7bb2cb5-c0bd-4a12-b4d4-9f8844b56496 | lxiao217/study428 | 深度学习/源码/OpenCV/opencv/3rdparty/carotene/src/phase.cpp | #include <cfloat>
#include <cmath>
#include "common.hpp"
namespace CAROTENE_NS {
#ifdef CAROTENE_NEON
namespace {
#define FASTATAN2CONST(scale) \
f32 P1((f32)( 0.9997878412794807 * (180.0 / M_PI) * scale)), \
P3((f32)(-0.3258083974640975 * (180.0 / M_PI) * scale)), \
P5((f32)( 0.155578651... | ALGO | 0.99894 | 5.899369 |
d83f0d11-e89b-44da-b50a-57b06cb94b66 | signalkinetics/vab | txrx/src/libeigen/doc/examples/TemplateKeyword_simple.cpp | #include <Eigen/Dense>
#include <iostream>
using namespace Eigen;
void copyUpperTriangularPart(MatrixXf& dst, const MatrixXf& src)
{
dst.triangularView<Upper>() = src.triangularView<Upper>();
}
int main()
{
MatrixXf m1 = MatrixXf::Ones(4,4);
MatrixXf m2 = MatrixXf::Random(4,4);
std::cout << "m2 before copy:"... | TOOL | 0.989896 | 5.210898 |
1a11fe09-ff5d-4646-8a75-915ec87839d5 | shadsakib/Algorithm-Implementations | strongly connected components.cpp | /*
@author: Shadman Sakib
Ahsanullah University of Science And Technology
*/
#include<iostream>
#include<vector>
#include<stack>
using namespace std;
int WHITE=1, GREY=2, BLACK=3, color[100];
vector<int> adj[100], reverseAdj[100], components[100], t;
stack<int> s;
void dfs(int u)
{
color[u] = GREY;
for(vect... | ALGO | 0.999976 | 5.090473 |
6fe3648b-a26e-4c83-b30d-59fefff4d665 | HyungJuu/basic-cpp-2024 | 복습용/Project1/Project1/01_1_문제4.cpp | /* 문제4
판매원들의 급여 계산 프로그램을 작성해보자. 이회사는 모든 판매원에게 매달 50만원의
기본 급여와 물품 판매가격의 12%에 해당하는 돈을 지급한다. 예를 들어서 민수라는 친구의
이번 달 물품 판매 금액이 100만원이라면, 50 + 100 * 0.12 = 62, 따라서 62만원을 급여로
지급받는다.
단, 아래의 실행 예에서 보이듯이 이러한 급여의 계산은 -1이 입력될 때까지 계속되어야 한다.
판매 금액을 만원 단위로 입력(-1 to end) : 100
이번 달 급여 : 62만원
판매 금액을 만원 단위로 입력(-1 to end) : 200
이번 달 급여 :... | TOOL | 0.94659 | 4.448203 |
62656118-f26a-469f-9dfa-3f64f845dc98 | sarafanshul/Codes | OJs/454B.cpp | #pragma GCC optimize("Ofast") // remove in mingw32 bit ;
#pragma GCC target("avx,avx2,fma")
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#define ALL(x) x.begin(),x.end()
#define PB push_back
#define EB emplace_back
#define F first
#define S second
#define l... | ALGO | 0.999793 | 3.929384 |
765b9ad6-7a5b-4435-b71f-00b18da97de8 | debugger592/Coding_Problems | Spoj/BRidge.cpp | #include<iostream>
#include<map>
#include<cstdio>
#define readint(n) scanf("%lld",&n)
#include<algorithm>
#define int long long
using namespace std;
int a[2005];
int b[2005];
int lis[2005];
map<int,int> myMap;
int LIS(int arr[], int n )
{
int i,j,max=0;
for ( i = 0; i < n; i++ )
lis[i] = 1;
for ( i = 1; i... | ALGO | 0.999819 | 3.36391 |
2010625f-4437-4588-9d61-045b526e639a | jackyf/cupt | cpp/lib/src/internal/indexofindex.cpp | // for stat
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <cupt/file.hpp>
#include <internal/filesystem.hpp>
#include <internal/tagparser.hpp>
#include <internal/indexofindex.hpp>
namespace cupt {
namespace internal {
namespace ioi {
namespace {
time_t getModifyTime(const string& path)... | TOOL | 0.900766 | 5.566201 |
92e5a207-db45-436c-834a-42d32ec9fe81 | Franklynjsb/AEEDD | Ejercicios/2. OmegaUp/RepartiendoCachorros.cpp | #include <iostream>
using namespace std;
int main() {
int totalCachorros, cachorrosPancho, hijos;
cin >> totalCachorros >> cachorrosPancho >> hijos;
int cachorrosParaRepartir = totalCachorros - cachorrosPancho;
int cachorrosParaPancho = cachorrosPancho + cachorrosParaRepartir % (hijos + 1);
cout << cachorrosP... | ALGO | 0.99979 | 3.610078 |
9fd05146-a53a-4279-ba35-76f0884bef57 | alexch82/stepik | cpp/task1.4-4.cpp | #include <iostream>
int main() {
int a, b, c;
std::cin >> a >> b >> c;
if ( (a + b) > c && (a + c) > b && (b + c) > a ) std::cout << "YES";
else std::cout << "NO";
return 0;
}
| ALGO | 0.999921 | 4.399687 |
ee1fe06c-0d3b-4d65-9c4b-d730ae5c1bd2 | ShivamGarg30304/LeetCodeSolution | 3_LongestSubstringWithoutRepeatingCharacters.cpp | class Solution {
public:
int lengthOfLongestSubstring(string s) {
if (s == "") return 0;
int ans = 1;
int i = 0, j = 0;
unordered_map<char, int> mp;
while (j < s.size()) {
if (mp.find(s[j]) != mp.end()) {
if (mp[s[j]] >= i) {
i ... | ALGO | 0.999742 | 6.220621 |
3b5fb411-48ed-41c2-afe9-7b3340df1088 | Ripsad/Spaklak | C++/1/3.cpp | #include <iostream>
using namespace std;
int main(){
double a, b;
char c;
cin >> a >> c >> b;
if (c == '+'){
cout << a + b;
}
if (c == '-'){
cout << a - b;
}
if (c == '*'){
cout << a * b;
}
if (c == '/'){
cout << a / b;
}
return 0;
} | ALGO | 0.998485 | 3.761196 |
c7a82820-fe8e-4d18-8c41-3c3672ee0a69 | Alex4386-vault/foss-crossover | llvm/tools/llvm-xray/xray-account.cpp | #include <algorithm>
#include <cassert>
#include <numeric>
#include <system_error>
#include <utility>
#include "xray-account.h"
#include "xray-registry.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/XRay/InstrumentationMap.h"
#include "llvm/XRay/Trace.h"
using names... | TOOL | 0.911645 | 5.186436 |
1988dee1-496c-4b68-bf60-28de343be1e8 | AtelierNeon/an-boost-gsm | libs/graph/example/bfs.cpp | #include <boost/config.hpp>
#include <algorithm>
#include <vector>
#include <utility>
#include <iostream>
#include <boost/graph/visitors.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/breadth_first_search.hpp>
#include <boost/property_map/property_map.hpp>
#include <boost/graph/graph_utility.hpp... | ALGO | 0.999602 | 6.485667 |
f138ea68-faf8-41c8-97ac-720ec5fb4743 | SpinWaveGenie/SpinWaveGenie | libSpinWaveGenie/src/Plot/TwoDGaussian.cpp | //
// TwoDGaussian.cpp
// spin_wave_genie
//
// Created by Hahn, Steven E. on 6/23/14.
//
//
#include "SpinWaveGenie/Plot/TwoDGaussian.h"
#include <algorithm>
#include <cmath>
using namespace std;
namespace SpinWaveGenie
{
void TwoDGaussian::setResolution(double aIn, double bIn, double cIn)
{
a = aIn;
b = bIn... | ALGO | 0.989505 | 6.172931 |
af332ae6-95c1-4a5d-86e9-254bc56f798a | ryanchyshyn/path_planning | src/Eigen-3.3/doc/examples/Tutorial_PartialLU_solve.cpp | #include <Eigen/Core>
#include <Eigen/LU>
#include <iostream>
using namespace std;
using namespace Eigen;
int main()
{
Matrix3f A;
Vector3f b;
A << 1,2,3, 4,5,6, 7,8,10;
b << 3, 3, 4;
cout << "Here is the matrix A:" << endl << A << endl;
cout << "Here is the vector b:" << endl << b << endl;
Vec... | ALGO | 0.999759 | 3.142099 |
a728487f-89ce-4c73-9986-c5581c90ef3e | SpectraL519/LO_XIV | Klasa2/Lista23_mosty_w_grafie_prostym/mosty_w_grafie_prostym.cpp | #include <bits/stdc++.h>
using namespace std;
#define INF 100001
vector <int> G[INF];
vector <int> low, dad, nr;
vector <bool> vis;
priority_queue < pair <int,int> > Ans;
int t, n, m;
void INIT ()
{
int a, b;
cin >> n >> m;
low.resize(n+1,INF);
nr.resize(n+1);
dad.resize(n+1);
vis.resize(n+1)... | ALGO | 0.999987 | 4.365118 |
0f2caf1c-1b66-4d53-8375-71f9073d94bd | Mellow-Sky/code | Clion_code/240903.cpp | //
// Created by mellow on 2024/9/3.
//
//#include<iostream>
//using namespace std;
//int main(){
// int n, t, a;
// cin >> n >> t >> a;
// n = (n + 1) >> 1;
// if(t >= n || a >= n) {
// cout << "Yes";
// }else {
// cout << "No";
// }
// return 0;
//}
#include<iostream>
#include<stri... | ALGO | 0.999148 | 3.555879 |
96d7a849-b462-4f16-87cc-6191314c1047 | hjimce/android-image | app/src/main/cpp/opencv-3.2.0/3rdparty/carotene/src/sobel.cpp | #include <vector>
#include "common.hpp"
namespace CAROTENE_NS {
bool isSobel3x3Supported(const Size2D &size, BORDER_MODE border,
s32 dx, s32 dy, Margin borderMargin)
{
return dx < 3 && dx >= 0 &&
dy < 3 && dy >= 0 &&
(dx + dy) > 0 &&
isSeparableFilter3x3S... | ALGO | 0.990467 | 6.422129 |
24d80f1a-ce6a-4ab9-a686-1f92d75f08e2 | Priyansh6/mdp-loop-cloning | llvm/llvm/lib/CodeGen/ReachingDefAnalysis.cpp | #include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SetOperations.h"
#include "llvm/CodeGen/LivePhysRegs.h"
#include "llvm/CodeGen/ReachingDefAnalysis.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/Support/Debug.h"
using namespace llvm;
#define DEBUG_TYPE "r... | ALGO | 0.998386 | 7.800048 |
0629a3d8-fc0c-4299-a762-b3008e856cd8 | dn54321/Programming-Challenges | 732A - Buy a Shovel.cpp | // https://codeforces.com/problemset/problem/732/A
// SOLUTION BY DN54321
#include <iostream>
#include <string.h>
#include <ctype.h>
#include <vector>
#include <functional>
#include <algorithm>
#include <map>
#include <utility>
#define p1 first
#define p2 second
#define pii pair<int,int>
#define MXINT (1<<30)
typede... | ALGO | 0.998774 | 3.348469 |
c7bbb8e1-7814-4c6c-94e9-bcb027e6f117 | kutaytire/CS-202-Assignments | Homework 3/Request.cpp | /*
* Title: Heaps, Priority Queues
* Author: Kutay Tire
* ID: 22001787
* Section: 3
* Assignment: 3
* Description: Request implemetation file
*/
#include "Request.h"
#include <iostream>
using namespace std;
Request:: Request(int reqid, int reqpri, int reqsend, int reqpro) {
id = reqid;
priority =... | TOOL | 0.857287 | 4.140947 |
e662e065-8ac9-4d31-907e-886f4e4895a9 | Jperez65/Sequoia-Tree | sequoia.cpp | #include "sequoia.h"
//Returns a pointer to the first node in this subtree containing x
//Returns null pointer if it can't find x
SequoiaNode* SequoiaNode::search(int x)
{
if (x == value)
return this;
else if (x < value && left != nullptr)
return left->search(x);
else if (x > value && right != nullptr)
... | ALGO | 0.998709 | 5.327868 |
709a5ad4-b0ed-47fd-9f70-94605f1a73ce | FunctionLab/sleipnir | tools/Orthologer/Orthologer.cpp | #include "stdafx.h"
#include "cmdline.h"
static const size_t c_iConfirmation = 512;
static const char c_szOrthologized[] = "_ortho.dab";
int main(int iArgs, char **aszArgs) {
gengetopt_args_info sArgs;
COrthology Orthology;
ifstream ifsm;
size_t i, j, iOrganism, iCluster, iOne, iTwo, iOrgOne, iIndexOn... | TOOL | 0.956651 | 5.279267 |
ec8c74a9-753b-4357-95de-0f1138bbe688 | ParkHaeChan/DataStructureAndAlgorithmCPP | CodeGround/SCPC7/pre1/Q2_binarynum.cpp |
#include <iostream>
#include <vector>
#include <string>
using namespace std;
void print_vect(vector<bool>& vect, string& ret)
{
for(int i=1; i<vect.size(); ++i)
ret += to_string(vect[i]);
}
bool InRange(int val, int minv, int maxv)
{
if(val >= minv && val <= maxv)
return true;
retur... | ALGO | 0.999812 | 3.822435 |
636fe4aa-9347-4186-a2a8-ae17d65e66a7 | swetanjal/Competitive-Programming | Codeforces/Upsolved Problems/Present.cpp | // Codeforces Round #626 (Div. 1, based on Moscow Open Olympiad in Informatics)
// 1322 B
/*
Some pointers to the solution. Tags I feel are relevant: Sorting, binary-search, bitmasks
-> Construct the solution bit by bit
-> Suppose we are interested in finding out whether $k^{th}$ bit is set or not in the solution.
-> W... | ALGO | 0.999977 | 4.491048 |
ffae20bc-2b98-41d4-b8c5-5576705ee84f | BencheaDiana/Benchea-Diana-E2 | de pus pe git/laboratorul 2/p2/Compare.cpp | #include "Compare.h"
#include<cstring>
int CompareName(Student student[2])
{
if (strcmp(student[0].getname(), student[1].getname()) == 0)
return 0;
else
if (strcmp(student[0].getname(), student[1].getname()) < 0)
return -1;
return 1;
}
int CompareMathGrades(Student student[2])
{
if (student[0].getmath() < s... | ALGO | 0.918591 | 4.21868 |
935f1f43-c0a8-4bbc-8298-ab835cd08137 | gaurav-bhadane/DSA-CP | Strings/find_length.cpp | #include<iostream>
#include<string.h>
using namespace std;
int findLength(char ch[],int n){
int count=0;
for(int i=0;i<n;i++){
if (ch[i]=='\0'){
break;
}else{
count++;
}
}
return count;
}
int main(){
char ch[100];
cout<<"Enter the Character: ";
... | TOOL | 0.942625 | 3.732614 |
ca1b3e4f-335e-4d6a-82d7-8347703da9b0 | danyuanwang/XuanWuGame_C | boost/libs/sort/benchmark/single/benchmark_objects.cpp | //----------------------------------------------------------------------------
/// @file benchmark_objects.cpp
/// @brief Benchmark of several sort methods with different objects
///
/// @author Copyright (c) 2016 Francisco José Tapia (<EMAIL> )\n
/// Distributed under the Boost Software License, Version 1.0.\n... | TEST | 0.978268 | 6.419522 |
415308b1-2e59-4ad8-be9b-feb210e82d4f | pranavsindura/CompetitiveProgramming | codeforces/C/705c.cpp | #include<bits/stdc++.h>
#define ll long long int
#define pii pair<int,int>
#define mod 1000000007
#define eps 0.000000001
#define all(x) x.begin(), x.end()
#define allr(x) x.rbegin(), x.rend()
#define sz(x) ((int)x.size())
#define ln(x) ((int)x.length())
#define mp make_pair
#define pb push_back
#define ff first
#defin... | ALGO | 0.998802 | 3.879035 |
056d1e34-019b-47b1-b623-bb143c020d51 | lchyeon0123/kairos_project | libraries/opencv/3rdparty/carotene/src/warp_perspective.cpp | #include "remap.hpp"
namespace CAROTENE_NS {
bool isWarpPerspectiveNearestNeighborSupported(const Size2D &ssize)
{
#if SIZE_MAX > UINT32_MAX
return !(ssize.width > 0xffffFFFF || ssize.height > 0xffffFFFF) && // Restrict image size since internal index evaluation
... | ALGO | 0.997868 | 6.947635 |
af586a2d-b035-4928-9798-e6d62cee0b05 | jaconGon/Gerenciador_de_veiculos | Gerenciador_Veiculos/main.cpp | /*
* File: main.cpp
* Author:
* Leonardo Jacon Gonçalves RA:2022.1.08.040
*
* Created on January 26, 2021, 11:00 AM
*/
#include <iostream>
#include <stdlib.h>
#include "fila.h"
#include "pilha.h"
#include "lista.h"
no * busca_lista(tLista *cabeca,string placa){
no *pont = cabeca->lista;
int retorn... | ALGO | 0.970287 | 4.581246 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.