Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// C++ program for the above approach | |
#include <bits/stdc++.h> | |
using namespace std; | |
// Function to check if all array | |
// elements can be reduced to at | |
// most mid by at most K splits | |
int possible(vector<int> & A, int N, | |
int mid, int K) | |
{ |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <math.h> | |
#include <cuda_runtime_api.h> | |
#include <stdio.h> | |
#include <thrust/host_vector.h> | |
#include <thrust/device_vector.h> | |
#include "cuda_runtime.h" | |
#include <malloc.h> | |
#include "device_launch_parameters.h" | |
#include <thrust/host_vector.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<math.h> | |
#include <cuda_runtime_api.h> | |
#include <stdio.h> | |
#include <thrust/host_vector.h> | |
#include <thrust/device_vector.h> | |
#include "cuda_runtime.h" | |
#include <malloc.h> | |
#include "device_launch_parameters.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<math.h> | |
#include <cuda_runtime_api.h> | |
#include <stdio.h> | |
#include <thrust/host_vector.h> | |
#include <thrust/device_vector.h> | |
#include "cuda_runtime.h" | |
#include <malloc.h> | |
#include "device_launch_parameters.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cuda_runtime_api.h> | |
#include <stdio.h> | |
#include <thrust/host_vector.h> | |
#include <thrust/device_vector.h> | |
#include <thrust/sequence.h> | |
#include <thrust/transform_reduce.h> | |
#include <thrust/functional.h> | |
#include <thrust/execution_policy.h> | |
#include <iostream> | |
#include <math.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// now updating the snap rows only | |
for(int iz=snap_z1; iz<snap_z2; iz+=snap_dz){ | |
for(int ix=snap_x1; ix<snap_x2; ix+=snap_dx){ | |
temp_grad = (grad[iz][ix+snap_dx] - grad[iz][ix])/snap_dx; | |
for(int kx=1;kx<snap_dx;kx++){ | |
grad[iz][ix+kx] = grad[iz][ix] + temp_grad*kx; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<math.h> | |
#include <cuda_runtime_api.h> | |
#include <stdio.h> | |
#include <thrust/host_vector.h> | |
#include <thrust/device_vector.h> | |
#include "cuda_runtime.h" | |
#include <malloc.h> | |
#include "device_launch_parameters.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cuda_runtime_api.h> | |
#include <stdio.h> | |
#include <thrust/host_vector.h> | |
#include <thrust/device_vector.h> | |
#include <iostream> | |
#include "cuda_runtime.h" | |
#include <malloc.h> | |
#include "device_launch_parameters.h" | |
#include <math.h> |
NewerOlder