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 <cstdio> | |
#include <cstdlib> | |
#include <algorithm> | |
using namespace std; | |
int a[16],d[1<<16][16]; | |
const int INF = (int)1e8; | |
int main() { | |
int k,t,n,ans; | |
scanf("%d",&n); | |
for(int i=0;i<n;i++)scanf("%d",a+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
#include <cstdio> | |
int main() { | |
int n,ans=0,t=0,i; | |
bool flag = true; | |
while(scanf("%d",&n)==1){ | |
if(n==0&&!flag)break; | |
if(n==0){ | |
printf("%d\n",ans-t); | |
ans=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
package test; | |
public class Main { | |
public static void main(String[] args) { | |
byte x = 0; | |
for (int i = 0; i < 8; i++) { | |
x |= 1 << i; | |
} | |
System.out.println(x); |
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
package test; | |
import java.util.Scanner; | |
public class Test { | |
private final static int HIGHEST = 8; | |
public static void main(String[] args) { | |
int[] bits = new int[HIGHEST]; |
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 <iostream> | |
#include <queue> | |
#include <vector> | |
#include <sstream> | |
using namespace std; | |
typedef pair<int, int> P; | |
typedef vector<vector<int> > matrix; |
OlderNewer