This file contains hidden or 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
| fileTree("${project.projectDir}/proguard").include('*.txt').files.each { file -> | |
| proguardFile file | |
| } |
This file contains hidden or 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
| public class ExampleApplication extends Application { | |
| @Override public void onCreate() { | |
| super.onCreate(); | |
| if (LeakCanary.isInAnalyzerProcess(this)) { | |
| // This process is dedicated to LeakCanary for heap analysis. | |
| // You should not init your app in this process. | |
| return; | |
| } | |
| LeakCanary.install(this); |
This file contains hidden or 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
| dependencies { | |
| debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5' | |
| releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5' | |
| testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5' | |
| } |
This file contains hidden or 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
| public int[] productExceptSelf(int[] nums) { | |
| int n = nums.length; | |
| int[] left = new int[n], right = new int[n], arr = new int[n]; | |
| left[0] = 1; | |
| right[n-1] = 1; | |
| for (int i=1; i<n; i++) { | |
| left[i] = left[i-1]*nums[i-1]; | |
| right[n-i-1] = right[n-i]*nums[n-i]; | |
| } | |
| for (int i=0; i<n; i++) |
This file contains hidden or 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
| public int[] productExceptSelf(int[] nums) { | |
| int n = nums.length; | |
| int[] pre = new int[n]; | |
| for(int i = 0 ; i < n ; i++){ | |
| pre[i] = (i == 0) ? 1 : pre[i-1] * nums[i - 1]; | |
| } | |
| int post = 1 ; | |
| int[] res = new int[n]; | |
| for(int i = n-1 ; i >= 0 ; i--){ |
This file contains hidden or 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
| ll dp(int mask, int rem, bool first) { // first for not using the first digit as zero | |
| if (!mask) { | |
| return rem ? 0 : 1; | |
| } | |
| ll &x = sv[mask][rem]; // memorization | |
| if(x != -1) | |
| return x; | |
| x = 0; | |
| int m = mask; | |
| int used = 0; |
This file contains hidden or 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 <bits/stdc++.h> | |
| #ifdef _MSC_VER | |
| #include <hash_set> | |
| #include <hash_map> | |
| using namespace stdext; | |
| #else | |
| #include <ext/hash_set> | |
| #include <ext/hash_map> | |
| using namespace __gnu_cxx; |